A very opiniated CLI tool to help you build Brindille apps.
npm install -g brindille-cli
From the root of your brindille project in the terminal:
# launches lint (standardjs) watchify and stylus in watch mode
brindille watch
# launches lint (standardjs) watchify and stylus in build mode
brindille build
# scaffolds a MyCompName component in /src/views/components/my-comp-name
brindille component MyCompName
# scaffolds a MyLayout component in /src/views/layouts/my-layout
brindille layout MyLayout
# scaffolds a MySection component in /src/views/sections/my-section
brindille section MySection
The watch
and build
tasks are just wrappers around standardjs linting stylus and browserify with our default configuration and a prettier console output. Error and linting compilations will also be printed directly in the browser (by "replacing" the js built file).
You can optionnaly add browserify transforms to both watch
and build
tasks :
brindille watch babelify glslify
Wa have three different scaffolding functions which are in reality very similar: component
, layout
and section
. The main difference between these is the folder where the component will be created (although a section will have a slightly different codebase than the others).
The name of the component must be in PascalCase.
You can chose to make the component extends brindille-interactive-component instead of brindille-component:
brindille component MyCompName --interactive