Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
christian-slater
Advanced tools
A Shopify development toolkit.
This project is an active work in progress! The CLI is stable, but the theme itself is not.
Want to help? We'd love to have you. Ideas, feedback, critiques 👉 shoot us an Issue.
npm i christian-slater -g
The easist way to get started with christian-slater is christian-slater init
. init
outputs a
default folder structure into the directory of your choice.
christian-slater init <root>
Don't forget to install the dependencies.
npm install
You'll need to define one or more themes in the provided slater.config.js
file
to deploy to, similar to a standard Shopify config.yml
file.
module.exports = {
themes: {
development: {
id: '12345...',
password: 'abcde...',
store: 'store-name.myshopify.com',
ignore: [
'settings_data.json'
]
}
}
}
Then, from the project root:
christian-slater watch
And that's it! christian-slater will watch your local theme for changes and sync them to your remote site when they update 🎉.
christian-slater makes some assumptions out of the box, but it can be easily customized to fit most existing projects.
christian-slater projects require themes to be defined in the
slater.config.js
.
By default it looks for a theme called development
:
module.exports = {
themes: {
development: { ... }
}
}
You can call it whatever you want though.
module.exports = {
themes: {
dev: { ... }
}
}
Just be sure to specify your theme name on the CLI:
christian-slater build --theme dev
You can also define as many themes as you like. Use these for a production theme, staging, or whatever you like.
module.exports = {
themes: {
dev: { ... },
test: { ... },
live: { ... }
}
}
All theme files should be located within a single source directory. By default,
christian-slater looks for a /src
directory in your project root.
To adjust this, specify an in
prop on your config:
module.exports = {
in: '/source'
}
Files within this directory will be built and copied to /build
in
your project root, and then synced to your remote theme.
To adjust your local build directory, specify an out
prop on your config:
module.exports = {
out: '/dist'
}
christian-slater uses Webpack internally to compile a single JavaScript entry point. By
default, it looks for /src/scripts/index.js
.
You can specify a different entry point using the assets
object on your
config:
module.exports = {
assets: {
in: '/source/scripts/index.js'
}
}
christian-slater uses PostCSS by default. It's configured to allow SASS-like nesting, in addition to all modern CSS goodies.
To compile your styles, simply import your root stylesheet into your JavaScript entrypoint:
import '../styles.css'
// rest of your project scripts
You can also use SASS. Simple specify the sass
preset in your assets config:
module.exports = {
assets: {
presets: [
'sass'
]
}
}
To make your JavaScript a little easier to work with, christian-slater supports alias definitions and environment variables.
module.exports = {
alias: {
components: './src/scripts/components'
},
env: {
API_KEY: 'abcde...'
}
}
Which you can then use in your JavaScript like this:
import api from 'components/api.js'
const fetcher = api({
key: API_KEY
})
For convenience, there's also a built-in alias @
that points to the directory
containing your JavaScript entry point.
Keep in mind, these environment variables are public, so don't use them for any secret keys, passwords, or any value that you need to keep private!
watch
Watches for file changes and syncs updates to your specified theme.
christian-slater watch
build
Compiles assets and copies all files from the config.in
directory to the
config.out
directory.
christian-slater build
sync
Sync local files or directories to your remote theme. A direct interface to
[@christian-slater/sync], which @christian-slater/cli
uses internally.
christian-slater sync build/snippets/hero.liquid # file
christian-slater sync build/snippets # directory
christian-slater sync # defaults to config.out
Any of the core commands can be combined with the following options:
--config <path>
- specify the path to your config file--theme <name>
- specify a named theme from your config fileTo deploy a theme, combine the above commands as needed:
christian-slater build && christian-slater sync --theme production
christian-slater
uses an local SSL certification to correspond with Shopify's HTTPS
hosted themes. To take advantage of live-reloading, you need to create a
security exception for the christian-slater
cert (this is safe). To do this, load
https://localhost:3000 in your browser, and follow
the instructions for adding an exception. If it works, you should see this in
your browser window:
christian-slater running
Adding christian-slater to any existing Theme
The following sites were built using some version of christian-slater. Send us a PR to add to this list!
Eric Bailey |
Kevin Green |
MIT License © The Couch
FAQs
A Shopify development toolkit
We found that christian-slater demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.