Commit fa62833f authored by Stanislav Fifik's avatar Stanislav Fifik

introducing config

parent 4912dd02
......@@ -93,7 +93,8 @@ module.exports = {
});
},
cssWebpack: function(name, entryPoints, destination) {
cssWebpack: function(name, entryPoints, destination, config) {
config = config || {};
gulp.task(name, 'Build css bundles from `css`', function(callback) {
process.chdir(module.exports.gulpfilePath);
webpack({
......@@ -102,7 +103,7 @@ module.exports = {
output: {
path: path.resolve(module.exports.gulpfilePath, destination),
filename: '[name].css',
publicPath: '/css/',
publicPath: config.publicPath || '/css/',
},
target: 'web',
watch: argv.watch,
......@@ -145,7 +146,8 @@ module.exports = {
})
},
js: function(name, entryPoints, destination){
js: function(name, entryPoints, destination, config){
config = config || {};
gulp.task(name, 'Build javascript bundles from `js`', function(callback){
process.chdir(module.exports.gulpfilePath);
webpack({
......@@ -169,7 +171,7 @@ module.exports = {
output: {
path: path.resolve(module.exports.gulpfilePath, destination),
filename: '[name].js',
publicPath: '/js',
publicPath: config.publicPath || '/js',
},
target: 'web',
watch: argv.watch,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment