Skip to content

Commit

Permalink
add hbsfy transform to package.json
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
localjo committed Nov 11, 2014
1 parent 2da8deb commit 92f24fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down Expand Up @@ -35,7 +34,6 @@ gulp.task('build', function() {
});
var bundle = function() {
return bundler
.transform({global: true}, hbsfy)
.bundle()
.pipe(source('alerter.js'))
.pipe(derequire())
Expand All @@ -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())
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down Expand Up @@ -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",
Expand All @@ -48,6 +47,10 @@
},
"dependencies": {
"events": "^1.0.2",
"inherits": "^2.0.1"
"inherits": "^2.0.1",
"hbsfy": "^2.1.0"
},
"browserify": {
"transform": [ "hbsfy" ]
}
}

0 comments on commit 92f24fd

Please sign in to comment.