gulp-recipes
v1.0.20141009
Published
Gulp Recipes for use on projects
Downloads
2
Readme
gulp-recipes
Gulp Recipes for use in projects.
This is an example of how we can have minified assets with gulp finding out the files from the layouts.
Installation
npm install -g gulp
Useful gulpfile tasks
gulp lint
for linting all js files, including models, collections, views, and public js
gulp build
for building the minified assets
gulp test
for running the mocha tests
gulp deploy (not tested)
deploy the dev branch to runway3, opens browser to watch build
gulp tag
for creating new tags, runs lint task first
Baselayout changes
The comment is used to determine the filename that gets created. For the below example the minified file will end up in public/js/mobile/build/mymatches-all.js
{{#if constants.settings.minify_assets}}
<script src="{{constants.settings.STATIC_PATH}}/js/mobile/build/mymatches-all.js"></script>
{{else}}
<!-- build:js js/mobile/build/mymatches-all.js -->
<script src="{{constants.settings.STATIC_PATH}}/js/mobile/enums/MyMatchesEnums.js"></script>
<script src="{{constants.settings.STATIC_PATH}}/js/mobile/models/MyMatchesModel.js"></script>
<script src="{{constants.settings.STATIC_PATH}}/js/mobile/collections/MyMatchesCollection.js"></script>
<script src="{{constants.settings.STATIC_PATH}}/js/mobile/views/MyMatchesHeaderView.js"></script>
<script src="{{constants.settings.STATIC_PATH}}/js/mobile/views/MyMatchesListView.js"></script>
<script src="{{constants.settings.STATIC_PATH}}/js/mobile/routers/MyMatchesRouter.js"></script>
<!-- endbuild -->
{{/if}}