Giter Site home page Giter Site logo

No support for multiple shops about grunt-shopify HOT 4 CLOSED

wilr avatar wilr commented on August 13, 2024
No support for multiple shops

from grunt-shopify.

Comments (4)

wilr avatar wilr commented on August 13, 2024

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.

from grunt-shopify.

reggi avatar reggi commented on August 13, 2024

I'd love to set up production and development tasks. Unfortunately I can't get both sets of keys in there.

from grunt-shopify.

pagameba avatar pagameba commented on August 13, 2024

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.

from grunt-shopify.

wilr avatar wilr commented on August 13, 2024

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

from grunt-shopify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.