No project description provided
Project description
29 Next Theme Kit
Theme Kit is a cross-platform command line tool to build and maintain storefront themes with Sass Processing support on the 29 Next platform.
Installation
Theme Kit is a python package available on PyPi
If you already have python
and pip
, install with the following command:
pip install next-theme-kit
Mac OSX Requirements
See how to install python
and pip
with HomeBrew. Once you have completed this step you can install using the pip
instructions above.
Windows Requirements
See how to install python
and pip
with Chocolatey. Once you have completed this step you can install using the pip
instructions above.
Updating Theme Kit
Update to the latest version of Theme Kit with the following command:
pip install next-theme-kit --upgrade
Usage
With the package installed, you can now use the commands inside your theme directory and work on a storefront theme.
Available Commands
ntk init
- initialize a new thementk list
- list all available themesntk checkout
- checkout an existing thementk pull
- download existing theme or theme filentk push
- push current theme state to storentk watch
- watch for local changes and automatically push changes to storentk sass
- process sass to css, see Sass Processing
Important - You must pass the apikey
and store
parameters for all commands if there is not an existing config.yml
file in your current directory.
Init
Initialize a new theme which will create the theme on a store and create an initial config.yml file
ntk init --name="<Theme Name>" --apikey="<api key>" --store="<https://storedomain.com>"
Required flags without config.yml
Short | Long | Description |
---|---|---|
-a | --apikey | API Key used to connect to the store. |
-s | --store | Full domain of the store. |
-n | --name | Name of the new theme |
List
List all themes installed on the theme.
ntk list --apikey="<api key>" --store="<https://storedomain.com>"
Required flags without config.yml
Short | Long | Description |
---|---|---|
-a | --apikey | API Key used to connect to the store. |
-s | --store | Full domain of the store. |
Checkout
Checkout a theme from your store to pull it into your directory.
ntk checkout --theme_id=<id> --apikey="<api key>" --store="<https://storedomain.com>"
Required flags without config.yml
Short | Long | Description |
---|---|---|
-a | --apikey | API Key used to connect to the store. |
-s | --store | Full domain of the store. |
-t | --theme_id | ID of the theme. |
Pull
Pull a theme from your store to into your directory.
ntk pull --theme_id=<id> --apikey="<api key>" --store="<https://storedomain.com>"
Required flags without config.yml
Short | Long | Description |
---|---|---|
-a | --apikey | API Key used to connect to the store. |
-s | --store | Full domain of the store. |
-t | --theme_id | ID of the theme. |
Push
Push all theme files from your local directory to the store.
ntk push --theme_id=<id> --apikey="<api key>" --store="<https://storedomain.com>"
Required flags without config.yml
Short | Long | Description |
---|---|---|
-a | --apikey | API Key used to connect to the store. |
-s | --store | Full domain of the store. |
-t | --theme_id | ID of the theme. |
Watch
Watch for file changes and additions in your local directory and automatically push them to the store.
ntk watch --theme_id=<id> --apikey="<api key>" --store="<https://storedomain.com>"
Required flags without config.yml
Short | Long | Description |
---|---|---|
-a | --apikey | API Key used to connect to the store. |
-s | --store | Full domain of the store. |
-t | --theme_id | ID of the theme. |
Sass
Process sass
files to CSS files for inclusion in your storefront. See Sass Processing for more details.
ntk sass
Optional flags
Short | Long | Description |
---|---|---|
-sos | --sass_output_style | Options are nested, expanded, compact, or compressed |
Sass Processing
Theme kit includes support for Sass processing via Python Libsass. Sass processing includes support for variables, imports, nesting, mixins, inheritance, custom functions, and more.
How it works
- Put
scss
files in top levelsass
directory. - Run
ntk sass
orntk watch
to process themesass
files. - Top level
scss
files will be processed tocss
files in the asset directory with the same name.
Example Theme with Sass Structure
├── assets
│ ├── styles.css // reference this asset file in templates
├── sass
│ ├── _base.scss
│ ├── _variables.scss
│ └── styles.scss // processed to assets/main.css
Important - Sass processing is only supported on local, files in the sass
directory are uploaded to your store for storage but cannot be edited in the store theme editor.
Configure Default Output Style
Change the default sass output style in config.yml
, example below.
development:
apikey: <api key>
sass:
output_style: compressed // options: nested, expanded, compact, or compressed
store: <store url>
theme_id: <theme id>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for next_theme_kit-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a61712be8b17127437281667d2ec7ebf10439472f841bce2fa72e4a2771e0063 |
|
MD5 | 3374d26b77e6cba21110ae788e768275 |
|
BLAKE2b-256 | 6286198e7a62e3ef91f917896350303aa01d3ec12f3e845ee6c5bea8358e3e03 |