Created
September 22, 2017 05:38
-
-
Save dillonbailey/c06b1ee88ab1432435515c65840daf74 to your computer and use it in GitHub Desktop.
Useful Additional Task for Blendid task-config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const ext = require('gulp-ext'); | |
const notify = require('gulp-notify'); | |
module.exports = { | |
html : true, | |
images : true, | |
fonts : true, | |
static : true, | |
svgSprite : true, | |
ghPages : true, | |
stylesheets : true, | |
javascripts: { | |
entry: { | |
// files paths are relative to | |
// javascripts.dest in path-config.json | |
app: ["./app.js"], | |
}, | |
provide: { | |
$: "jquery", | |
jQuery: "jquery", | |
'window.jQuery': 'jquery', | |
Tether: 'tether', | |
tether: 'tether', | |
"window.Tether": 'tether' | |
}, | |
}, | |
browserSync: { | |
server: { | |
// should match `dest` in | |
// path-config.json | |
baseDir: 'public' | |
} | |
}, | |
production: { | |
rev: false | |
}, | |
additionalTasks: { | |
initialize(gulp, PATH_CONFIG, TASK_CONFIG) { | |
const paths = { | |
src: path.resolve(process.env.PWD, PATH_CONFIG.dest, PATH_CONFIG.stylesheets.dest), | |
dest: path.resolve(process.env.PWD, PATH_CONFIG.shopify.assets) | |
} | |
gulp.task('copy', function() { | |
return gulp.src(paths.src + '/app.css') | |
.pipe(ext.append('liquid')) | |
.pipe(gulp.dest(paths.dest)) | |
.pipe(notify('app.css.liquid kicked out to assets')); | |
}); | |
}, | |
development: { | |
prebuild: null, | |
postbuild: ['copy'], | |
}, | |
production: { | |
prebuild: null, | |
postbuild: null, | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment