All Projects → tmslnz → gulp-shopify-theme

tmslnz / gulp-shopify-theme

Licence: Apache-2.0 license
Shopify theme synchronisation during development

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to gulp-shopify-theme

mechanic-tasks
Public task repository for Mechanic (https://mechanic.dev)
Stars: ✭ 42 (+61.54%)
Mutual labels:  liquid, shopify, liquid-templating-engine
liquidpy
A port of liquid template engine for python
Stars: ✭ 49 (+88.46%)
Mutual labels:  liquid, shopify, liquid-templating-engine
dry
Dry is a new template engine and language, and is a superset of Shopify's Liquid, with first-class support for advanced inheritance features, and more. From the creators of Enquirer, Assemble, Remarkable, and Micromatch.
Stars: ✭ 66 (+153.85%)
Mutual labels:  liquid, shopify, liquid-templating-engine
Moonmail
Email marketing platform for bulk emailing via Amazon SES (Google Cloud Platform and Azure coming soon)
Stars: ✭ 1,766 (+6692.31%)
Mutual labels:  liquid, shopify
Shopify Theme Inspector
A Chrome DevTools plugin that visualizes Shopify Liquid render profiling data so you can triage long-running code and reduce server response times!
Stars: ✭ 102 (+292.31%)
Mutual labels:  liquid, shopify
Concrete
🏗 Concrete Shopify Theme Framework
Stars: ✭ 124 (+376.92%)
Mutual labels:  liquid, shopify
Language Liquid
Liquid language support for Atom.
Stars: ✭ 28 (+7.69%)
Mutual labels:  liquid, shopify
sass-starter-pack
Sass starter files using Gulp v4.0.0 🔥
Stars: ✭ 34 (+30.77%)
Mutual labels:  gulp, gulpjs
liquid
A Python engine for the Liquid template language.
Stars: ✭ 40 (+53.85%)
Mutual labels:  liquid, liquid-templating-engine
bootstrap-shopify-theme
🛍 A free Shopify Theme built with Bootstrap, BEM, Liquid, Sass, ESNext, Theme Tools, ... and Webpack.
Stars: ✭ 41 (+57.69%)
Mutual labels:  liquid, shopify
vscode-liquid
💧Liquid language support for VS Code
Stars: ✭ 137 (+426.92%)
Mutual labels:  liquid, shopify
tomanistor.com
Personal portfolio website and blog created with Hugo
Stars: ✭ 14 (-46.15%)
Mutual labels:  gulp, gulpjs
Slater Theme
Shopify Starter theme based on slate
Stars: ✭ 47 (+80.77%)
Mutual labels:  liquid, shopify
Shopify Modern
A modern template for developing Shopify-themes using Vuejs
Stars: ✭ 136 (+423.08%)
Mutual labels:  liquid, shopify
Jsx Lite
Write components once, run everywhere. Compiles to Vue, React, Solid, Angular, Svelte, and Liquid.
Stars: ✭ 1,015 (+3803.85%)
Mutual labels:  liquid, shopify
lead
Sink your streams.
Stars: ✭ 14 (-46.15%)
Mutual labels:  gulp, gulpjs
gulp-shopify
Blank slate Shopify theme for Developers, packaged with Gulp.js for processing SCSS, JavaScript (ES6), images and fonts. Made to support Online Store 2.0 features and Shopify CLI.
Stars: ✭ 142 (+446.15%)
Mutual labels:  gulp, shopify
Craigstarter
An open source crowdfunding tool built on Shopify
Stars: ✭ 484 (+1761.54%)
Mutual labels:  liquid, shopify
Shopify Lang
Multi-Language Shopify Online Shop
Stars: ✭ 26 (+0%)
Mutual labels:  liquid, shopify
gulp
Gulp Türkçe Çeviri
Stars: ✭ 37 (+42.31%)
Mutual labels:  gulp, gulpjs

gulp-shopify-theme

npm

Gulp Shopify Theme

Gulp.js plugin for Shopify theme development.

Highlights:

  • Asynchronous theme assets uploads.
  • Retry on error.
  • Bulk theme files deletion.
  • Multiple instance support.

Install

$ npm install --save-dev gulp-shopify-theme

Features

  • Queue Shopify API calls respecting the 40-call/burst / 2 call/sec limits
  • Support idiomatic Gulp.js workflow: .pipe(shopifytheme.stream( options ))
  • Support purging all theme files on Shopify (for cleanup and reupload)
  • Multiple instance support. Sync multiple themes via a single gulpfile.js
  • Uses the excellent Microapps' shopify-api-node as the API wrapper

Usage

A working example can be found here: gist.github.com/tmslnz/1d025baaa…

var shopifytheme = require('gulp-shopify-theme').create();
var shopifyconfig = {
    "api_key": "8a1a2001d06ff…",
    "password": "51f8c8de49ee28…",
    "shared_secret": "51f8c8de49ee51…",
    "shop_name": "yourshopname…",
    "theme_id": "12345678…"
}

gulp.task( 'copy', ['shopify-theme-init'], function () {
    return gulp.src( [ 'src/{layout,config,snippets,templates,locales}/**/*.*' ] )
        .pipe( shopifytheme.stream() );
});

gulp.task( 'shopify-theme-init', function () {
    shopifytheme.init(shopifyconfig);
});

gulp.task( 'watch', function () {
	//
	// …watch and compile tasks…
	//

	shopifytheme.on('done', browserSync.reload());
});

Methods

  • shopifytheme.create( options )

    Returns a new instance. The instance will do nothing until .init( options ) is called on it.

  • shopifytheme.init( options )

    Initialises an instance with options. The plugin will wait for, and queue, new files as they come through.

  • shopifytheme.stream( options )

    Use this to stream any theme file to the plugin.

    Options are:

    • batchMode
    • theme_id
     gulp.src( [ 'src/js/*.js' ] )
         .pipe( shopifytheme.stream( {theme_id: 12345} ) )
         .pipe( gulp.dest( 'dist' ) )

    batchMode will force stream() to return the Gulp stream immediately. In this mode you can subscribe to done and error to be notified when all tasks have ended.

    Passing theme_id is optional if you have already passed it to the instance's configuration on init(). However if used it will override the pre-exisiting theme_id. If no theme_id is present an error is thrown.

  • shopifytheme.purge()

    This will delete all theme files from Shopify. Equivalent to going to the Shopify Admin and deleting each file by hand (eww!). Use with caution, of course.

    .purge() honours a blacklist of _un_deletable files (e.g. layout/theme.liquid)

Options

For now it's just API configuration.

Events

The plugin instance emits two events done and error at the end of a sync task queue.

On done the event handler receives the list of files that have successfully synced.
On error the handler is passed whatever error was thrown in the process.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].