{"id":14982154,"url":"https://github.com/tmslnz/gulp-shopify-theme","last_synced_at":"2025-10-29T11:31:14.688Z","repository":{"id":143801527,"uuid":"68969447","full_name":"tmslnz/gulp-shopify-theme","owner":"tmslnz","description":"Shopify theme synchronisation during development","archived":false,"fork":false,"pushed_at":"2018-08-03T17:50:16.000Z","size":301,"stargazers_count":24,"open_issues_count":4,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-28T06:42:00.062Z","etag":null,"topics":["gulp","gulpjs","liquid","liquid-templating-engine","shopify"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmslnz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-22T23:07:38.000Z","updated_at":"2024-02-03T01:06:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc3fd35f-069a-45c8-a19a-5c631b9030c0","html_url":"https://github.com/tmslnz/gulp-shopify-theme","commit_stats":{"total_commits":67,"total_committers":2,"mean_commits":33.5,"dds":0.04477611940298509,"last_synced_commit":"c95bb42d20d35a36324127c711004e7203933138"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmslnz%2Fgulp-shopify-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmslnz%2Fgulp-shopify-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmslnz%2Fgulp-shopify-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmslnz%2Fgulp-shopify-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmslnz","download_url":"https://codeload.github.com/tmslnz/gulp-shopify-theme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219857795,"owners_count":16556052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gulp","gulpjs","liquid","liquid-templating-engine","shopify"],"created_at":"2024-09-24T14:04:52.992Z","updated_at":"2025-10-29T11:31:14.372Z","avatar_url":"https://github.com/tmslnz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://imgur.com/asPMNcE.png\" alt=\"gulp-shopify-theme\" width=\"363\" height=\"140\"/\u003e\n\n[![npm](https://img.shields.io/npm/v/gulp-shopify-theme.svg?maxAge=2592000?style=flat-square)](https://www.npmjs.com/package/gulp-shopify-theme)\n\n# Gulp Shopify Theme\n\n[Gulp.js](https://gulpjs.com) plugin for Shopify theme development.\n\nHighlights:\n\n- Asynchronous theme assets uploads.\n- Retry on error.\n- Bulk theme files deletion.\n- Multiple instance support.\n\n## Install\n\n```shell\n$ npm install --save-dev gulp-shopify-theme\n```\n\n## Features\n\n- Queue [Shopify API][sapi] calls respecting the 40-call\u003csmall\u003e/burst\u003c/small\u003e / 2 call\u003csmall\u003e/sec\u003c/small\u003e limits\n- Support idiomatic Gulp.js workflow: `.pipe(shopifytheme.stream( options ))`\n- Support purging all theme files on Shopify (for cleanup and reupload)\n- Multiple instance support. Sync multiple themes via a single `gulpfile.js`\n- Uses the excellent Microapps' [`shopify-api-node`](https://github.com/microapps/Shopify-api-node) as the API wrapper\n\n## Usage\n\nA working example can be found here: [gist.github.com/tmslnz/1d025baaa…](https://gist.github.com/tmslnz/1d025baaa7557a2d994032aa88fb61b3)\n\n```js\nvar shopifytheme = require('gulp-shopify-theme').create();\nvar shopifyconfig = {\n    \"api_key\": \"8a1a2001d06ff…\",\n    \"password\": \"51f8c8de49ee28…\",\n    \"shared_secret\": \"51f8c8de49ee51…\",\n    \"shop_name\": \"yourshopname…\",\n    \"theme_id\": \"12345678…\"\n}\n\ngulp.task( 'copy', ['shopify-theme-init'], function () {\n    return gulp.src( [ 'src/{layout,config,snippets,templates,locales}/**/*.*' ] )\n        .pipe( shopifytheme.stream() );\n});\n\ngulp.task( 'shopify-theme-init', function () {\n    shopifytheme.init(shopifyconfig);\n});\n\ngulp.task( 'watch', function () {\n\t//\n\t// …watch and compile tasks…\n\t//\n\n\tshopifytheme.on('done', browserSync.reload());\n});\n\n```\n\n### Methods\n\n- shopifytheme.**create( _options_ )**\n\n\tReturns a new instance. The instance will do nothing until `.init( options )` is called on it.\n- shopifytheme.**init( _options_ )**\n\n\tInitialises an instance with `options`. The plugin will wait for, and queue, new files as they come through.\n- shopifytheme.**stream( _options_ )**\n\n\tUse this to stream any theme file to the plugin.\n\n\tOptions are:\n\t\n\t- batchMode\n\t- theme_id\n\n\t```js\n\tgulp.src( [ 'src/js/*.js' ] )\n        .pipe( shopifytheme.stream( {theme_id: 12345} ) )\n        .pipe( gulp.dest( 'dist' ) )\n\t```\n\n\t`batchMode` will force `stream()` to return the Gulp stream immediately.\n\tIn this mode you can subscribe to `done` and `error` to be notified when all tasks have ended.\n\n\tPassing **`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.\n\n\n- shopifytheme.**purge()**\n\n\tThis will **delete** all theme files from Shopify. Equivalent to going to the Shopify Admin and deleting each file by hand (eww!).\n\tUse with caution, of course.\n\n\t`.purge()` honours a blacklist of _un_deletable files (e.g. `layout/theme.liquid`)\n\n### Options\n\nFor now it's just API configuration.\n\n- **apiKey**\n- **password**\n- **shopName**\n- **themeId**\n- **autoLimit** (see [`shopify-api-node`](https://www.npmjs.com/package/shopify-api-node))\n- **timeout**\n\n### Events\n\nThe plugin instance emits two events `done` and `error` at the end of a sync task queue.\n\nOn `done` the event handler receives the list of files that have successfully synced.  \nOn `error` the handler is passed whatever error was thrown in the process. \n\n[sapi]: https://help.shopify.com/api/reference/asset\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmslnz%2Fgulp-shopify-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmslnz%2Fgulp-shopify-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmslnz%2Fgulp-shopify-theme/lists"}