node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


Fusion Frontend Gulp Tasks

  • Include this in your project
  • create some config overlays
  • add some npm script entrypoints

Getting Started

  1. Add it to your node modules

Install it from the stash git repo:

$ npm install git+ssh:// --save-dev
  1. Include some configuration in your package.json

edit your package.json, add something like the following:

    "gulp": "relative/path/to/alternative/configs"
    "dev": "fe-gulp run default --config=development",
    "prototype": "fe-gulp run task task task --config=prototype",
    "build": "fe-gulp run task task task --config=production",
    "somethingelse": "fe-gulp run task task task --config=foobar"
  1. Interact with it via npm run <action> :
    npm run dev
    npm run prototype
    npm run build
    npm run something
    npm run report-config


Globally Install vs Local Install

Note that unless you install fe-gulp globally, usage of fe-gulp is only available through ./node_modules/bin/fe-gulp.

At the moment, while globally installing fe-gulp will work, no consideration for global installation of fe-gulp has been made. There is the unsolved problem of gulp tasks changing between fe-gulpversions. Since the gulp tasks are part of the fe-gulp package, some projects might use a different version of fe-gulp. globally installing fe-gulp would give you the wrong set of tasks.

generating proper deployment urls in your assets

Copy the ./test/config/alphaConfig.cofffee to your ./client/config/

  • change projectCode with something like 001
  • change clientCode with something like bau
  • make sure all references to your theme assets are like:
    • in templates: {% static 'styles/something.css' %}
    • in css: @@siteroot


v7.3.0 / 2016-11-04

  • Added flag to enable building a subset of pages.
    • Run fe-gulp with flag --pagesSubset path/from/configured/pages/directory
    • Only the pages in the provided directory will be compiled.
    • Caveats: the provided subset directory becomes the "root", so the index.html of the subset will be the root of the target directory.

v7.0.0 / 2015-12-15

  • Upgraded to Node v4.2.3! Yay!
  • Did some long over cleaning of house. Removed a large amount of unused dependencies to reduce download, footprint and install time. Found some coins under the couch cushions too!
  • Along with upgrading the Node version, many of the dependencies also needed updating. So, we did that. It was mostly pretty good.
  • Although gulp-iconfont broke, because we were like, 4 major versions behind. So we have to make a change to a couple of things.
    • In your config, config.iconfonts, appendCodepoints is now appendUnicode
    • In your icon generation templates, glyph.codepoint.unicode is now glyph.charcode
  • Whilst this release should be stable, please be aware with a rather large shake up of dependencies, things might go a little awry. Please report all bugs in JIRA.

v6.2.1 / 2015-12-15

  • We no longer install browserSync every single time we npm install. That was silly, really. Has been replaced with npm set config msvs_version 2013, which is like switching to a latex free bandaid (this underlying problem still exists, but it's less irritating).
  • Added the fe-gulp logos Rhys made to the repo. Because pretty.
  • Updated gulp-autoprefixer because it had stopped working properly and we were 3 major versions behind. Also set the default ie config to 9-11.
  • Attempted to fix that annoying licence message. Dunno why that one took us so long, really. Although it may only not appear on later versions of npm.

v6.2.0 / 2015-11-12

Splitting Bundles (Factor Bundle)

JavaScript bundles can now be split into separate bundles, with a common.bundle.js bundle being created for common dependencies between the different bundles.

  • Disabled by default; enable:
  config: js:
    bundle: true
  • Common bundle name is optionally configurable:
  config: js:
      common: 'common.custom.js' # Default 'common.bundle.js' 
  • Bundles can be excluded from the factoring by adding their filename to the independent config.
    • These independent bundles will still be browserified, however this happens separately from the main process. As such their dependencies will not be bundled into common, even if they are the same.
    • This is useful is you want a script to run independently.
    • To enable, update your configuration:
  config: js:
      # Array of independent sources relative 
      # to your scripts directory 
      independent: [

v6.0.0 / 2015-10-21

  • data files for pages in target.pages now use dependency injection powered by zeninjector:
    • no longer required to generate template list in your projects global data, fe-gulp does this for you and exposes it via Context.templates
    • your data file must export a function or an array with a function as the last item (angular style DI)
    • argument names in your modules export function must match one of: Context, Meta, File, or the exact name of a file in the global data directory of your project
    • Context contains: pkg, faker, templates, manifest, git and pages

v5.0.x / 2015-08-x

  • site.paths.static root is prepended with site.paths.root
  • root is prepended with site.paths.root

v3.0.0 / 2015-07-30

  • version bump
  • add manifesto and fingerprint libs, update test project
    • turn on with:
        fingerprint: true
    • use in your swig templates with : {% static 'styles/main.css %}
  • update tasks to properly fingerprint assets

v1.0.0 / 2015-07-01

  • changed how iconfonts generates assocaited templates.
    • single option : config.iconfonts.templates is a dictionary/object/hash/associate-array
    • key/value pair of source/destination paths relative to client/src (or config.source.root)

v0.0.44 / 2015-05-04

  • 0.0.44
  • include weinre remote inspector
  • Merge pull request #4 in FUS/fe-gulp from ~RHYS.LLOYD/fe-gulp:bugfix/browserify-externals to develop
  • Browserify task: Updated to include specific file exclusions and ignores.
  • Browserify externals weren't working. Also the file-specific externals/ignores doesn't work, and breaks the build. Commented out until a fix is resolved.

v0.0.43 / 2015-04-28

  • 0.0.43

v0.0.42 / 2015-04-28

  • 0.0.42
  • patternlab path is relative to target.root
  • whitespace?

v0.0.41 / 2015-04-28

  • 0.0.41
  • remove nightmare till we work out repeatable cross platform way to install it with one command
  • update master config
  • replace static root

v0.0.40 / 2015-04-28

  • 0.0.40
  • specify paths before running watches
  • use backwards compatiable default
  • specify where patternlab will be written
  • make the distinction between patternlab and general root output. developers need to be able to create builds without templates.

v0.0.39 / 2015-04-24

  • 0.0.39
  • remove nunjucks

v0.0.38 / 2015-04-16

  • 0.0.38
  • include slugify
  • use slugify instead of regex replace

v0.0.37 / 2015-04-16

  • update manifest
  • 0.0.37
  • update linters
  • add coffeelint
  • change to jslint, specify node version

v0.0.36 / 2015-04-09

  • 0.0.36
  • remove shrinkwrap

v0.0.35 / 2015-04-09

  • 0.0.35
  • update swig task when adding tags/filters

v0.0.34 / 2015-04-07

  • 0.0.34
  • update swig to properly load tags and filters
  • include styleguide placeholders

v0.0.33 / 2015-04-01

  • 0.0.33
  • update filesize variable in logging
  • add filesize and nightmare packages
  • use file size mpdule to correctly humanise filesizes

v0.0.32 / 2015-04-01

  • 0.0.32
  • update tasks
  • insert report and test
  • fix task names
  • update jslint reporter
  • add logger fix paths add notes about on-page performance testing
  • create an id based on the relative path with dashes
  • semicolons...
  • add some notes about testing frameworks and runners
  • example e2e tests with mocha and casper
  • better testing for ignores and exludes
  • browserify: add ignores(global and per file), exlcudes(global and per file) test & watch: changed 'acceptance' to 'e2e'
  • example plugin

v0.0.31 / 2015-03-31

  • 0.0.31
  • Merge pull request #3 in FUS/fe-gulp from ~RHYS.LLOYD/fe-gulp:bugfix/verbose-globbing to develop
  • Simplified default glob patterns to prevent streams returning the same file multiple times.
  • Spelling error. Can't handle it.
  • Removed redundant module gulp-rimraf

v0.0.30 / 2015-03-30

  • 0.0.30
  • add data to template watch trigger

v0.0.29 / 2015-03-26

  • 0.0.29
  • update del task with helper loggers
  • logger helpers

v0.0.28 / 2015-03-26

  • 0.0.28
  • move from rimraf to del
  • update docs

v0.0.27 / 2015-03-26

  • 0.0.27
  • update docs

v0.0.26 / 2015-03-26

  • 0.0.26
  • fix paths

v0.0.25 / 2015-03-26

  • 0.0.25
  • update paths
  • include target paths to various types of assets
  • check if we want tags or filters
  • simple node git taht gets branch name, todo: get tag and distance of current commit from nearest tag
  • placeholder for new githash plugin

v0.0.24 / 2015-03-20

  • 0.0.24
  • provide label as well as path

v0.0.23 / 2015-03-20

  • 0.0.23
  • build ancestory paths

v0.0.22 / 2015-03-20

  • 0.0.22
  • allow server to have custom port and host, load tags and filters, provide file stats
  • better tag and filter loading, provide file stats

v0.0.21 / 2015-03-19

  • 0.0.21
  • add replace task

v0.0.20 / 2015-03-18

  • 0.0.20
  • don't cache data reads

v0.0.19 / 2015-03-18

  • set per file stream data to document:

v0.0.18 / 2015-03-18

  • version bump
  • build tree and add globals

v0.0.17 / 2015-03-17

  • version bump
  • include swig task, better page data merging
  • add swig task

v0.0.16 / 2015-03-16

  • merge config overlay specific template data
  • remove tags and filters, needs more thought
  • report file size
  • lets call them modules instead of applications. name your files or foo.module.js
  • pipe only application entry points

v0.0.15 / 2015-03-13

  • describe red or write action
  • disable old broken plugins

v0.0.14 / 2015-03-12

  • better logging, and githash is back
  • add package.json to the config pipeline
  • better logger
  • udpate config
  • updated config example
  • remove logging

v0.0.13 / 2015-03-12

  • fix font copying, only rev if cachebust is set

v0.0.12 / 2015-03-12

  • version bump
  • fix font copy and image copy, allow extras to be copied

v0.0.11 / 2015-03-12

  • update with notify

v0.0.9 / 2015-03-11

  • version bump
  • include support for exluding files from generated page tree

v0.0.8 / 2015-03-11

  • version bump
  • correctly include project data

v0.0.7 / 2015-03-11

  • version bump
  • update task watcher
  • update packages

v0.0.6 / 2015-03-11

  • version bump
  • remove assemble, directly render nunjucks
  • re-worked paths and tasks to work with settings, included new task for rendering prototype. manifest hashes are included in template context
  • update
  • remove process.exit... it was actually preventing gulp from running
  • add cwd to paths
  • check for manifests before trying to import them
  • move sass includepath manipulation into the scss module
  • Merge tag 'v0.0.5' into develop

v0.0.5 / 2015-03-05

  • Merge branch 'release/0.0.5'
  • version bump
  • remove manifest update task
  • Merge tag 'v0.0.4' into develop

v0.0.4 / 2015-03-05

  • Merge branch 'release/0.0.4'
  • version bump
  • include chalk for console colors
  • Merge tag 'v0.0.3' into develop

v0.0.3 / 2015-03-05

  • Merge branch 'release/0.0.3'
  • version bump
  • udpate readme
  • move logic into src, create a test directory
  • update basics
  • Merge tag 'v0.0.2' into develop

v0.0.2 / 2015-03-04

  • Merge branch 'release/0.0.2'
  • version bump for release
  • add test task, force exit when done
  • update gulprunner and bin file
  • gulp job/task bootstrapper. configuration overlay tool
  • report available configs
  • reduce default config to apparent bar minimum
  • update githash plugin into one file
  • create binary for fe-gulp, allowing it to be used in npm run (takes environment and list of tasks)
  • eventemitter based plugin approach
  • update
  • merge config with env config
  • initial commit
  • Merge branch 'release/0.0.2' into develop
  • Merge branch 'release/0.0.2'

0.0.2 / 2014-09-19

  • tidy up docs
  • split proposals from documentation
  • formatting

0.0.1 / 2014-09-19

  • initial import