Skip to content

Commit

Permalink
Update to React 15, babel 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Slattery committed May 2, 2016
1 parent 87a7cf2 commit c9454de
Show file tree
Hide file tree
Showing 6 changed files with 300 additions and 198 deletions.
49 changes: 41 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "carbondream",
"version": "0.1.3",
"version": "0.2.0",
"description": "React web annotation engine",
"homepage": "http://carbondream.zeroarc.com/",
"main": "dist/entry.js",
"directories": {
"test": "test"
},
"scripts": {
"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",
"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",
"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 ",
"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",
"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",
"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",
"demo-watch": "$(npm bin)/watchify --extension=.jsx -d -e src/demo.jsx -s CarbonDream -o test/index.js -v ",
"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",
"prepublish": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -29,16 +29,49 @@
"bugs": {
"url": "https://github.com/ZeroarcSoftware/carbondream/issues"
},
"browserify": {
"transform": [
[
"babelify",
{
"presets": [
"es2015",
"react"
],
"plugins": [
"transform-decorators-legacy",
"transform-object-rest-spread"
]
}
]
]
},
"babel": {
"presets": [
"es2015",
"react"
],
"plugins": [
"transform-decorators-legacy",
"transform-object-rest-spread"
]
},
"devDependencies": {
"autobind-decorator": "^1.3.3",
"babel": "^5.8.23",
"babelify": "^6.3.0",
"babel-cli": "^6.7.5",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-object-rest-spread": "^6.6.5",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babelify": "^7.2.0",
"browserify": "^13.0.0",
"install": "^0.6.1",
"npm": "^3.8.6",
"react-addons-shallow-compare": "^15.0.1",
"reflux": "^0.4.1",
"watchify": "^3.7.0"
},
"dependencies": {
"autobind-decorator": "^1.3.3",
"classnames": "^2.2.3",
"font-awesome": "^4.5.0",
"immutable": "^3.7.6",
Expand Down
12 changes: 6 additions & 6 deletions src/Annotation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ let React = require('react');
let Autobind = require('autobind-decorator');

// Local
let Marker = require('./Marker');
let Square = require('./Square');
let Circle = require('./Circle');
let Highlight = require('./Highlight');
let Content = require('./Content');
let Input = require('./Input');
import Marker from './Marker';
import Square from './Square';
import Circle from './Circle';
import Highlight from './Highlight';
import Content from './Content';
import Input from './Input';

// Globals
let BUBBLEDIM = {width: 260, height: 120};
Expand Down
4 changes: 2 additions & 2 deletions src/Container.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ let Immutable = require('immutable');
let Autobind = require('autobind-decorator');

// Local
let Annotation = require('./Annotation');
let ModeToggle = require('./ModeToggle');
import Annotation from './Annotation';
import ModeToggle from './ModeToggle';


@Autobind
Expand Down
2 changes: 1 addition & 1 deletion src/Content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let Autobind = require('autobind-decorator');
import TimeAgo from 'react-timeago'

// Local
let Input = require('./Input');
import Input from './Input';


@Autobind
Expand Down
7 changes: 4 additions & 3 deletions src/demo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ let Immutable = require('immutable');
let Autobind = require('autobind-decorator');

// Local
let Container = require('./Container');
let AnnotationStore = require('../test/AnnotationStore.js');
let AnnotationActions = require('../test/AnnotationActions.js');
//let Container = require('./Container');
import Container from './Container';
import AnnotationStore from '../test/AnnotationStore.js';
import AnnotationActions from '../test/AnnotationActions.js';


@Autobind
Expand Down
Loading

0 comments on commit c9454de

Please sign in to comment.