predator-kit
Basic lib for predator style FE project
Develop
commands
-
npm run test
# test the predator-kit-
test:lib
for library use-ln -
test:build
the build operation
-
-
npm run gulp <task>
# clean the build in thetest
dir -
npm run update-deps
# update demo's package.json to use predator-kit@latest -
npm run use-ln
# usenpm link predator-kit
in demo.
yeoman-generator
see https://github.com/magicdawn/generator-predator
steps
- modify files
- travis install latest(old) version, use ln to use current modification
- manly update package.json version
- publish to npm
- push to git, trigger travis build
API
dev
- startAssetsManager # start assets manager
- loadAllRouter # load all router
build
generally: we got build everything ready
- buildCopy: just copy
- buildStatic: name_hash.ext
- buildLessAsync: less -> clean-css
- buildJsAsync: js -> browserify
- buildOtherJsCss: css/js not in
main
- buildView: we build
view/*.{swig|html|...}
- buildHtmlAsync: build static html