Skip to content

Instantly share code, notes, and snippets.

@jmas
Created November 21, 2015 22:04
Show Gist options
  • Save jmas/c59a61a2598cf11be269 to your computer and use it in GitHub Desktop.
Save jmas/c59a61a2598cf11be269 to your computer and use it in GitHub Desktop.
{
"presets": ["es2015", "react"]
}
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
gulp.task('build', function () {
return browserify({entries: './main.jsx', extensions: ['.jsx'], debug: true})
.transform(babelify)
.bundle()
.pipe(source('bundle.js'))
.pipe(gulp.dest('dist'));
});
gulp.task('watch', ['build'], function () {
gulp.watch('*.jsx', ['build']);
});
gulp.task('default', ['watch']);
{
"name": "pomestam",
"version": "1.0.0",
"description": "",
"main": "bundle.js",
"dependencies": {
"babel-preset-es2015": "^6.1.18",
"babelify": "^7.2.0",
"browserify": "^12.0.1",
"diff": "^2.2.1",
"gulp": "^3.9.0",
"uniq": "^1.0.1",
"vinyl-source-stream": "^1.1.0"
},
"devDependencies": {
"babel-plugin-react-transform": "^1.1.1",
"react-transform-catch-errors": "^1.0.0",
"react-transform-hmr": "^1.0.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment