Closed reggi closed 10 years ago
So you would like to push the same code to 2 different shops? Seems like a bit of an edge case and I personally wouldn't need it so PR welcome if you want to contribute the feature.
I'd love to set up production and development tasks. Unfortunately I can't get both sets of keys in there.
This can easily be achieved by using env variables, I use it like this:
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
shopify: {
options: {
api_key: process.env.SHOPIFY_API_KEY,
password: process.env.SHOPIFY_API_PASSWORD,
url: process.env.SHOPIFY_API_URL,
base: 'theme/'
}
},
watch: {
shopify: {
files: ['theme/assets/**','theme/config/**','theme/layout/**','theme/snippets/**','theme/templates/**']
}
}
});
then invoke grunt like this:
SHOPIFY_API_KEY=<key> SHOPIFY_API_PASSWORD=<password> SHOPIFY_API_URL=<url> grunt shopify
It is easy to switch between stores this way.
As @pagameba has described (and as readme says) ENV variables are the way to go for managing configuration. You can also implement your own shortcuts for push prod
, push dev
if you need outside of the context of the plugin
I changed "options" to one shop name and put two objects in in. I was getting:
Realized you cant change the properties of "shopify" task.