From 92f24fda2f3bcfb0d852d87d7727c6d5fca2d091 Mon Sep 17 00:00:00 2001 From: Josiah Sprague Date: Tue, 11 Nov 2014 18:32:22 -0500 Subject: [PATCH] add hbsfy transform to package.json remove it from everywhere else and add it to package.json so that when the module is included in other projects the transform is automatically locally applied and doesn't need to be applied globally from the parent project. --- README.md | 2 -- gulpfile.js | 3 --- package.json | 9 ++++++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index bcd8909..6adfc96 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,6 @@ Using Bower; - [Install using the tarball URL](http://bower.io/docs/api/#install) (best option) - Or use browserify or webpack to consume the CommonJS module -**Note:** *If you're including this module via Browserify, you need to apply the `hbsfy` transform globally.* - # Quick Start To get started, you'll need to include the script on your page. To create an `Alerter()` instance you can do; diff --git a/gulpfile.js b/gulpfile.js index 4f8951e..481ac04 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,7 +1,6 @@ var gulp = require('gulp'); var runSequence = require('run-sequence'); var browserify = require('browserify'); -var hbsfy = require('hbsfy'); var source = require('vinyl-source-stream'); var derequire = require('gulp-derequire'); var http = require('http'); @@ -35,7 +34,6 @@ gulp.task('build', function() { }); var bundle = function() { return bundler - .transform({global: true}, hbsfy) .bundle() .pipe(source('alerter.js')) .pipe(derequire()) @@ -50,7 +48,6 @@ gulp.task('build-tests', function() { }); var bundle = function() { return bundler - .transform({global: true}, hbsfy) .bundle() .pipe(source('tests.js')) .pipe(derequire()) diff --git a/package.json b/package.json index 97042c0..689a32a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blocks-alerter", - "version": "1.0.1", + "version": "1.0.2", "description": "Injects notification and alert markup and UI in the browser.", "main": "src/alerter.js", "files": [ @@ -36,7 +36,6 @@ "gulp-spawn-mocha": "^0.4.1", "gulp-util": "^3.0.1", "handlebars": "1.3.x", - "hbsfy": "^2.1.0", "jquery": "^2.1.1", "mocha": "^1.21.5", "mocha-clean": "^0.3.0", @@ -48,6 +47,10 @@ }, "dependencies": { "events": "^1.0.2", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "hbsfy": "^2.1.0" + }, + "browserify": { + "transform": [ "hbsfy" ] } }