|
1 | 1 | # StreamBuilder |
2 | 2 |
|
3 | | -##What it is |
4 | | -StreamBuilder is an automated build environment well suited for HTML, CSS and JavaScript prototyping. It runs on the (streaming) build system [Gulp.js](https://gulpjs.com/) and comes with goodies like [SASS](https://sass-lang.com/) and [Nunjucks](https://mozilla.github.io/nunjucks/). |
| 3 | +## What it is |
| 4 | +StreamBuilder is an automated build environment well suited for HTML, CSS and JavaScript prototyping. It runs on the (streaming) build system [Gulp](https://gulpjs.com/) and comes with goodies like the [SASS](https://sass-lang.com/) CSS extension language and the [Nunjucks](https://mozilla.github.io/nunjucks/) template language. |
5 | 5 |
|
6 | | -*__StreamBuilder focuses on four tasks to make your job easier.__* |
| 6 | +## What it does |
7 | 7 |
|
8 | | -1. Compile SCSS into CSS and outpu to the destination folder. |
9 | | -2. Output JavaScript to the destination folder. |
10 | | -3. Compile Nunjuck templates into HTML pages and output them to the pages folder. Keepin' it DRY! |
11 | | -4. In your browser, inject the changed CSS into the HTML and update your view. |
| 8 | +By working in the `/src` directory all of your changes are piped and rendered to the `/dest` folder. |
12 | 9 |
|
13 | | -*__StreamBuilder's workflow__* |
| 10 | +- `/src/scss` -> `/dest/css` |
| 11 | +- `/src/js` -> `/dest/js` |
| 12 | +- `/src/pages` -> `/dest/` |
| 13 | +- `/src/img` -> `/dest/img` |
| 14 | +- It even refreshes your browser on every change! |
14 | 15 |
|
15 | | -You work from the /src directory and everytime you save a file; be it SCSS, JavaScript or Nunjuck template, StreamBuilder compiles SCSS into CSS, and places compiled JavaScripts and HTML files in the /dist directory. |
| 16 | +## Requirements |
16 | 17 |
|
17 | | -##Requirements |
18 | 18 | Requires [Nodejs](https://nodejs.org/) |
19 | 19 |
|
20 | | -Note: if you run GNU/Linux you can now get the most recent version of Node with your [package manager](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager). |
21 | | - |
22 | | -##Getting Started |
23 | | -1. Download this repo to your development environment. |
24 | | -2. Install the node modules listed in the package.json file globally. I.e., `sudo npm install -g <node_module>` |
25 | | -3. From a terminal `cd path/to/streambuilder` |
26 | | -4. `npm update` This will create a new directory "node_modules" where NPM will install all the required node modules. |
27 | | -5. Edit the config.json file to reflect your destination URL. |
28 | | -6. Run `gulp` |
| 20 | +## Getting Started |
| 21 | +- Download this repo to your development environment. |
| 22 | +- Install the node modules listed in the package.json file globally. I.e., `sudo npm install -g <node_module>` |
| 23 | +- From a terminal `cd path/to/streambuilder` |
| 24 | +- Run `npm install` This will create a new directory "node_modules" where NPM will install all the required node modules. |
| 25 | +- Edit the paths variable in the `gulpfile.js` file to reflect your `src` and `dest` paths as well as your application URL. |
| 26 | +- Run `gulp` |
29 | 27 |
|
30 | 28 | ## Advanced configuration |
31 | | -You can change anything and everything about StreamBuilder by editing the gulpfile.js. By default StreamBuilder compiles everything to the /dist folder. You can chage this behavior (as well as the URL of the project) by editing the `conf_xyz_dest` vars in the top of gulpfile.js. |
| 29 | +You can change anything and everything about StreamBuilder by editing the gulpfile.js. By default StreamBuilder compiles everything to the /dest folder. You can chage this behavior (as well as the URL of the project) by editing the `paths` vars in the top of gulpfile.js. |
| 30 | + |
| 31 | +StreamBuilder comes bundled with SASS and Nunjucks support. You can change this by removing the gulp-scss modules and installing the css pre-processor and template language of your choice then editing the tasks in gulpfile.js. You can find additional modules at [NPM](https://www.npmjs.com/). |
32 | 32 |
|
33 | | -StreamBuilder comes bundles with SCSS and Nunjucks support. You can change this by removing the gulp-scss modules and installing the css pre-processor and template language of your choice then editing the tasks in gulpfile.js. You can find additional modules at [NPM](https://www.npmjs.com/). |
| 33 | +### Goodies |
| 34 | +- Out of the box StreamBuilder will create a single page website. Not a very pretty one, but a simple one to get you started. |
| 35 | +- Some handy SASS mixins |
| 36 | + - simple-grid() creates a very simple css grid. |
| 37 | + - simple-flex() for vertical/horizontal placement of block elements. |
| 38 | + - remCalc() to control font sizes based on the default rem. |
34 | 39 |
|
35 | | -##Goodies |
36 | | -Out of the box StreamBuilder will create a single page website. |
| 40 | +Instructions for the mixins are in the `/src/scss/components/_mixins.scss` file. And examples are included in the `src/scss/app.scss` and `/src/pages/index.njk` files. |
37 | 41 |
|
38 | | -##Getting Help |
| 42 | +#### Getting Help |
39 | 43 | If you find a bug or want to see a feature, file it in the [issues section](https://github.com/digi-brains/StreamBuilder/issues). |
0 commit comments