@inkofpixel/shopify-builder

0.0.16 • Public • Published

Shopify Builder

An opinionated builder for Shopify.

This is currenty in alpha and not ready for production use. API will likely change

How to use

To use this tools you must have a predefined project structure. (Pay attention to the src folder)

+-- assets
+-- config
+-- layout
+-- locales
+-- snippets
+-- src
+-- templates

It's a standard shopify project structure with a src folder. The structure of the src folder must be

+-- src
|   +-- lib
|   +-- scripts
|   |   +-- packages
|   |   |   +-- [package-name]
|   |   |   | 	index.(js|ts)
|   +-- sections

Where scripts contains JS scripts (like React) and sections contains liquid.

yarn add @inkofpixel/shopify-builder -D

Add this to the scripts of your package.json

"dev": "shopify-builder watch",
"watch-scripts": "shopify-builder watch scripts",
"watch-sections": "shopify-builder watch sections",
"build-scripts": "shopify-builder build scripts",
"build-sections": "shopify-builder build sections"

add

 *.iop.*

to .gitignore

add to theme

<script src="{{ '[package-name].iop.js' | asset_url }}" ></script>
<script src="{{ 'runtime.iop.js' | asset_url }}" ></script>
<script src="{{ 'vendor.iop.js' | asset_url }}" ></script>

Readme

Keywords

none

Package Sidebar

Install

npm i @inkofpixel/shopify-builder

Weekly Downloads

0

Version

0.0.16

License

MIT

Unpacked Size

266 kB

Total Files

16

Last publish

Collaborators

  • macs91
  • federicobadini