Use the Component Generator

Star
The Trowel project is abandonned. Trowel core and the Trowel components are no more maintained or supported. More infos

The Component Generator allows you to quickly create a Trowel Component following the Trowel guidelines.

Installation

First, install Yeoman and generator-trowel using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-trowel

Usage

Once yeoman and generator-trowel installed globaly, you can generate your trowel component :

mkdir trowel-pod
cd trowel-pod
yo trowel

Fill the prompts and then you can kick things out !

Tools

Gulp

For compiling scss into css (and twig into html if you choose to add some twig template) or running a localserver with live reload for local testing, we setup a gulp workflow for you.

# compile scss/twig in watch mode & run local server
gulp watch

Webpack

If you choose to generate some javascript, it comes with a webpack workflow allowing you to write with es6 syntax, as an exportable module and a browser ready script.

# transpile & bundle script file once
npm run build-javascript

# transpile & bundle script file in watch mode
npm run build-javascript-dev