node package manager
Loosely couple your services. Use Orgs to version and reuse your code. Create a free org »

gulp-strapr

gulp-strapr

NPM version Build Status Coverage Status Dependency Status

strapr plugin for gulp

Usage

First, install gulp-strapr as a development dependency:

npm install --save-dev gulp-strapr

Then, add it to your gulpfile.js:

var strapr = require("gulp-strapr");
 
gulp.src('sample/*.html')
    .pipe(strapr({
   'host': 'http://localhost:5000', // Adress of the server hosting strapr 
   'headTemplateSrc': './sample/layout.html', // Src of the template containing your <head> 
   'headTemplateDest': './app/html/layout.html', // Dest of the template containing you <head> 
   'stylesheetDest': './app/css', // Dest of the stylesheet containg styles for used components 
   'stylesheetIncludeUrl': '/css/stylesheet.css', // Url to stylesheet dest for include in your html 
   'javascriptDest': './app/js', // Dest of the javascript containg scripts for used components 
   'javascriptIncludeUrl': '/js/javascript.js' // Url to javascript dest for include in your html 
    }))
    .pipe(gulp.dest('app/html'));

strapr(attrs)

host

Type: String
Default: http://localhost:5000

The address of the server running strapr

headTemplateSrc

Type: String
Default: ./sample/layout.html

path to folder containg your layout template.
used to inject stylesheet link and script src.

headTemplateDest

Type: String
Default: ./public/templates/layout.html

Path to folder where finished layout template should be written

stylesheetDest

Type: String
Default: ./sample/app/css

Path to folder where finished stylesheet should be written

stylesheetIncludeUrl

Type: String
Default: /css/stylesheet.css

Url to use in stylesheet include

javascriptDest

Type: String
Default: ./sample/app/js

Path to folder where finished javascript should be written

javascriptIncludeUrl

Type: String
Default: /js/javascript.js

Url to use in script src

License

MIT License