Skip to content

Instantly share code, notes, and snippets.

@TylerK
Created January 11, 2015 01:56
Show Gist options
  • Save TylerK/5f04f7d9ec0c48b11ae3 to your computer and use it in GitHub Desktop.
Save TylerK/5f04f7d9ec0c48b11ae3 to your computer and use it in GitHub Desktop.
//
// One gulp config file to rule them all!
// No more per-project configs <(^-^<)
//---------------------------------------------------------
var path = require('path')
, config = {}
;
//
// Globals and per-project base paths
//---------------------------------------------------------
config.paths = {
base: { dest: './static' }
, globals: { src: './public', dest: './static/global' }
, portal: { src: './apps/portal/public', dest: './static/portal' }
, gateway: { src: './apps/gateway/public', dest: './static/gateway' }
, uikit: { src: './apps/uikit/public' , dest: './static/uikit' }
};
//
// Static and vendor files
//---------------------------------------------------------
config.images = {
src: path.join(config.paths.globals.src, 'images')
, dest: path.join(config.paths.globals.dest, 'images')
};
config.fonts = {
src: path.join(config.paths.globals.src, 'fonts')
, dest: path.join(config.paths.globals.dest, 'fonts')
};
config.vendors = {
src: path.join(config.paths.globals.src, 'vendors')
, dest: path.join(config.paths.globals.dest, 'vendors')
};
//
// Browserify bundle configs
//---------------------------------------------------------
config.bundles = {
globals: {
src: path.join(config.paths.globals.src, 'js')
, watch: path.join(config.paths.globals.src, 'js/**/*')
, dest: path.join(config.paths.globals.dest, 'js')
, name: 'bundle.scripts.js'
}
, portal: {
src: path.join(config.paths.portal.src, 'js/index.js')
, watch: path.join(config.paths.portal.src, 'js/**/*')
, dest: path.join(config.paths.portal.dest, 'js')
, name: 'bundle.scripts.js'
}
};
//
// Stylus configs
//---------------------------------------------------------
config.styles = {
globals: {
src: path.join(config.paths.globals.src, 'styles/index.styl')
, watch: path.join(config.paths.globals.src, 'styles/**/*')
, dest: path.join(config.paths.globals.dest, 'styles')
, name: 'base.css'
}
, portal: {
src: path.join(config.paths.portal.src, 'styles/index.styl')
, watch: path.join(config.paths.portal.src, 'styles/**/*')
, dest: path.join(config.paths.portal.dest, 'styles')
, name: 'portal.css'
}
};
module.exports = config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment