gulp-web/README.md

42 lines
710 B
Markdown
Raw Permalink Normal View History

2020-05-20 17:15:45 +00:00
## Features
2020-05-01 14:30:14 +00:00
* JS transpilation, minification with Babel, Terser.
* SASS compilation, css minification.
2020-05-19 15:17:41 +00:00
* HTML file includes.
2020-05-19 14:58:29 +00:00
* Mustache templating
2020-05-19 16:17:40 +00:00
* SVG optimisation.
2020-05-01 14:30:14 +00:00
* BrowserSync.
2020-05-01 17:53:06 +00:00
2020-05-20 17:15:45 +00:00
### TODO
2020-05-01 17:53:06 +00:00
* Image optomisation.
2020-05-19 14:58:29 +00:00
2020-05-20 17:15:45 +00:00
## Usage
2020-05-20 17:16:25 +00:00
### Build Directory
Default build directory is `./build`. To change edit `gulpfile.js`.
2020-05-20 17:15:45 +00:00
### HTML File Includes
2020-05-19 15:17:41 +00:00
Uses [gulp-file-include - npm](https://www.npmjs.com/package/gulp-file-include).
Include file with:
```
@@include('./logo.svg')
```
Files are relative to the include directory: `src/includes/`.
2020-05-19 14:58:29 +00:00
2020-05-20 17:15:45 +00:00
### Mustache Templates
2020-05-19 14:58:29 +00:00
Include a template with:
```
{{> templates/example}}
```
Templates are relative to the HTML file and the `.mustache` extension must be
ommitted.