Steps to Install & Run
- Install NVM to manage/install NodeJS
nvm install 6to install Node 6npm i -g npm@3to update your NPMnpm i -g gulp-clito install Gulp task runner globallynpm inpm run lerna:bootstrapgulp babelcompile all of thepackages/*/distfor the first timegulp watchgulp build -q && gulp browser-syncprod like build, without uglification/minificationgulp build && gulp browser-syncprod like build, with uglification/minification
Weirdness
"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/*/distgulp babelgulp watchorgulp dev
Kil everything:
rm -rf node_modules && npm cache cleanrm -rf packages/*/(node_modules|dist)npm i && npm run lerna:bootstrap
Returning Users
nvm use && gulp watch
Debugging
- install iron-node
npm i -g iron-node@2.2.15 - debug gulp tasks => first place
debuggerbreakpointsiron-node `which gulp` <your_task>
Testing
- write tests in
packages/*/test gulp avarun all testsgulp ava -f <test_file_name_no_ext>run single testgulp ava --debuguseiron-nodeto debug tests
Flow
- add the flow pragma
// @flowat the top of any file in thepackagesorbuilddirectory gulp flowruns flowgulp devrunsbabel&&flowand watches for changes- add declarations in the
declarationsdirectory and they will be exposed toflowglobally