gulp-arlo

0.1.1 • Public • Published

gulp-arlo

Tools to build a simple static site with Gulp.

Getting Started

Install with NPM:

npm install --save-dev gulp-arlo

Require 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.html

Example of the generated dist directory:

|-- dist/
|    |-- index.html
|    |-- about/
|         |-- index.html
|    |-- contact/
|         |-- index.html

Here'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'));
});

Dependencies (2)

Dev Dependencies (2)

Package Sidebar

Install

npm i gulp-arlo

Weekly Downloads

1

Version

0.1.1

License

none

Last publish

Collaborators

  • joelcolucci