Use babelify instead of grunt-react

This commit is contained in:
Hongarc 2019-05-02 12:44:56 +07:00
parent 5891d44796
commit ec0ca6b711
3 changed files with 1005 additions and 281 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-env', '@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,10 @@
"url": "https://github.com/pcottle/learnGitBranching"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/preset-env": "^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 +28,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"

1275
yarn.lock

File diff suppressed because it is too large Load diff