gulp-recipes

1.0.20141009 • Public • Published

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}}

Versions

Current Tags

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.20141009
    3

Package Sidebar

Install

npm i gulp-recipes

Weekly Downloads

3

Version

1.0.20141009

License

none

Last publish

Collaborators

  • kaanon