diff --git a/gulpfile.coffee b/gulpfile.coffee index 1f3d0faa9..474353c19 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -7,6 +7,7 @@ header = require('gulp-header') rename = require('gulp-rename') bower = require('gulp-bower') gutil = require('gulp-util') +wrap = require('gulp-wrap-umd') pkg = require('./package.json') banner = "/*! #{ pkg.name } #{ pkg.version } */\n" @@ -31,6 +32,22 @@ gulp.task 'concat', -> .pipe(header(banner)) .pipe(gulp.dest('./')) + + gulp.src(['js/shepherd.js']) + .pipe(concat('shepherd-amd.js')) + .pipe(header(banner)) + .pipe(gulp.dest('./')) + .pipe(wrap({ + namespace: "Shepherd" + exports: "Shepherd" + deps: [ + name: 'tether' + globalName: 'Tether' + paramName: 'Tether' + ] + })) + .pipe(gulp.dest('./')) + gulp.task 'uglify', -> gulp.src('./shepherd.js') .pipe(uglify()) @@ -38,6 +55,12 @@ gulp.task 'uglify', -> .pipe(rename('shepherd.min.js')) .pipe(gulp.dest('./')) + gulp.src('./shepherd-amd.js') + .pipe(uglify()) + .pipe(header(banner)) + .pipe(rename('shepherd-amd.min.js')) + .pipe(gulp.dest('./')) + gulp.task 'js', -> gulp.run 'coffee', -> gulp.run 'concat', -> diff --git a/package.json b/package.json index b5ec7b39a..f684248f2 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,23 @@ { - "name": "shepherd", - "version": "0.5.1", - "description": "Guide your users through a tour of your app.", - "authors": [ - "Adam Schwartz ", - "Zack Bloom " - ], - "license": "MIT", - "devDependencies": { - "coffee-script": "~1.6.3", - "gulp": "~3.4.0", - "gulp-header": "~1.0.2", - "gulp-uglify": "~0.1.0", - "gulp-compass": "~1.0.3", - "gulp-coffee": "~1.2.5", - "gulp-concat": "~2.1.7", - "gulp-rename": "~0.2.1", - "gulp-util": "~2.2.9", - "gulp-bower": "0.0.1" - } -} + "name": "shepherd", + "version": "0.5.1", + "description": "Guide your users through a tour of your app.", + "authors": [ + "Adam Schwartz ", + "Zack Bloom " + ], + "license": "MIT", + "devDependencies": { + "coffee-script": "~1.6.3", + "gulp": "~3.4.0", + "gulp-header": "~1.0.2", + "gulp-uglify": "~0.1.0", + "gulp-compass": "~1.0.3", + "gulp-coffee": "~1.2.5", + "gulp-concat": "~2.1.7", + "gulp-rename": "~0.2.1", + "gulp-util": "~2.2.9", + "gulp-bower": "0.0.1", + "gulp-wrap-umd": "*" + } +} \ No newline at end of file