actually copy codemirror.js before patching
This commit is contained in:
parent
bfe18e74a4
commit
0dbb55cc0c
|
@ -60,10 +60,7 @@ function updateExisting(lib) {
|
||||||
const folderRoot = `${vendorRoot}${folder}`;
|
const folderRoot = `${vendorRoot}${folder}`;
|
||||||
const entries = fs.readdirSync(folderRoot);
|
const entries = fs.readdirSync(folderRoot);
|
||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
// Remove $1 from "CodeMirror$1" in codemirror.js
|
if (entry !== 'README.md' && entry !== 'LICENSE') {
|
||||||
if (entry === 'codemirror.js') {
|
|
||||||
renameCodeMirrorVariable(`${folderRoot}/${entry}`);
|
|
||||||
} else if (entry !== 'README.md' && entry !== 'LICENSE') {
|
|
||||||
// Ignore README.md & LICENSE files
|
// Ignore README.md & LICENSE files
|
||||||
const entryPath = `${folderRoot}/${entry}`;
|
const entryPath = `${folderRoot}/${entry}`;
|
||||||
try {
|
try {
|
||||||
|
@ -72,6 +69,10 @@ function updateExisting(lib) {
|
||||||
folders.push(`${folder}/${entry}`);
|
folders.push(`${folder}/${entry}`);
|
||||||
} else {
|
} else {
|
||||||
fs.copySync(`${libRoot}${folder}/${entry}`, entryPath);
|
fs.copySync(`${libRoot}${folder}/${entry}`, entryPath);
|
||||||
|
// Remove $1 from "CodeMirror$1" in codemirror.js
|
||||||
|
if (entry === 'codemirror.js') {
|
||||||
|
renameCodeMirrorVariable(entryPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user