Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Commit c9454de

Browse files
author
Justin Slattery
committed
Update to React 15, babel 6
1 parent 87a7cf2 commit c9454de

6 files changed

Lines changed: 300 additions & 198 deletions

File tree

package.json

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "carbondream",
3-
"version": "0.1.3",
3+
"version": "0.2.0",
44
"description": "React web annotation engine",
55
"homepage": "http://carbondream.zeroarc.com/",
66
"main": "dist/entry.js",
77
"directories": {
88
"test": "test"
99
},
1010
"scripts": {
11-
"build": "NODE_ENV=production $(npm bin)/babel --optional es7.objectRestSpread --optional es7.decorators src/ -d dist/ && cp -r node_modules/font-awesome/css web && cp -r node_modules/font-awesome/fonts web",
12-
"watch": "NODE_ENV=production $(npm bin)/babel --watch --optional es7.objectRestSpread --optional es7.decorators src/ -d dist/ && cp -r node_modules/font-awesome/css web && cp -r node_modules/font-awesome/fonts web",
13-
"demo-watch": "$(npm bin)/watchify --extension=.jsx -d -e src/demo.jsx -t [ babelify --optional es7.objectRestSpread --optional es7.decorators ] -s CarbonDream -o test/index.js -v ",
14-
"demo-build": "$(npm bin)/browserify --extension=.jsx -e src/demo.jsx -t [ babelify --optional es7.objectRestSpread --optional es7.decorators ] -s CarbonDream -o test/index.js && cp -r node_modules/font-awesome/css web && cp -r node_modules/font-awesome/fonts web",
11+
"build": "NODE_ENV=production $(npm bin)/babel src/ -d dist/ && cp -r node_modules/font-awesome/css web && cp -r node_modules/font-awesome/fonts web",
12+
"watch": "NODE_ENV=production $(npm bin)/babel --watch src/ -d dist/ && cp -r node_modules/font-awesome/css web && cp -r node_modules/font-awesome/fonts web",
13+
"demo-watch": "$(npm bin)/watchify --extension=.jsx -d -e src/demo.jsx -s CarbonDream -o test/index.js -v ",
14+
"demo-build": "$(npm bin)/browserify --extension=.jsx -e src/demo.jsx -s CarbonDream -o test/index.js && cp -r node_modules/font-awesome/css web && cp -r node_modules/font-awesome/fonts web",
1515
"prepublish": "npm run build",
1616
"test": "echo \"Error: no test specified\" && exit 1"
1717
},
@@ -29,16 +29,49 @@
2929
"bugs": {
3030
"url": "https://github.com/ZeroarcSoftware/carbondream/issues"
3131
},
32+
"browserify": {
33+
"transform": [
34+
[
35+
"babelify",
36+
{
37+
"presets": [
38+
"es2015",
39+
"react"
40+
],
41+
"plugins": [
42+
"transform-decorators-legacy",
43+
"transform-object-rest-spread"
44+
]
45+
}
46+
]
47+
]
48+
},
49+
"babel": {
50+
"presets": [
51+
"es2015",
52+
"react"
53+
],
54+
"plugins": [
55+
"transform-decorators-legacy",
56+
"transform-object-rest-spread"
57+
]
58+
},
3259
"devDependencies": {
33-
"autobind-decorator": "^1.3.3",
34-
"babel": "^5.8.23",
35-
"babelify": "^6.3.0",
60+
"babel-cli": "^6.7.5",
61+
"babel-plugin-transform-decorators-legacy": "^1.3.4",
62+
"babel-plugin-transform-object-rest-spread": "^6.6.5",
63+
"babel-preset-es2015": "^6.6.0",
64+
"babel-preset-react": "^6.5.0",
65+
"babelify": "^7.2.0",
3666
"browserify": "^13.0.0",
67+
"install": "^0.6.1",
68+
"npm": "^3.8.6",
3769
"react-addons-shallow-compare": "^15.0.1",
3870
"reflux": "^0.4.1",
3971
"watchify": "^3.7.0"
4072
},
4173
"dependencies": {
74+
"autobind-decorator": "^1.3.3",
4275
"classnames": "^2.2.3",
4376
"font-awesome": "^4.5.0",
4477
"immutable": "^3.7.6",

src/Annotation.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ let React = require('react');
1010
let Autobind = require('autobind-decorator');
1111

1212
// Local
13-
let Marker = require('./Marker');
14-
let Square = require('./Square');
15-
let Circle = require('./Circle');
16-
let Highlight = require('./Highlight');
17-
let Content = require('./Content');
18-
let Input = require('./Input');
13+
import Marker from './Marker';
14+
import Square from './Square';
15+
import Circle from './Circle';
16+
import Highlight from './Highlight';
17+
import Content from './Content';
18+
import Input from './Input';
1919

2020
// Globals
2121
let BUBBLEDIM = {width: 260, height: 120};

src/Container.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ let Immutable = require('immutable');
1212
let Autobind = require('autobind-decorator');
1313

1414
// Local
15-
let Annotation = require('./Annotation');
16-
let ModeToggle = require('./ModeToggle');
15+
import Annotation from './Annotation';
16+
import ModeToggle from './ModeToggle';
1717

1818

1919
@Autobind

src/Content.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let Autobind = require('autobind-decorator');
1111
import TimeAgo from 'react-timeago'
1212

1313
// Local
14-
let Input = require('./Input');
14+
import Input from './Input';
1515

1616

1717
@Autobind

src/demo.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ let Immutable = require('immutable');
1414
let Autobind = require('autobind-decorator');
1515

1616
// Local
17-
let Container = require('./Container');
18-
let AnnotationStore = require('../test/AnnotationStore.js');
19-
let AnnotationActions = require('../test/AnnotationActions.js');
17+
//let Container = require('./Container');
18+
import Container from './Container';
19+
import AnnotationStore from '../test/AnnotationStore.js';
20+
import AnnotationActions from '../test/AnnotationActions.js';
2021

2122

2223
@Autobind

0 commit comments

Comments
 (0)