bms-theme-kit
v3.1.0
Published
Utility CLI tool to automatically theme upload assets that have been bundled by webpack.
Downloads
13
Readme
Bold ThemeKit
To install
npm install bms-theme-kit --save-dev
Usage
From CLI Run bmstk
You may also pass the additional flags
bmstk --help
Usage: bmstk [options]
Options:
-V, --version output the version number
-c, --cd [cd] Move up one Directory (default: false)
-d, --debug [debug] Enable debugging logs (default: false)
-D, --delete-files [deleteFiles] Delete files on theme (NOTE: this is only for themekit Version > 0.8.0 (default: false)
-e, --env [env] The themekit [environment] to run the command (default: "development")
-f, --file [file] The webpack config file to use (default: "webpack.config.js")
-h, --help output usage information
TODOs
- [x] Check for Theme Version and handle command accordingly ATM two dif Major Versions V7 and V8
- [x] Improve README.MD Documentation for usage
- [x] allow flag to pass theme --env for upload/deploy
About
The goal of this tool is to improve our automated workflow while using webpack and deploying production builds. This npm package will get your current directory using cmd pwd
then require the webpack configuration that is located in that directory.
Once this is loaded in, it will extract the keys from within the entry
object. It will then build a command for theme kit upload
Pre-requisites
- Install npm or yarn
- Theme kit
- Have a webpack.config.js located at your package.json files directory level.
- Have a config.yml present for Themekit
Getting Started
Ensure config.yml is setup accordingly, Here is an example config.yml
development: &COMMON
password:
theme_id:
store:
bucket_size: 40
refill_rate: 2
timeout: 30s
ignore_files:
- config/settings_data.json
- snippets/locksmith-content-variables.liquid
- snippets/locksmith-variables.liquid
- snippets/locksmith.liquid
- layout/*.shogun.*
- snippets/*.shogun.*
- assets/*.shogun.*
- sections/*.shogun.*
staging:
<<: *COMMON
theme_id:
Now Ensure you are within the src directory, from project root cd src
Install node dependencies
# Run this if you are using yarn
$ yarn
# Or run this if you are using npm
$ npm install