Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dillonbailey/c06b1ee88ab1432435515c65840daf74 to your computer and use it in GitHub Desktop.
Save dillonbailey/c06b1ee88ab1432435515c65840daf74 to your computer and use it in GitHub Desktop.
Useful Additional Task for Blendid task-config.js
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