added phantom support in gulp
This commit is contained in:
parent
08ebc8d292
commit
32d7da91b7
|
@ -1,19 +1,45 @@
|
||||||
module.exports = {
|
var phantom = require('./phantom');
|
||||||
|
|
||||||
|
var paths = {
|
||||||
|
src: {
|
||||||
|
root: './src/UI/',
|
||||||
|
templates: './src/UI/**/*.hbs',
|
||||||
|
html: './src/UI/*.html',
|
||||||
|
partials: './src/UI/**/*Partial.hbs',
|
||||||
|
scripts: './src/UI/**/*.js',
|
||||||
|
less: ['./src/UI/**/*.less'],
|
||||||
|
content: './src/UI/Content/',
|
||||||
|
images: './src/UI/Content/Images/**/*',
|
||||||
|
exclude: {
|
||||||
|
libs: '!./src/UI/JsLibraries/**'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dest: {
|
||||||
|
root: './_output/UI/',
|
||||||
|
content: './_output/UI/Content/'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (phantom) {
|
||||||
|
paths = {
|
||||||
src: {
|
src: {
|
||||||
root: './src/UI/',
|
root: './src/UI.Phantom/',
|
||||||
templates: './src/UI/**/*.hbs',
|
templates: './src/UI.Phantom/**/*.hbs',
|
||||||
html: './src/UI/*.html',
|
html: './src/UI.Phantom/*.html',
|
||||||
partials: './src/UI/**/*Partial.hbs',
|
partials: './src/UI.Phantom/**/*Partial.hbs',
|
||||||
scripts: './src/UI/**/*.js',
|
scripts: './src/UI.Phantom/**/*.js',
|
||||||
less: ['./src/UI/**/*.less'],
|
less: ['./src/UI.Phantom/**/*.less'],
|
||||||
content: './src/UI/Content/',
|
content: './src/UI.Phantom/Content/',
|
||||||
images: './src/UI/Content/Images/**/*',
|
images: './src/UI.Phantom/Content/Images/**/*',
|
||||||
exclude :{
|
exclude: {
|
||||||
libs:'!./src/UI/JsLibraries/**'
|
libs: '!./src/UI.Phantom/JsLibraries/**'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dest: {
|
dest: {
|
||||||
root: './_output/UI/',
|
root: './_output/UI.Phantom/',
|
||||||
content: './_output/UI/Content/'
|
content: './_output/UI.Phantom/Content/'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = paths;
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
var args = require('yargs').argv;
|
||||||
|
// Switch to phantom.
|
||||||
|
// Example:
|
||||||
|
// gulp --phantom
|
||||||
|
|
||||||
|
var phantom = !!args.phantom;
|
||||||
|
|
||||||
|
console.log('Phantom:', phantom);
|
||||||
|
|
||||||
|
module.exports = phantom;
|
|
@ -25,8 +25,8 @@
|
||||||
"gulp-less": "2.0.1",
|
"gulp-less": "2.0.1",
|
||||||
"gulp-print": "1.1.0",
|
"gulp-print": "1.1.0",
|
||||||
"gulp-replace": "0.5.2",
|
"gulp-replace": "0.5.2",
|
||||||
"gulp-stripbom": "1.0.4",
|
|
||||||
"gulp-run": "1.6.6",
|
"gulp-run": "1.6.6",
|
||||||
|
"gulp-stripbom": "1.0.4",
|
||||||
"gulp-webpack": "1.2.0",
|
"gulp-webpack": "1.2.0",
|
||||||
"gulp-wrap": "0.10.1",
|
"gulp-wrap": "0.10.1",
|
||||||
"handlebars": "2.0.0",
|
"handlebars": "2.0.0",
|
||||||
|
@ -34,6 +34,7 @@
|
||||||
"jshint-stylish": "1.0.0",
|
"jshint-stylish": "1.0.0",
|
||||||
"run-sequence": "1.0.2",
|
"run-sequence": "1.0.2",
|
||||||
"streamqueue": "0.1.1",
|
"streamqueue": "0.1.1",
|
||||||
"webpack": "1.5.3"
|
"webpack": "1.5.3",
|
||||||
|
"yargs": "^3.15.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue