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:
Ben Newman
2013-11-13 18:02:23 -05:00
parent affe7f98b5
commit 3527d9d91c
2 changed files with 7 additions and 1 deletions

View File

@@ -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

View File

@@ -64,5 +64,8 @@
"engines": {
"node": ">=0.10.0"
},
"preferGlobal": true
"preferGlobal": true,
"jsxConfig": {
"version": 1
}
}