Skip to content

Commit 3c1edfa

Browse files
committed
feat: Update ace to v1.39.1
1 parent 6856414 commit 3c1edfa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+93
-46
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
pnpm-lock.yaml
1313
.zed
1414
.idea
15+
ace-builds

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"setup": "node ./utils/setup.js",
1313
"lint": "biome lint --write",
1414
"format": "biome format --write",
15-
"check": "biome check --write"
15+
"check": "biome check --write",
16+
"updateAce": "node ./utils/updateAce.js"
1617
},
1718
"keywords": [
1819
"ecosystem:cordova"
@@ -112,4 +113,4 @@
112113
"yargs": "^17.7.2"
113114
},
114115
"browserslist": "cover 100%,not android < 5"
115-
}
116+
}

utils/updateAce.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
const fs = require('node:fs');
2+
const path = require('node:path');
3+
4+
const sourceDir = './ace-builds/src-min';
5+
const destDir = './www/js/ace';
6+
7+
function updateAce() {
8+
try {
9+
// Remove existing destination directory if it exists
10+
if (fs.existsSync(destDir)) {
11+
fs.rmSync(destDir, { recursive: true });
12+
console.log('Removed existing destination directory');
13+
}
14+
15+
// Create destination directory
16+
fs.mkdirSync(destDir, { recursive: true });
17+
console.log('Created new destination directory');
18+
19+
// Read all files from source directory
20+
const files = fs.readdirSync(sourceDir);
21+
22+
files.forEach(file => {
23+
const sourcePath = path.join(sourceDir, file);
24+
const destPath = path.join(destDir, file);
25+
26+
// Skip snippets directory and worker files
27+
if (file === 'snippets' || file.startsWith('worker-')) {
28+
console.log(`Skipping: ${file}`);
29+
return;
30+
}
31+
32+
// Copy if it's a file
33+
if (fs.statSync(sourcePath).isFile()) {
34+
fs.copyFileSync(sourcePath, destPath);
35+
console.log(`Copied: ${file}`);
36+
}
37+
});
38+
39+
console.log('Ace editor files updated successfully!');
40+
} catch (error) {
41+
console.error('Error updating Ace editor files:', error);
42+
}
43+
}
44+
45+
updateAce();

www/js/ace/ace.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/js/ace/ext-inline_autocomplete.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/js/ace/ext-language_tools.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/js/ace/ext-prompt.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/js/ace/ext-searchbox.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/js/ace/mode-astro.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/js/ace/mode-coldfusion.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)