This is a kit to help extend and customize the Space Shopify theme. You will need to have a valid copy of Space installed on your Shopify account in order to use this.
Space has a number of useful features that make it a developer friendly theme to work with out of the box.
- Fast and reliable: From the very beginning, we've made sure Paper works fast and reliably by using the latest browser-supported features. Don't worry if you're still using an older browser, our progressive enhancement ensures you'll still have the best experience.
- Works with JavaScript disabled: We want everyone to have access to your store, so we've minimized the use of JavaScript. Even if someone has disabled JavaScript, we've got you covered with excellent fallbacks for core functionality.
- Easily extendable: We've built Paper with a modular approach, so it's super simple to extend and customize. We use Tailwind CSS to give you an easy approach to styling, and Alpine.js to add interactivity without weighing you down.
- Meets all standards for theme store: Paper meets all the requirements for the Shopify theme store.
Make sure all dependencies have been installed before moving on:
- NPM (6.0.0 or higher)
- Node.js (16.0.0 or higher)
- Shopify CLI (3.0.0 or higher)
- Purchase Space from the Shopify theme store and create a duplicate
- Clone this repo
- Replace
brickspacetestingstore.myshopify.com
inpackage.json
with your Shopify store URL - Run
npm install
to install dependencies - Run
npm run pull
to download the your theme (be sure to select the theme that has Space installed) - Run
npm run dev
to create a development preview - Run
npm run build
to build production ready assets
Consider using recommened development envitorment for a consistent experience.
- Use Cursor
- Install extensions from
.vscode/extensions.json
- Consider using recommended settings
- Open cursor settings by clicking
CMD + ,
then clicking Open Settings (JSON) - Paste in the settings from below code snippet
- Open cursor settings by clicking
{
"window.commandCenter": 1,
"editor.fontSize": 14,
"scm.inputFontSize": 14,
"debug.console.fontSize": 14,
"chat.editor.fontSize": 14,
"terminal.integrated.fontSize": 14,
"editor.tabSize": 2,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"": "",
"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, .gitattributes, .shopifyignore, postcss.config.js, tailwind.config.js, tsconfig.json, vite.config.ts, .gitignore, .theme-check.yml, release-notes.md, next-env.d.ts, turbo.json, vercel.json, *config.cjs, .prettierrc"
},
"[liquid]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"editor.formatOnSave": true
}
Automatic code formatting should be enabled by default if you follow above steps.
- Install Prettier
- Ensure
editor.formatOnSave
is enabled in Cursor settings. Yoursettings.json
should include the following:
"[liquid]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"editor.formatOnSave": true
Task Name | Description |
---|---|
npm run dev |
Run development preview |
npm run build |
Build prodution assets |
npm run test |
Run tests |
Use npm run dev
to setup a development preview that refreshes your CSS and JavaScript as you make changes. This is the best way to implement more in-depth changes on Paper. You should also consider implementing the GitHub integration into your workflow.
Paper uses a naming convention to help keep things organized. We use the following prefixes to help identify the files in our /snippet
folder.
components__
: Components are reusable pieces of code that can be used in multiple places. Most of our components are used in multiple places throughout the theme.theme__
: Theme files are only ever used in thetheme.liquid
file. These are global snippets that appear on every page of your theme.script__
: Script files contain small snippets of JavaScript that are used throughout the theme.article__
,collection__
,product__
: Article, collection and product files are used in their respecitive templates only.header__
: Header files are used to within the header of your theme.
Section files follow a similar naming convention.
- Section files prefixed with a keyword and a double underscore are only used in their respecitve template files. E.g.
collection__banner.liquid
is only used in thecollection.liquid
file.
- Use the
theme__styles.liquid
file to update or edit theme-wide CSS variables.
- For debugging there are Chrome and Firefox browser extensions available.
- For an extensive list of Alpine resources take a look at this repo.