-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2480 from vector-im/dbkr/babelrc2
Switch to babel 6, again
- Loading branch information
Showing
7 changed files
with
115 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"presets": ["react", "es2015", "es2016"], | ||
"plugins": ["transform-class-properties", "transform-object-rest-spread", "transform-async-to-generator", "transform-runtime", "add-module-exports"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ | |
/vector/config.json | ||
/vector/olm.js | ||
.DS_Store | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env node | ||
|
||
var exec = require('child_process').exec; | ||
|
||
// Makes sure the babel executable in the path is babel 6 (or greater), not | ||
// babel 5, which it is if you upgrade from an older version of react-sdk and | ||
// run 'npm install' since the package has changed to babel-cli, so 'babel' | ||
// remains installed and the executable in node_modules/.bin remains as babel | ||
// 5. | ||
|
||
// This script is duplicated from matrix-react-sdk because it can't reliably | ||
// be pulled in from react-sdk while npm install is failing, as it will do | ||
// if the environment is in the erroneous state this script checks for. | ||
|
||
exec("babel -V", function (error, stdout, stderr) { | ||
if ((error && error.code) || parseInt(stdout.substr(0,1), 10) < 6) { | ||
console.log("\033[31m\033[1m"+ | ||
'*****************************************\n'+ | ||
'* vector-web has moved to babel 6 *\n'+ | ||
'* Please "rm -rf node_modules && npm i" *\n'+ | ||
'* then restore links as appropriate *\n'+ | ||
'*****************************************\n'+ | ||
"\033[91m"); | ||
process.exit(1); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters