Includes CoffeeScript, Webpack for CommonJS-style module wrapping, Backbone for structure, Stylus for CSS pre-processing, sourcemaps for CSS and CoffeeScript, Handlebars for templating, live-reload for automatic page-refreshes during development and Mocha + PhantomJS for unit testing.
sudo npm install -g gulp
git clone https://github.com/WINTR/gulp-frontend-scaffold.git && cd gulp-frontend-scaffold
npm install
gulp dev
then navigate to http://localhost:3000
(or IP address).gulp build
This concatinates and minifies all CoffeeScripts and SASS and moves the project into 'dist' for production deploy.
Bower is used for client-side package management. Packages installed via bower are then copied over to vendor
via gulp bower
and each time you run gulp dev
.
bower search {package name}
bower install {package name} --save
gulp bower
concat
task in gulpfile.coffee
and saveMocha is used as the default for unit tests. Via gulp-mocha-phantomjs, unit tests can be run in both the terminal as well as the browser.
gulp test
gulp test
test/html/index.html
gulp dev
, tests are automatically re-run on save of either your source or your spec files and should trigger a reload in the browser.src/assets
and will automatically be moved over to the public folder, mirroring the folder structure where they came from.bower install {package}
and then gulp bower
) as well as manually. When changes are made to this directory, the GruntFile concat
task should be updated to include the newly added filestest/spec/spec-runner.js
to be run in the browser.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。