Skip to content

Instantly share code, notes, and snippets.

@allmarkedup
Last active February 23, 2016 01:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allmarkedup/f82113aa04bb39373925 to your computer and use it in GitHub Desktop.
Save allmarkedup/f82113aa04bb39373925 to your computer and use it in GitHub Desktop.
Custom theme development in Fractal
'use strict';
const fractal = require('@frctl/fractal');
//.... other config items
fractal.set('plugins.web.theme', 'example-theme');
@allmarkedup
Copy link
Author

The theme needs to be NPM installed into your node_modules folder. If you are developing a theme locally, then the npm link command is your friend:

  1. In your theme folder, make sure it has a package.json with a valid project name in it (e.g. example-theme)
  2. Within your theme folder, run the command npm link
  3. Then switch to your fractal project directory, and run npm link example-theme

You can then edit your theme locally and the changes will show up in your fractal web UI.

Also, when not developing, note that you can npm install from a github repo, it doesn't need to be published as an NPM module. You can do npm install http://github.com/username/repo and it will pull it in from there (provided there is a valid package.json file present).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment