This is a boilerplate for developing complex themes/applications for the Ghost Publishing Platform
The boilerplate supports typescript, cssnext, Sass, and ES6 out of the box. Tests, Linting, typecheckers, etc are left for the user to configure.
To use this boilerplate you need to have
- Clone the boilerplate and install the dev-dependencies
$ mkdir my-theme
$ git clone git@github.com:villiampoignant/Ghost-Theme-Webpack-Boilerplate.git ./my-theme
$ cd my-theme
$ npm install
-
Update package.json according to reference your own project
-
Create a symlink to your ghost server install directory
$ ln -s /full/path/to/my-theme/dist /full/path/to/ghost-install-dir/content/themes/my-theme
$ npm run dev
will do the following:
- Compile all code in
./src/app
to./dist/assets/app.js
. - Copy over everyting in
./src/theme/
to./dist/
. - Watch
./src
for changes. - Start a Live Reload server.
If you have symlinked the ./dist
folder to your ghost's theme dir and enabled the theme, you should have fully functional Live Reload on http://localhost:2368/
Build scripts:
$ npm run build
:
- Compile and minify
./src/app
to./dist
- Copy everyting in
./src/theme/
to./dist/
$ npm run zip
:
- Zips
./dist
to./dist-zipped/[my-theme].zip
$ npm run build:zip
:
- Runs
$ npm run build
- Runs
$ npm run zip
(who could have guessed.. 😏)
If you have any questions, improvments or comments, please send me a PM or PR.
Me 🌞
This project is licensed under the MIT License - see the LICENSE.md file for details
- Tests
- Static Typecheckers for JS