introduce es6 and babel to whole app
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
require('babel/register');
|
||||
var gulp = require('gulp'),
|
||||
path = require('path'),
|
||||
|
||||
@ -118,6 +119,7 @@ gulp.task('serve', function(cb) {
|
||||
script: paths.server,
|
||||
ext: '.js',
|
||||
ignore: paths.serverIgnore,
|
||||
exec: './node_modules/.bin/babel-node',
|
||||
env: {
|
||||
'NODE_ENV': 'development',
|
||||
'DEBUG': process.env.DEBUG || 'freecc:*'
|
||||
|
@ -10,7 +10,7 @@
|
||||
"npm": "2.3.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node server/server.js",
|
||||
"start": "babel-node server/server.js",
|
||||
"lint": "eslint --ext=.js,.jsx .",
|
||||
"test": "mocha",
|
||||
"postinstall": "bower cache clean && bower install && gulp build"
|
||||
|
@ -1,3 +1,4 @@
|
||||
require('babel/register');
|
||||
var pm2 = require('pm2');
|
||||
pm2.connect(function() {
|
||||
pm2.start({
|
||||
|
@ -1,13 +1,13 @@
|
||||
// appFactory is an es6 module
|
||||
var debug = require('debug')('freecc:servereact');
|
||||
var app$ = require('../common/app/app-stream.jsx').default;
|
||||
var Cat = require('thundercats').Cat;
|
||||
import debugFactory from 'debug';
|
||||
import app$ from '../common/app/app-stream.jsx';
|
||||
import { Cat } from 'thundercats';
|
||||
|
||||
var routes = [
|
||||
const debug = debugFactory('freecc:servereact');
|
||||
const routes = [
|
||||
'/jobs'
|
||||
];
|
||||
|
||||
module.exports = function(app) {
|
||||
export default function reactSubRouter(app) {
|
||||
var router = app.Router();
|
||||
|
||||
routes.forEach(function(route) {
|
||||
@ -54,4 +54,4 @@ module.exports = function(app) {
|
||||
next
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user