Giter Site home page Giter Site logo

Comments (23)

wilr avatar wilr commented on August 13, 2024

Got the latest version? All my sites use Shopify 2 now, had to make a couple updates to the API (b290166) but apart from that should be fine. I'll give the latest a test tomorrow and see if I can replicate the issue with an invalid key and work backwards from there.

from grunt-shopify.

ryanburnette avatar ryanburnette commented on August 13, 2024

Yea I'm on latest. Let me know if I can do anything to help. I'd love to
get my entire Shopify workflow into one Gruntfile.

On Wed, Jul 10, 2013 at 2:38 AM, Will Rossiter [email protected]:

Got the latest version? All my sites use Shopify 2 now, had to make a
couple updates to the API (b290166b290166)
but apart from that should be fine. I'll give the latest a test tomorrow
and see if I can replicate the issue with an invalid key and work backwards
from there.


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-20724169
.

from grunt-shopify.

wilr avatar wilr commented on August 13, 2024

Sure thing, only thing to do at this stage is look at the HTTP request it creates and what the response is by using something like Charles or Fiddler and try and get to the bottom of the issue (not sure what your javascript is like!).

Might add a verbose debug method to help out for issues like now.

from grunt-shopify.

ryanburnette avatar ryanburnette commented on August 13, 2024

My colleague and I used tcpdump but that was fruitless as it connects via HTTPS, not HTTP.

I'm back to the desktop app for now, let me know if anything comes of it. That's just weird if it works for you and not for me. I wonder what's different.

I'm using Node 0.10.13.

from grunt-shopify.

pagameba avatar pagameba commented on August 13, 2024

yeah, its not working for me either. I've spent a bit of time digging into this, the isBinaryFile method is called but the callback to fs.readFile is never called. I've tested to see if the file exists in this method and it does, so I'm not sure why fs.readFile would not do its job. One thing to note with 0.10 is that the optional middle arg to fs.readFile has changed from the encoding to an options object with encoding being one of the possible values. Changing that didn't make ia difference though.

It seems to me as if it is an async thing and the grunt task is exiting immediately and not waiting for a callback to indicate that it is done.

from grunt-shopify.

pagameba avatar pagameba commented on August 13, 2024

Ok, got it to work with some hacking, PR will follow once I've cleaned it up. As suspected, the upload task should use this.async() to register it as asynchronous. I also had a problem using the base option, the getAssetKey method assumes base is set with the trailing / but the docs are not clear on this (another PR for this).

from grunt-shopify.

ryanburnette avatar ryanburnette commented on August 13, 2024

@pagameba
Thanks for looking into this one! I'm dying to use this Grunt task to complete my workflow. I wrote a theme files compiler that's going to go great with this task.
https://github.com/ryanburnette/grunt-shopify-theme

from grunt-shopify.

pagameba avatar pagameba commented on August 13, 2024

see #8.

from grunt-shopify.

pagameba avatar pagameba commented on August 13, 2024

@ryanburnette my PRs have been merged, hope this works for you. I think this issue could be closed if you report success.

from grunt-shopify.

ryanburnette avatar ryanburnette commented on August 13, 2024

@pagameba Nice, I'll try it out within a day or two.

from grunt-shopify.

terkelg avatar terkelg commented on August 13, 2024

Did it work @ryanburnette? I'm having the same issue. I'm trying to make a grunt workflow with grunt-shopify-theme and grunt-shopify. This could be a killer setup, and a perfect solution to get Foundation by Zurb and Shopify play well together.

from grunt-shopify.

ryanburnette avatar ryanburnette commented on August 13, 2024

@terkelg I haven't tried this again since then. I've been using the Mac desktop app to upload my changes along w/ grunt-shopify-theme. I need to try again though. The desktop app works about 50% of the time for me. I have to keep restarting it to get it to upload all the changed files.

I also need to update grunt-shopify-theme to allow for the customers subdirectory. I'll be working on a new Shopify theme shortly so I'll check some things out before I ramp that project up. ryanburnette/grunt-shopify-theme#1

from grunt-shopify.

wilr avatar wilr commented on August 13, 2024

@terkelg using the latest master? npm install https://github.com/wilr/grunt-shopify/tarball/master

from grunt-shopify.

terkelg avatar terkelg commented on August 13, 2024

Thanks for the quick reply. So far so good. The store still doesn't update, but at least i get an error in response from the terminal. This is indeed a good sign. I'm getting 404 error (Error upload failed with response - Status Code: 404). I've checked URL, API and password in my Gruntfile.js twice. They are all correct.
screen shot 2013-09-17 at 11 24 11

My Gruntfile.js:

module.exports = function(grunt) {

    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-shopify');

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),

        // Shopify Store - Shop API - Theme ID: 4878267
        shopify: {
            options: {
                api_key: "***",
                password: "***",
                url: "***.myshopify.com"
            }
        },

        watch: {

            /** 
             * grunt-shopify
             * Grunt plug-in for publishing Shopify theme assets
             * https://github.com/wilr/grunt-shopify
             */
            shopify: {
                files: ["deploy/**"],
                tasks: ["shopify"]
            }
        }  
    })

    grunt.registerTask('default', ['shopify']);

};

from grunt-shopify.

wilr avatar wilr commented on August 13, 2024

Thanks, super helpful. I think in your case you need to set the base attribute as described in the README to your deploy folder as it's in a subfolder.

from grunt-shopify.

terkelg avatar terkelg commented on August 13, 2024

That's wired. I still get a 404. I can get https://github.com/Shopify/shopify_theme to work though. The 404 error indicate that there somewhere is a broken link.

from grunt-shopify.

terkelg avatar terkelg commented on August 13, 2024

I've messed a bit. It seems like the upload run twice. But the store-front doesn't upload.
screen shot 2013-09-19 at 14 44 59

from grunt-shopify.

wilr avatar wilr commented on August 13, 2024

You'll get a 404 if it cannot put that file in the correct folder. Shopify only gives you certain folders to use. In your example you're now using app, make sure your shopify.base option is set to app/

from grunt-shopify.

terkelg avatar terkelg commented on August 13, 2024

It works! I don't know how I could miss the dash in my base string. Thanks

from grunt-shopify.

ryanburnette avatar ryanburnette commented on August 13, 2024

That's rad to hear that you got this working. I can't wait to use this
Grunt task with my theme compiler.
https://github.com/ryanburnette/grunt-shopify-theme

On Fri, Sep 20, 2013 at 11:08 AM, Terkel [email protected] wrote:

It works! I don't know how I could miss the dash in my base string. Thanks


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-24817149
.

from grunt-shopify.

terkelg avatar terkelg commented on August 13, 2024

@ryanburnette I've made a workflow which compile to the shopify directory structure too (using grunt-contrib-copy). Furthermore it compiles sass/scss (including @import, which Shopify doesn't support), concatenate JavaScript Files, minify JavaScript, CSS and HTML, optimize images and automatically upload to Shopify using this plugin. The only feature I miss at the moment is automatic browser refresh/liveload. Not sure if this is possible when not using localhost. I can share the Gruntfile.js if you like. My plan is to upload it as a Shopify Skeleton Theme on GitHub.

from grunt-shopify.

terkelg avatar terkelg commented on August 13, 2024

@wilr I appreciate your work and help, and I'll love to donate a small amount of money to this project to support future development. Can't imagine my workflow without this plugin.

from grunt-shopify.

wilr avatar wilr commented on August 13, 2024

Thank you @terkelg, I'm glad it's available to help the community. I can't take all the credit (few other contributors) and my client shopify projects help fund the development of the tool (and the ongoing development - full theme sync, retroactive sync of changed files coming next). If you feel you must donate, I would love donations to be contributed to a good cause such as Charity Water (https://www.charitywater.org/donate/) who can use the money in greater ways than I.

In conclusion for this ticket I have created (#15).

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.