Comments (23)
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.
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.
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.
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.
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.
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.
@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.
see #8.
from grunt-shopify.
@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.
@pagameba Nice, I'll try it out within a day or two.
from grunt-shopify.
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.
@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.
@terkelg using the latest master? npm install https://github.com/wilr/grunt-shopify/tarball/master
from grunt-shopify.
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.
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.
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.
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.
I've messed a bit. It seems like the upload run twice. But the store-front doesn't upload.
from grunt-shopify.
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.
It works! I don't know how I could miss the dash in my base string. Thanks
from grunt-shopify.
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.
@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.
@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.
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)
- Livereload is trigger prematurely HOT 4
- Watch doesn't detect addition / deletion of files HOT 2
- Task doesn't do anything... HOT 2
- I keep getting this error: Loading "shopify.js" tasks...ERROR
- shopify watch errors HOT 2
- grunt watch:shopify not publishing despite successful status report HOT 6
- Shopify:Download grunt task not working HOT 1
- Updating just changed files? HOT 1
- Gulp equivalent of grunt-shopify HOT 2
- Download is throttled HOT 2
- not in base path HOT 2
- watch stopped working shopify:upload still works HOT 2
- Deploy without images
- New 'Sections' feature in themes HOT 2
- Suggestion: Ignore settings_data.json setting HOT 1
- "Loading "shopify.js" tasks...ERROR" after updating to 1.0.1 from 1.0.0 HOT 1
- Cannot find module growl HOT 2
- Getting upload errors for the "assets" folder
- Not allowed by Shopify whitelist HOT 1
- Request limit exceeded for the Shopify API Use HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-shopify.