Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
enable es6 for content
Browse files Browse the repository at this point in the history
  • Loading branch information
paglias committed Dec 1, 2015
1 parent fa448f3 commit 7a0c13f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
1 change: 1 addition & 0 deletions content.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./node_modules/habitrpg/common').content;
11 changes: 9 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ var shared = require('habitrpg/common');
var imagemin = require('gulp-imagemin');
var pngquant = require('imagemin-pngquant');

require("babel-core/register")({
// This will override `node_modules` ignoring - you can alternatively pass
// an array of strings to be explicitly matched or a regex / glob
ignore: false
});

var paths = {
sass: ['./styles/**/*.scss'],
stylus: ['./styles/**/*.styl'],
Expand Down Expand Up @@ -125,6 +131,7 @@ gulp.task('stylus', function () {
.pipe(connect.reload())
});

var Content = require('./content');
gulp.task('views', function(){
var tavernQuest = require('./node_modules/habitrpg/website/src/models/group').tavernQuest;

Expand All @@ -138,8 +145,8 @@ gulp.task('views', function(){
args.push('en');
return shared.i18n.t.apply(null, args);
},
Content:require('./node_modules/habitrpg/common').content,
_: _,
Content: Content,
_: _,
worldDmg: (tavernQuest && tavernQuest.extra && tavernQuest.extra.worldDmg) || {},
},
moment:require('./node_modules/habitrpg/node_modules/moment')
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"description": "",
"private": true,
"dependencies": {
"babel-core": "^6.2.1",
"babel-preset-es2015": "^6.1.18",
"gulp": "~3.6.2",
"gulp-concat": "^2.2.0",
"gulp-connect": "~2.0.5",
Expand All @@ -29,4 +31,4 @@
"cordovaPlatforms": [
"ios"
]
}
}

0 comments on commit 7a0c13f

Please sign in to comment.