Skip to content
This repository has been archived by the owner on Dec 4, 2019. It is now read-only.

Commit

Permalink
Upgrade to babel 6
Browse files Browse the repository at this point in the history
  • Loading branch information
marjan-georgiev committed May 26, 2016
1 parent 443d614 commit 67e8a52
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 44 deletions.
52 changes: 13 additions & 39 deletions gulpfile.js
Expand Up @@ -17,14 +17,6 @@ var header = require('gulp-header');

var KarmaServer = require('karma').Server;


var compilerOptions = {
modules: 'system',
moduleIds: false,
comments: true,
compact: false
};

var path = {
source: 'src/**/*.js',
less: 'src/**/*.less',
Expand All @@ -50,7 +42,7 @@ gulp.task('es6', function () {
return gulp.src(path.source)
.pipe(plumber())
.pipe(changed(path.output, { extension: '.js' }))
.pipe(babel(compilerOptions))
.pipe(babel())
.pipe(ngAnnotate({
gulpWarnings: false
}))
Expand Down Expand Up @@ -113,8 +105,7 @@ gulp.task('release', function (callback) {
['release-less', 'release-build'],
'release-umd',
'release-common',
'release-es6-helpers',
'release-es6-helpers-min',
'release-es6-min',
callback
);
});
Expand All @@ -141,10 +132,9 @@ gulp.task('release-build', function () {
gulp.task('release-umd', function () {
return gulp.src('release/dataTable.es6.js')
.pipe(babel({
comments: false,
compact: false,
externalHelpers: true,
modules: 'umd',
plugins: [
"transform-es2015-modules-umd"
],
moduleId: 'DataTable'
}))
.pipe(ngAnnotate({
Expand All @@ -158,9 +148,9 @@ gulp.task('release-umd', function () {
gulp.task('release-common', function () {
return gulp.src('release/dataTable.es6.js')
.pipe(babel({
comments: false,
compact: false,
modules: 'common',
plugins: [
"transform-es2015-modules-commonjs"
],
moduleId: 'DataTable'
}))
.pipe(ngAnnotate({
Expand All @@ -171,36 +161,20 @@ gulp.task('release-common', function () {
.pipe(gulp.dest("release/"))
});

gulp.task('release-es6-helpers', function () {
return gulp.src('release/dataTable.es6.js')
.pipe(babel({
comments: false,
compact: false,
modules: 'umd',
moduleId: 'DataTable'
}))
.pipe(ngAnnotate({
gulpWarnings: false
}))
.pipe(header(banner, { pkg: pkg }))
.pipe(rename('dataTable.helpers.js'))
.pipe(gulp.dest("release/"))
});

gulp.task('release-es6-helpers-min', function () {
gulp.task('release-es6-min', function () {
return gulp.src('release/dataTable.es6.js')
.pipe(babel({
comments: false,
compact: false,
modules: 'umd',
plugins: [
"transform-es2015-modules-umd"
],
moduleId: 'DataTable'
}))
.pipe(ngAnnotate({
gulpWarnings: false
}))
.pipe(uglify())
.pipe(header(banner, { pkg: pkg }))
.pipe(rename('dataTable.helpers.min.js'))
.pipe(rename('dataTable.min.js'))
.pipe(gulp.dest("release/"))
});

Expand Down
26 changes: 21 additions & 5 deletions package.json
Expand Up @@ -24,13 +24,20 @@
"devDependencies": {
"angular": "^1.4.4",
"angular-mocks": "^1.4.3",
"babel-core": "^5.8.22",
"babelify": "^6.1.3",
"babelify": "7.3.0",
"babel-core": "^6.9.0",
"babel-eslint": "^6.0.2",
"babel-plugin-external-helpers": "^6.5.0",
"babel-plugin-transform-es2015-modules-amd": "^6.8.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.8.0",
"babel-plugin-transform-es2015-modules-umd": "^6.8.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-stage-0": "^6.5.0",
"browser-sync": "^2.7.2",
"chai-as-promised": "^5.1.0",
"chai-as-promised": "^5.3.0",
"del": "^1.2.0",
"gulp": "^3.8.11",
"gulp-babel": "^5.1.0",
"gulp-babel": "6.1.2",
"gulp-changed": "^1.2.1",
"gulp-header": "^1.2.2",
"gulp-less": "^3.0.3",
Expand Down Expand Up @@ -59,7 +66,6 @@
"systemjs-builder": "^0.11.3",
"vinyl-paths": "^1.0.0"
},
"dependencies": {},
"jspm": {
"dependencies": {
"angular": "npm:angular@^1.4.0"
Expand All @@ -69,5 +75,15 @@
"babel-runtime": "npm:babel-runtime@^5.6.4",
"core-js": "npm:core-js@^1.1.1"
}
},
"babel": {
"sourceMaps": false,
"presets": [
"es2015",
"stage-0"
],
"moduleIds": false,
"comments": false,
"compact": false
}
}

0 comments on commit 67e8a52

Please sign in to comment.