Merge pull request #579 from Hongarc/react

Use `babelify` instead of `grunt-react`
This commit is contained in:
Peter Cottle 2019-05-02 13:30:44 -07:00 committed by GitHub
commit 02a8e0f214
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 370 additions and 285 deletions

View file

@ -1,5 +1,6 @@
var _ = require('underscore');
var fs = require('fs');
var babelify = require('babelify');
// Haha, this is so tricky. so we have a template for index.html to stick
// in the hashed JS and style files -- that template also contains
@ -213,7 +214,9 @@ module.exports = function(grunt) {
},
browserify: {
options: {
transform: [require('grunt-react').browserify]
transform: [babelify.configure({
presets: ['@babel/preset-react']
})]
},
dist: {
files: {
@ -234,7 +237,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-shell-spawn');
grunt.loadNpmTasks('grunt-jasmine-node');
grunt.loadNpmTasks('grunt-contrib-uglify-es');
grunt.loadNpmTasks('grunt-react');
grunt.loadNpmTasks('grunt-env');
grunt.registerTask('build',

View file

@ -13,6 +13,9 @@
"url": "https://github.com/pcottle/learnGitBranching"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/preset-react": "^7.0.0",
"babelify": "^10.0.0",
"browserify": "^13.0.0",
"contributor-faces": "^1.0.2",
"grunt": "^1.0.4",
@ -24,7 +27,6 @@
"grunt-hash": "~0.5.0",
"grunt-jasmine-node": "~0.1.0",
"grunt-jsxhint": "^0.5.0",
"grunt-react": "^0.12.1",
"grunt-shell-spawn": "~0.3.0",
"jasmine-node": "~1.12.0",
"prompt": "^1.0.0"

645
yarn.lock

File diff suppressed because it is too large Load diff