Skip to content

Commit

Permalink
Update to babel 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernardstanislas committed Jan 11, 2016
1 parent 724f462 commit c743d51
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 57 deletions.
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

40 changes: 20 additions & 20 deletions .gitignore
@@ -1,20 +1,20 @@
npm-debug.log
node_modules
dist

/application
/component
/definition
/dispatcher
/list
/exception
/network
/router
/reference
/search
/site-description
/store
/util
/user
/message
/index.js
npm-debug.log
node_modules
dist

/application
/component
/definition
/dispatcher
/list
/exception
/network
/router
/reference
/search
/site-description
/store
/util
/user
/message
/index.js
4 changes: 2 additions & 2 deletions .npmignore
@@ -1,2 +1,2 @@
spec/
test/
spec/
test/
45 changes: 31 additions & 14 deletions package.json
@@ -1,16 +1,26 @@
{
"name": "focus-core",
"version": "0.12.2-beta5",
"version": "0.12.2-beta6",
"description": "Focus library core part.",
"main": "index.js",
"babel": {
"presets": [
"stage-0",
"react",
"es2015"
],
"plugins": [
"transform-class-properties"
]
},
"repository": {
"type": "git",
"url": "https://github.com/KleeGroup/focus-core.git"
"type": "git",
"url": "https://github.com/KleeGroup/focus-core.git"
},
"keywords": [
"spa",
"react",
"es6"
"spa",
"react",
"es6"
],
"author": "focus@kleegroup.com",
"documentation": "http://kleegroup.github.io/focus-docs/",
Expand All @@ -20,7 +30,7 @@
"url": "https://github.com/KleeGroup/focus-core/issues"
},
"scripts": {
"prepublish": "npm run build",
"prepublish": "in-publish && npm run build || exit 0",
"babelify": "better-npm-run babelify",
"bundle": "better-npm-run bundle",
"test": "mocha src/**/__tests__/**/*.js",
Expand All @@ -29,7 +39,7 @@
},
"betterScripts": {
"babelify": {
"command": "babel src --out-dir ./ --source-maps inline"
"command": "babel src --out-dir ./ --ignore \"example/index.js,__tests__\" --source-maps inline"
},
"bundle": {
"command": "webpack --progress",
Expand All @@ -51,12 +61,17 @@
"uuid": "^2.0.1"
},
"devDependencies": {
"babel": "^5.8.21",
"babel-core": "^5.8.24",
"babel-eslint": "4.0.5",
"babel-loader": "^5.3.2",
"babel": "^6.3.26",
"babel-core": "^6.4.0",
"babel-eslint": "4.1.3",
"babel-loader": "^6.2.1",
"babel-plugin-runtime": "^1.0.7",
"babel-runtime": "^5.8.20",
"babel-plugin-transform-class-properties": "^6.4.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-preset-stage-0": "^6.3.13",
"babel-runtime": "^6.3.19",
"backbone": "^1.2.0",
"better-npm-run": "0.0.5",
"chai": "^3.2.0",
Expand All @@ -70,6 +85,7 @@
"extract-text-webpack-plugin": "^0.8.2",
"file-loader": "^0.8.4",
"i18next-client": "^1.10.2",
"in-publish": "^2.0.0",
"jquery": "^2.1.4",
"json-loader": "^0.5.3",
"mocha": "^2.3.2",
Expand All @@ -81,10 +97,11 @@
"react-dom": "^0.14.4",
"react-hot-loader": "^1.3.0",
"sass-loader": "^3.0.0",
"source-map-loader": "^0.1.5",
"style-loader": "^0.12.4",
"url-loader": "^0.5.6",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.11.0",
"webpack-focus": "0.8.2"
"webpack-focus": "^0.8.8"
}
}
13 changes: 11 additions & 2 deletions test/mocha-bootload.js
@@ -1,7 +1,16 @@
//Global configuration uese for tests.
require('babel/register')({
optional: ['runtime', 'es7.asyncFunctions']
require('babel-core/register')({
presets: [
'stage-0',
'react',
'es2015'
],
plugins: [
'transform-class-properties',
'transform-decorators-legacy'
]
});

const chai = require('chai');
const chaiSubset = require('chai-subset');
chai.use(chaiSubset);
Expand Down
2 changes: 1 addition & 1 deletion test/mocha.opts
@@ -1,4 +1,4 @@
--compilers js:babel/register
--compilers js:babel-core/register
--require test/mocha-bootload
--require chai
--reporter spec
Expand Down
28 changes: 14 additions & 14 deletions webpack.config.js
@@ -1,14 +1,14 @@
const configBuilder = require('webpack-focus').configBuilder;
const customConfig = {
externals: {
react: 'React',
'react-dom': 'ReactDOM',
moment: 'moment',
jquery: 'jQuery',
backbone: 'Backbone',
numeral: 'numeral',
'i18next-client': 'i18n'
}
};

module.exports = configBuilder(customConfig);
const configBuilder = require('webpack-focus').configBuilder;
const customConfig = {
externals: {
react: 'React',
'react-dom': 'ReactDOM',
moment: 'moment',
jquery: 'jQuery',
backbone: 'Backbone',
numeral: 'numeral',
'i18next-client': 'i18n'
}
};

module.exports = configBuilder(customConfig);

0 comments on commit c743d51

Please sign in to comment.