Skip to content

Commit

Permalink
style(frontend) add babel for frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonweng committed Apr 6, 2016
1 parent 83a7464 commit 3216e43
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
6 changes: 4 additions & 2 deletions gulpfile.js → gulpfile.babel.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
'use strict';

var gulp = require('gulp');
var plugins = require('gulp-load-plugins')();
import gulp from 'gulp';
import babel from 'gulp-babel';

var plugins = require("gulp-load-plugins")();

function adminTasks() {
var pathto = function (file) {
Expand All @@ -20,6 +21,7 @@ function adminTasks() {

gulp.task('js', function () {
return gulp.src(scripts.src)
.pipe(babel())
.pipe(plugins.concat('app.js'))
.pipe(plugins.uglify())
.pipe(gulp.dest(scripts.dest));
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"repository": "https://github.com/qor/qor-example",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.7.4",
"babel-preset-es2015": "^6.6.0",
"flexslider": "^2.6.0",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^2.3.1",
Expand Down

0 comments on commit 3216e43

Please sign in to comment.