Giter Club home page Giter Club logo

shopify-vue-cart's Introduction

Shopify Vue Cart

Reusable Vue.js shopping cart component for Shopify theme development.

JavaScript Style Guide Packagist

Setup

1). Clone repo and add to local project

git clone https://github.com/alexcasche/shopify-vue-cart
mv -r shopify-vue-cart/src/js/shopify-vue-cart [project-root-dir]/src/js
cd [project-root-dir]/src/js/shopify-vue-cart && yarn install

2). Update project's package.json to include:

  "@babel/core": "^7.1.0",
  "@babel/preset-env": "^7.1.0",
  "babel": "^6.23.0",
  "gulp": "^3.9.1",
  "gulp-babel": "^8.0.0",
  "gulp-notify": "^3.2.0",
  "gulp-plumber": "^1.2.0",
  "gulp-sourcemaps": "^2.6.4",
  "gulp-uglify": "^3.0.1"

3). Update project's gulpfile to include:

var gulp = require('gulp'),    
    babel = require('gulp-babel'),
    plumber = require('gulp-plumber'),
    sourcemaps = require('gulp-sourcemaps'),
    uglify = require('gulp-uglify'),
    notify = require('gulp-notify');


gulp.task("vue-cart", function() {
    return gulp.src([
        'src/js/vue-cart/dist/vue-cart.js',     
    ])
    .pipe(sourcemaps.init())
    .pipe(plumber({errorHandler: notify.onError("Error: <%= error.message %>")}))
    .pipe(babel({
        presets: ['@babel/env']
    }))
    .pipe(uglify())
    .pipe(sourcemaps.write("."))
    .pipe(plumber.stop())
    .pipe(gulp.dest("assets"));
})

gulp.task('watch', function() {
    gulp.watch("src/js/vue-cart/dist/vue-cart.js", ['vue-cart']);
});

TODO: Add liquid instructions

Development

Run following commands in separate terminals tabs

theme watch
gulp watch
cd src/js/shopify-vue-cart && yarn dev

shopify-vue-cart's People

Contributors

alexcasche avatar

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.