Giter VIP home page Giter VIP logo

shopify-vue's Introduction

Shopify Vue

Starter repository for Shopify/Vue theme development

Features

  • Nested folder structures
  • PostCSS/ES6 processing
  • Live reload w/ BrowserSync
  • Full Vue/Vuex support

Setup

To get started clone the repository.

git clone https://github.com/alexcasche/shopify-vue.git

Install the depencies

yarn install

Run zip command and create new theme in Shopify from theme.zip.

yarn run zip

Add config.yml with your theme settings.

development:
  password: [DEV_PASSWORD]
  theme_id: [DEV_THEME]
  store: [DEV_SHOP]
  ignore_files:
    - settings_data.json

Update browserSync.js with your Shopify info

const browserSync = require("browser-sync");
const BASE_URL = "[DEV_SHOP]";
const PREVIEW_QUERY = "?preview_theme_id=[DEV_THEME]";

browserSync({
  proxy: `${BASE_URL}${PREVIEW_QUERY}`,
  files: "browserUpdate.js"
});

Run start command and local changes will be pushed.

yarn start

Development

If your Shopify theme is up to date with you local project, run the watch command instead of start.

yarn watch

Vue Integration

All Vue files will live under the src/vue directory. Vue comopnents can be mounted anywhere in shopify and can be passed external props from liquid.

<vue-custom-element prop="{{ liquid_var }}"></vue-custom-element>

Notes

The browserUpdate.js file is used to trigger BrowserSync reloads. It should not be edited.

Resources

This repo utilizes the awesome library vue-custom-element.

shopify-vue's People

Watchers

 avatar

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.