Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit 7f293c6

Browse files
committed
Merge pull request #32 from zpao/build-it
Add a build step
2 parents 00ea2d6 + 35d8ee9 commit 7f293c6

File tree

12 files changed

+40
-16
lines changed

12 files changed

+40
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
examples/*/bundle.js
2+
lib
23
node_modules

.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
node_modules
22
npm-debug.log
33
.DS_Store
4-
src/__tests__
4+
src
5+
examples
6+
jest

examples/vector-widget/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"devDependencies": {
33
"jsx-loader": "~0.11.0",
4-
"react": "~0.11.1",
4+
"react": "^0.12.0",
55
"webpack": "~1.0.0"
66
},
77
"scripts": {

gulpfile.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var gulp = require('gulp');
2+
var gReact = require('gulp-react');
3+
var del = require('del');
4+
5+
gulp.task('clean', function(cb) {
6+
del(['lib/', 'Flux.js'], cb);
7+
});
8+
9+
gulp.task('default', ['clean'], function() {
10+
return gulp.src('src/*.js')
11+
.pipe(gReact({harmony: true}))
12+
.pipe(gulp.dest('lib'));
13+
14+
});

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"bugs": "https://github.com/facebook/react-art/issues",
1414
"licenses": "BSD-3-Clause",
15-
"main": "src/ReactART.js",
15+
"main": "lib/ReactART.js",
1616
"repository": {
1717
"type": "git",
1818
"url": "https://github.com/facebook/react-art.git"
@@ -24,10 +24,17 @@
2424
"react": "^0.12.0"
2525
},
2626
"devDependencies": {
27-
"jest": "~0.1.37",
27+
"del": "^0.1.3",
28+
"gulp": "^3.8.10",
29+
"gulp-react": "^2.0.0",
30+
"jest-cli": "^0.1.18",
2831
"react": "^0.12.0",
2932
"react-tools": "^0.12.0"
3033
},
34+
"scripts": {
35+
"prepublish": "./node_modules/.bin/gulp",
36+
"test": "./node_modules/.bin/jest"
37+
},
3138
"engines": {
3239
"node": ">=0.10.0"
3340
},

shapes/circle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
module.exports = require('../src/Circle.art');
10+
module.exports = require('../lib/Circle.art');

shapes/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
var Circle = require('../src/Circle.art');
11-
var Rectangle = require('../src/Rectangle.art');
12-
var Wedge = require('../src/Wedge.art');
10+
var Circle = require('./circle');
11+
var Rectangle = require('./rectangle');
12+
var Wedge = require('./wedge');
1313

1414
module.exports = {
1515
Circle: Circle,

shapes/rectangle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
module.exports = require('../src/Rectangle.art');
10+
module.exports = require('../lib/Rectangle.art');

shapes/wedge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
module.exports = require('../src/Wedge.art');
10+
module.exports = require('../lib/Wedge.art');

src/Circle.art.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
*
2020
*/
2121

22-
var React = require('React');
23-
var ReactART = require('ReactART');
22+
var React = require('react');
23+
var ReactART = require('./ReactART');
2424

2525
var Props = React.PropTypes;
2626
var Shape = ReactART.Shape;

0 commit comments

Comments
 (0)