Configuration

Configuration file

By default, Nucleus will look for a config.nucleus.json in the current directory. If none is given, default parameters will be used. Also, command line arguments have a greater priority than configuration values.

To easily get your style guide set up, use the step-by-step configuration generator:

nucleus init

Available options

Config file

The configuration file that shall be used.

CLI flag
--config
Default value
config.nucleus.json
Example
nucleus --config styleguide-config.json

Title

Lets you overwrite the title of the style guide.

CLI flag
--title
Config key
title
Default value
Nucleus
Example
nucleus --title StyleBook

Target

Target folder to build the style guide to.

CLI flag
--target
Config key
target
Default value
./styleguide
Example
nucleus --target ./public/styleguide

CSS includes

To preview the components, you need to specify the path (URI) to your CSS file. You may also pass multiple paths as array.

CLI flag
--css
Config key
css
Default value
none
Example
nucleus --css /assets/app.css

Template

If you want customize the generated layout you can copy the [default theme](https://github.com/holidaypirates/nucleus/tree/master/assets/views) and customize it.

CLI flag
--template
Config key
template
Default value
undefined
Example
nucleus --template=./styleguide/my-theme

Placeholder Image Service

Lets you override the default image placeholder service. The value will be used in a template literal, and can accept the width, and height parameters.

CLI flag
--placeholderservice
Config key
placeholderService
Default value
false
Example
nucleus --placeholderService http://placehold.it/${width}x${height}

Static dummy texts and images

For easier visual regression testing, you may disable the generation of randomized lipsum texts and image placeholders. With this option enabled, you will always get the same (boring) placeholders.

CLI flag
--norandom
Config key
staticLipsum
Default value
false
Example
nucleus --norandom

Verbose level

To defines the vebosity level of the console output. For silent output set 0, for debug mode set 3.

CLI flag
--verbose
Config key
verbose
Default value
3
Example
nucleus --verbose 2

Files to crawl

Path to your scss files that nuceleus use for generating source

Config key
files
Default value
["*.scss", "**/*.scss"]

Javascript files includes

To add your javascipt, you need to specify the path (URI) to your Javascript file. You may also pass multiple paths as array.

Config key
scripts
Default value
null
Example
["../js/vendor.js", "../js/app.js"]

Css namespace

If you use a CSS namespace class around your style, it will appear on the parent node preview.

Config key
namespace
Default value
page