mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 05:07:52 +00:00
[Build] Tweak migration script
This commit is contained in:
parent
377786caf9
commit
9f840aa0fd
@ -31,7 +31,7 @@ function migrate(file) {
|
|||||||
var sourceCode = fs.readFileSync(file, 'utf8'),
|
var sourceCode = fs.readFileSync(file, 'utf8'),
|
||||||
lines = sourceCode.split('\n')
|
lines = sourceCode.split('\n')
|
||||||
.filter(function (line) {
|
.filter(function (line) {
|
||||||
return line.trim().replace("'", '"') !== '"use strict";';
|
return !(/^\W*['"]use strict['"];\W*$/.test(line));
|
||||||
})
|
})
|
||||||
.filter(function (line) {
|
.filter(function (line) {
|
||||||
return line.indexOf("/*global") !== 0;
|
return line.indexOf("/*global") !== 0;
|
||||||
@ -39,7 +39,7 @@ function migrate(file) {
|
|||||||
fs.writeFileSync(file, lines.join('\n'));
|
fs.writeFileSync(file, lines.join('\n'));
|
||||||
}
|
}
|
||||||
|
|
||||||
glob('platform/**/*.js', {}, function (err, files) {
|
glob('@(src|platform)/**/*.js', {}, function (err, files) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user