Giter VIP home page Giter VIP logo

gulp-bundle-assets-express-middleware's Introduction

gulp-bundle-assets-express-middleware NPM version

Express middleware for gulp-bundle-assets

Install

npm install --save gulp-bundle-assets-express-middleware

Usage

var gulpBundleAssets = require('gulp-bundle-assets-express-middleware');
var express = require('express');
var app = express();
// ... configure view engine

// configure "bundle" view property on every response
// to contain the contents of "bundle.result.json"
app.use(gulpBundleAssets());

app.get('/', function(req, res) {
  res.render('index', { title: 'My App' });
});

app.listen(3000);

See here for a detailed explanation

API

resultPath

Type: string

Default: <fully qualified path of file where call was made from>/bundle.result.json

If your app is not in the same directory as your bundle.result.json, simply provide the fully qualified path to its location, e.g.:

app.use(gulpBundleAssets(path.join(__dirname, '../bundle.result.json')));

License

MIT

gulp-bundle-assets-express-middleware's People

Contributors

chmontgomery avatar

Watchers

Yuriy Nemtsov avatar  avatar Bobby Kostadinov avatar Philipp Adrian avatar Hrusikesh Panda avatar James Cloos avatar Sam Scherer avatar Adam Bedell avatar David Da Costa avatar Peran Osborn avatar Dylan Roy avatar Kuber Kaul avatar Tyler Paige avatar Vishal Shah avatar Sameer C avatar Joe Kendall avatar  avatar  avatar Vishaal avatar Swetha Kolli avatar  avatar Marcin Pawelek avatar Chris Tersteeg avatar Mendel Konikov avatar Scott McFarlane avatar Dominique Boucher avatar Zhenyu Du avatar Johnny Hsu avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.