mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Establish a convention for forcing jsx rebuilds.
Pull request #526 updated the behavior of vendor/constants.js without changing any source files or the bin/jsx-internal script, so files that should have been rebuilt (like utils/__tests__/ImmutableObject-test.js) were not automatically rebuilt (unless you knew to do `grunt clean` or `rm -rf .module-cache` manually). This commit allows us to bump a version number when we know the transform toolchain has been altered in a way that will not be visible to commoner/jsx. With this convention, if we reset to an older revision (e.g. during a git bisect) and the appropriate cached module files are still in the .module-cache/, they can be used without rebuilding. That's why I prefer this approach to just deleting the .module-cache/. Closes #104. Closes #496. Closes #530.
This commit is contained in:
@@ -10,6 +10,7 @@ var rootIDs = [
|
||||
var getDebugConfig = function() {
|
||||
return {
|
||||
"debug": true,
|
||||
"jsxConfig": grunt.config.data.pkg.jsxConfig,
|
||||
"constants": {
|
||||
"__VERSION__": grunt.config.data.pkg.version,
|
||||
"__DEV__": true
|
||||
@@ -33,6 +34,7 @@ var test = {
|
||||
return {
|
||||
"debug": true,
|
||||
"mocking": true,
|
||||
"jsxConfig": grunt.config.data.pkg.jsxConfig,
|
||||
"constants": {
|
||||
"__VERSION__": grunt.config.data.pkg.version,
|
||||
"__DEV__": true
|
||||
@@ -49,6 +51,7 @@ var release = {
|
||||
getConfig: function() {
|
||||
return {
|
||||
"debug": false,
|
||||
"jsxConfig": grunt.config.data.pkg.jsxConfig,
|
||||
"constants": {
|
||||
"__VERSION__": grunt.config.data.pkg.version,
|
||||
"__DEV__": false
|
||||
|
||||
@@ -64,5 +64,8 @@
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"preferGlobal": true
|
||||
"preferGlobal": true,
|
||||
"jsxConfig": {
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user