Created
          September 15, 2015 19:38 
        
      - 
      
- 
        Save hoorayimhelping/4d64931f7081957ab9b9 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or 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
    
  
  
    
  | diff --git a/gulpfile.js b/gulpfile.js | |
| index 1df0002..3a223fa 100644 | |
| --- a/gulpfile.js | |
| +++ b/gulpfile.js | |
| @@ -3,9 +3,12 @@ var source = require('vinyl-source-stream'); | |
| var jshint = require('gulp-jshint'); | |
| var browserify = require('browserify'); | |
| +var reactify = require('reactify'); | |
| + | |
| var tape = require('gulp-tape'); | |
| var shell = require('gulp-shell'); | |
| +var react = require('gulp-react'); | |
| var paths = { | |
| 'js_source': 'js/graph/', | |
| @@ -41,10 +44,25 @@ gulp.task('test-debug', function() { | |
| .pipe(tape()); | |
| }); | |
| +gulp.task('transform', function() { | |
| + return gulp.src(paths.react_source + '*.jsx') | |
| + .pipe(react()) | |
| + .pipe(gulp.dest(paths.react_dist)); | |
| +}); | |
| + | |
| +gulp.task('build', function() { | |
| + return browserify(paths.js_source + 'main.jsx') | |
| + | |
| + .bundle() | |
| + .pipe(source('app.js')) | |
| + .pipe(gulp.dest(paths.js_dist)); | |
| +}); | |
| + | |
| gulp.task('build', function() { | |
| if (true) return; | |
| return browserify(paths.js_source + 'main.js') | |
| + .transform(reactify) | |
| .bundle() | |
| .pipe(source('bundle.js')) | |
| .pipe(gulp.dest(paths.js_dist)); | |
| diff --git a/package.json b/package.json | |
| index 82fafa2..6833bde 100644 | |
| --- a/package.json | |
| +++ b/package.json | |
| @@ -3,7 +3,7 @@ | |
| "version": "0.0.1", | |
| "description": "A simple graph library", | |
| "main": "gulpfile.js", | |
| - "repository": "", | |
| + "repository": "https://github.com/hoorayimhelping/delta-v", | |
| "scripts": { | |
| "test": "gulp test" | |
| }, | |
| @@ -14,9 +14,11 @@ | |
| "git-guppy": "^1.0.0", | |
| "gulp": "^3.9.0", | |
| "gulp-jshint": "^1.11.2", | |
| + "gulp-react": "^3.0.1", | |
| "gulp-shell": "^0.4.3", | |
| "gulp-tape": "0.0.3", | |
| "guppy-pre-commit": "^0.2.1", | |
| + "reactify": "^1.1.1", | |
| "vinyl-source-stream": "^1.1.0" | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment