Skip to content

Commit

Permalink
Merge pull request #10 from bbttxu/master
Browse files Browse the repository at this point in the history
Add an AMD version of shepherd.js
  • Loading branch information
zackbloom committed Apr 29, 2014
2 parents ea3216f + 709c8a1 commit 624481f
Show file tree
Hide file tree
Showing 4 changed files with 542 additions and 21 deletions.
23 changes: 23 additions & 0 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -31,13 +32,35 @@ 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())
.pipe(header(banner))
.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', ->
Expand Down
43 changes: 22 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"name": "shepherd",
"version": "0.5.1",
"description": "Guide your users through a tour of your app.",
"authors": [
"Adam Schwartz <adam.flynn.schwartz@gmail.com>",
"Zack Bloom <zackbloom@gmail.com>"
],
"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 <adam.flynn.schwartz@gmail.com>",
"Zack Bloom <zackbloom@gmail.com>"
],
"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": "*"
}
}
Loading

0 comments on commit 624481f

Please sign in to comment.