- Install NVM to manage/install NodeJS
nvm install 6
to install Node 6npm i -g npm@3
to update your NPMnpm i -g gulp-cli
to install Gulp task runner globallynpm i
npm run lerna:bootstrap
gulp babel
compile all of thepackages/*/dist
for the first timegulp watch
gulp build -q && gulp browser-sync
prod like build, without uglification/minificationgulp build && gulp browser-sync
prod like build, with uglification/minification
"packages" comprise the build and are build by the build. Therefore, if internal "packages" are in a bad state the "build/tasks/babel" ttask will override. Run gulp babel
and an error might show in the terminal but packages should still build. Run any gulp task now and you should NOT see an error unless your compiled package has an error.
Troubleshooting:
rm -rf packages/*/dist
gulp babel
gulp watch
orgulp dev
Kil everything:
rm -rf node_modules && npm cache clean
rm -rf packages/*/(node_modules|dist)
npm i && npm run lerna:bootstrap
nvm use && gulp watch
- install iron-node
npm i -g iron-node@2.2.15
- debug gulp tasks => first place
debugger
breakpoints
iron-node `which gulp` <your_task>
- write tests in
packages/*/test
gulp ava
run all testsgulp ava -f <test_file_name_no_ext>
run single testgulp ava --debug
useiron-node
to debug tests
- add the flow pragma
// @flow
at the top of any file in thepackages
orbuild
directory gulp flow
runs flowgulp dev
runsbabel
&&flow
and watches for changes- add declarations in the
declarations
directory and they will be exposed toflow
globally