Comments (10)
Quick update - @hayes0724 this is my working but cumbersome deployment process:
- run the packer build command
- go to the dist folder and edit the style-tags and script-tags snippets, replacing instances of {% if template == '[name of template]' with {% if template.name == '[name of template]'
- manually copy any changes to templates to target theme - preserving settings where possible
- create a themekit ignores file to ignore all json files
- copy the config.yml and ignores file into the root of the dist folder
- run theme deploy --env=[env name]
Can you offer any guidane or roadmap for shopify 2.0 support?
from shopify-packer.
Second this! Would be a huge step up and avoid having other tools to be created. Having Shopify CLI / Dawn being part of the dev and build process would be ace.
from shopify-packer.
Right now I'm making do - I have one custom theme migrated to Shopify 2.0 and I've found that once the json templates are deployed, everything else keeps working just fine. But I think swapping out theme kit with CLI would solve the issue of having to manually manage json template deployments
from shopify-packer.
ohh really? That's good to hear.
So are you running packer/dev/deployment as per usual, and then manually uploading the JSON templates to the theme?
Are you still running it with SCSS and then compiling into a single CSS file or using Dawn's method of a css sheet pet section?
from shopify-packer.
Yes, running packer start/watch, build, etc., as normal but manually deploying the json files. I'm still running scss using packer to compile into the various css files per template entry-point.
from shopify-packer.
I have had no issues working with Shopify 2.0 json templates. My version of ThemeKit is 1.1.9. The Shopify CLI theme watch command has its own development server and would be incompatible with this library. It also does not support hot module reloads as readily as Packer, overall I've found their theme cli tool to be really sluggish and a bad alternative at the time of writing. Remember that this library is a stable version of Slate 1.0, which was also created by Shopify. The build tool path empowers the developer to be creative whereas the cli/dawn combo pushes uniformity.
from shopify-packer.
Themekit has a JS package that Packer uses to run themekit in the background and interact with Shopify themes directly. The new Shopify CLI is a ruby-based tool that does NOT have a JS package that Packer could use.
Anyway using Shopify CLI isn't even necessary. Themekit is still perfectly capable of interacting with the new JSON templates. Packer just needs to be updated to recognize those templates rather than simply .liquid files. Right now Packer loops through the /src/templates directory and matches up any .liquid files with their counterparts in /src/scripts/templates. If Packer were updated to do the same but while also matching .json templates, the entire issue would be resolved.
from shopify-packer.
@adrianocr 2.0 allows the merchant to create offshoot templates which is kind of the core functionality of 2.0 and "sections everywhere". The offshoot files are named by the merchant. Have you thought of a solution for how a js entry point for the original could also apply to its extensions/offshoots?
from shopify-packer.
@Eben-Hafkamp unfortunately I don’t believe there’s a way to automatically deal with that. I don’t believe Shopify CLI deals with it automatically either. The process would be manual; you’d have to manually pull down the offshoot json template into your local files and then manually create a counterpart js entrypoint (if necessary).
from shopify-packer.
@adrianocr Yea that is a shame as usually only the content or the arrangement of content is changed in "sections everywhere" and the dynamics or the javascript of the page stay the same. Hmm it sure is a head scratcher, I wish Shopify had created just a small identifier for where templates are descendent from, could have been useful in more ways than one.
Correct the CLI does not work in the same way. The GitHub integration is used to have the Shopify bot push the new template files into the associated theme branch's source. I prefer to run the Shopify CLI pull command and avoid the integration which is a bit spammy at the time of writing.
from shopify-packer.
Related Issues (20)
- [FEAT] script-tags for pages HOT 1
- Question: Using section scripts? HOT 1
- [BUG] ERROR in Conflict: Multiple assets emit different content to the same filename HOT 2
- [BUG] Style-tags.liquid not loading product.css
- [BUG] Packer Build - Conflict: Multiple assets emit different content to the same filename HOT 2
- [BUG] Packer is not accepting Themekit access App Password HOT 2
- z-index values are getting flattened to 1 or 2. Does anyone know which of css-loader, style-loader, sass-loader, and postcss-loader could be responsible for this? HOT 2
- [BUG-Critical] packer build keeps failing on node enviroment HOT 1
- Facing issue HOT 3
- Packer works with NVM, but not with Volta. Issues with various webpack loaders when installed through Volta HOT 1
- [BUG] style.css.liquid in assets breaks watcher HOT 1
- Assertion failed: (thread_id_key != 0x7777), function find_thread_id_key, file coroutine.cc, line 134.[BUG] HOT 4
- [BUG] Chalk v5 does not allow 'require' breaking new installations HOT 5
- [BUG] packer start isn't updating the changes on the dev theme.. HOT 2
- [Bug] `packer start` : have it watch and upload all changed files, not just *some* HOT 1
- Global installation of packer fails on installation of @shopify/themekit [BUG] HOT 1
- [BUG] Cannot change theme source styles directory
- Conflicting name with Hashicorp's Packer
- Grahhh
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 shopify-packer.