Closed ghost closed 7 years ago
im noticing this though i'm a bit more specific in my watch config and don't change the base
anymore.
shopify: {
files: [
'assets/*.*',
'config/*.*',
'layout/*.*',
'locales/*.*',
'snippets/*.*',
'templates/{,customers/}*.*'
],
tasks: [
'shopify'
]
}
in my initial tests, it would appear the watch
event is never caught.
running node 0.12.6, grunt 0.4.5, contrib-watch 0.6.1, shopify 0.6.0 on windows. tried shopify 0.5.4 too with same results.
ok so not sure how i missed this before but it was the just-in-time task loader in my case.
make sure you have grunt.loadNpmTasks('grunt-shopify');
loaded as early as possible to catch these events.
Does this plugin even attempt to push? grunt.loadNpmTasks('grunt-shopify'); loads first, i receive the "Done without out errors message." But nothing is ever updated.
Grunt file watch is setup correctly, I see file changed notification messages every time I save on my local, but updates are never made to my remote files.
I even disabled my laptops wireless and I still get "Done without errors. Completed on..."
???
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-shopify');
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.initConfig({
shopify: {
options: {
//You can find these in your Shopify Admin under Apps then look at the bottom for Create a private API Key
api_key: "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
password: "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
url: "STORE-NAME.myshopify.com",
base: 'shop/'
}
},
watch: {
shopify: {
files: ['shop/**'],
tasks: ["shopify"],
theme: ["Shopify-Birthday-Suit-Master"]
}
}
});
grunt.registerTask('default', ['shopify', 'watch']);
};
@bradhaas1
"theme" must be in task "shopify"
shopify: { options: { api_key: "xxxxx", password: "xxxxxx", url: "name.myshopify.com", theme: '1234567', //number of theme (get it with grunt shopify:themes) } },
and then watch task:
watch: { shopify: { files: ["assets/**", "layout/**", "snippets/**", "templates/**"], tasks: ["shopify"], options: { spawn: false, }, } },
Closing as it sounds like resolved. If not, try 1.0.0 and let me know if you need clarification.
Running on:
Windows v8.1 grunt-cli v0.1.13 grunt v0.4.5 grunt-shopify v0.6.0
Shopify:
Watch:
Theme:
Run:
When running
grunt watch:shopify
and changing a file:The changed file however, has not been pushed to the Shopify server.