Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Latest commit

 

History

History
45 lines (27 loc) · 1.62 KB

CONTRIBUTING.md

File metadata and controls

45 lines (27 loc) · 1.62 KB

Contributing

Tools & Workflow

The workflow to test into a browser the component is setted with gulp (and webpack for the javascript part).

All the files versionned for live testing are written ./test/src folder. The gulp workflow will generate, from those files, a ./test/dest used by a local server (running via gulp) to renderer into your browser the component.

You have several commands for making the ./test/dest folder :

# run gulp tasks to build the `./test/dest` folder
npm run test

# run gulp tasks to build the `./test/dest` folder in watch mode, and setup a localserver with livereload
npm start

Thoses commands generates css for the ./test folder and for the ./dest folder (in normal and minified version).

Javascript

Javascript is transpiled and packaged with webpack. The workflow setuped here allow us to generate a script file browser-friendly into the ./dest/javascript folder from a es2015 friendly (ready to be included in packaged workflows) script located at ./src/javascript.

Here are the two commands for working with the javascript :

# builds the browser-friendly javascript file
npm run build-javascript

# builds the browser-friendly javascript file in watch mode
npm run build-javascript-dev

Thoses commands generates javascript for the ./test folder and for the ./dest folder (in normal and minified version).

Writing a Trowel Component

Checkout the documentation from the trowel-core project, to learn about how writting a Trowel Component

Good practices

To be written