webappstarter generator will give you a Simple Mobile Web App Boilerplate and Structure!
npm install -g generator-webappstarter
2.install yeoman.
npm install -g yo
3.[option]Clone this git repo to your local,and from the root of the repo,run
npm link
to developing the generator locally.
1.generate a new project,run
mkdir myProject
cd myProject
yo webappstarter
2.generate a new module,run
//add "html/site/include/modulename.html" and inlude it to "html/site/include/views.html"
//add "scss/_debug-modulename.scss" and inport it to "scss/_debug-view.scss"
//add "src/app/view/ModuleNameView.js"
//add "src/app/controller/ModuleNameController.js"
//add "src/app/resources/TemplateModuleName.js
yo webappstarter:module ModuleName
More configurations,please take a look at "project" property of "package.json" file after the generator is done.
run
npm install -g gulp
before you get started.
1.build project,watch change and start browserSync,run
gulp
2.deploy to test server,run
gulp deploytest
Please update your ftp auth name and password in ".ftppass". View the page on test server http://office.mozat.com:8083/PROJECTNAME/. This command require openssl. For windows,you might needd to add openssl path to classpath.
3.deploy to offical server,run
gulp deploy
View the page on offical server http://m.deja.me/PROJECTNAME/. This command require rsync. For windows,unzip /tools/rsync.zip to a local path and add the path to classpath.
4.run
gulp copy
to copy source images to project's resources/images/
path,then generate scss/_dubug-sprites.csss
and resources/images/sprites.png
for sourceSprites in package.json
.
5.run
gulp jshint
to start jshint.
6.run
gulp serve
to start browserSync,Change browserSync options in package.json
.
7.run
gulp pagespeed
to start pagespeed,Change pagespeed options in package.json
.
Random git commit message
git commit -m"`curl -s http://whatthecommit.com/index.txt`"