gulp-arlo
v0.1.1
Published
Tools to build a simple static site with Gulp
Downloads
11
Maintainers
Readme
gulp-arlo
Tools to build a simple static site with Gulp.
Getting Started
Install with NPM:
npm install --save-dev gulp-arloRequire in your gulpfile.js
const arlo = require('gulp-arlo');Using arlo.mapRoutes
The mapRoutes method will map your html template files to the desired route. This allows you to have a simple src directory structure and still get pretty URLs.
Example of the src directory:
|-- src/
| |-- index.html
| |-- about.html
| |-- contact.htmlExample of the generated dist directory:
|-- dist/
| |-- index.html
| |-- about/
| |-- index.html
| |-- contact/
| |-- index.htmlHere's the build task using arlo.mapRoutes:
gulp.task('build', () => {
return gulp.src('./src/*.html')
.pipe(arlo.mapRoutes({
'index.html': '/'
'about.html': '/about',
'contact.html': '/contact',
}))
.pipe(gulp.dest('./dist'));
});