Last active
August 29, 2015 14:19
-
-
Save jordaaash/e971479cf41a3f2817b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var path = require('path'); | |
var Class; | |
try { | |
Class = (new Function("'use strict'; return class Class {};"))(); | |
} | |
catch (error) {} | |
if (Class == null) { | |
require('babel-core/register')({ | |
extensions: ['.js', '.jsx'], | |
whitelist: ['es6.classes', 'es6.destructuring', 'es7.objectRestSpread', 'react'], | |
stage: 1 | |
}); | |
} | |
else { | |
require('babel-core/register')({ | |
extensions: ['.jsx'], | |
whitelist: ['es6.classes', 'es6.destructuring', 'es7.objectRestSpread', 'react'], | |
only: new RegExp('^' + path.resolve(__dirname, '..', 'application').replace(/\//g, '\/')), | |
stage: 1 | |
}); | |
} | |
if (process.env.NODE_ENV == null) { | |
require('../env'); | |
} | |
var Environment = require('./environments/' + process.env.NODE_ENV); | |
var environment = new Environment; | |
module.exports = environment; | |
environment.initialize(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment