Skip to content

Instantly share code, notes, and snippets.

@hsleewis
Last active August 29, 2015 14:06
Show Gist options
  • Save hsleewis/d6b57b089000fb06a198 to your computer and use it in GitHub Desktop.
Save hsleewis/d6b57b089000fb06a198 to your computer and use it in GitHub Desktop.
var run = require('gulp-run');
var upload_to_shopify = function( file ){
var splitPath = file.path.split('theme/').pop();
run('theme upload ' + splitPath, { cwd: 'theme' }).exec();
};
gulp.task( 'watch', function( evnt ) {
// ADD LINES BELOW TO YOUR WATCH TASK & CHANGE THE './theme/**/*' to the path of your shopify theme
gulp.watch('./theme/**/*', function(evnt) {
upload_liquid(evnt.path);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment