Skip to content

Commit

Permalink
chore: Move from Esperanto to Rollup module
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikGartner committed Dec 26, 2015
1 parent 90f6528 commit 735f1aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
22 changes: 13 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ const isparta = require('isparta');
const babelify = require('babelify');
const watchify = require('watchify');
const buffer = require('vinyl-buffer');
const esperanto = require('esperanto');
const browserify = require('browserify');
const runSequence = require('run-sequence');
const source = require('vinyl-source-stream');
const rollup = require( 'rollup' );

// Gather the library data from `package.json`
const manifest = require('./package.json');
Expand Down Expand Up @@ -59,15 +59,19 @@ createLintTask('lint-test', ['test/**/*.js']);

// Build two versions of the library
gulp.task('build', ['lint-src', 'clean'], function(done) {
esperanto.bundle({
base: 'src',
entry: config.entryFileName,
rollup.rollup({
entry: 'src/' + config.entryFileName,
}).then(function(bundle) {
var res = bundle.toUmd({
// Don't worry about the fact that the source map is inlined at this step.
// `gulp-sourcemaps`, which comes next, will externalize them.
sourceMap: 'inline',
name: config.mainVarName
var res = bundle.generate({
// use this instead of `toUmd`
format: 'umd',

// this is equivalent to `strict: true` -
// optional, will be auto-detected
//exports: 'named',

// `name` -> `moduleName`
moduleName: config.mainVarName,
});

$.file(exportFileName + '.js', res.code, { src: true })
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"isparta": "~3.0.3",
"jquery": "^2.1.4",
"mocha": "^2.1.0",
"rollup": "^0.21.0",
"run-sequence": "^1.0.2",
"sinon": "^1.12.2",
"sinon-chai": "^2.7.0",
Expand Down

0 comments on commit 735f1aa

Please sign in to comment.