-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/ajaxorg/ace
- Loading branch information
Showing
11 changed files
with
222 additions
and
24 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
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,37 @@ | ||
import * as ace from "ace-builds"; | ||
import {Range, Ace} from "ace-builds"; | ||
import "ace-builds/src-noconflict/ext-language_tools"; | ||
import "../../src/test/mockdom.js"; | ||
var HoverTooltip = ace.require("ace/tooltip").HoverTooltip; | ||
import "ace-builds/src-noconflict/mode-javascript"; | ||
import "ace-builds/src-noconflict/theme-monokai"; | ||
|
||
const editor = ace.edit(null); // should not be an error | ||
editor.setTheme("ace/theme/monokai"); | ||
editor.session.setMode("ace/mode/javascript"); | ||
|
||
function configure(config: Ace.Config) { | ||
config.setDefaultValues("editor", { | ||
fontSize: 14, | ||
showPrintMargin: false, | ||
}) | ||
} | ||
|
||
configure(ace.config) // should not be a error | ||
|
||
const hover = new HoverTooltip(); | ||
hover.setDataProvider((e: any, editor: Ace.Editor) => { | ||
const domNode = document.createElement("div"); | ||
hover.showForRange(editor, new Range(1, 3, 3, 1), domNode, e); | ||
}); | ||
hover.addToEditor(editor); | ||
|
||
editor.commands.on('afterExec', ({editor, command}) => { | ||
console.log(editor.getValue(), command.name); | ||
}); | ||
|
||
editor.commands.on('exec', ({editor, command}) => { | ||
console.log(editor.getValue(), command.name); | ||
}); | ||
|
||
editor.destroy && editor.destroy(); |
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,16 @@ | ||
{ | ||
"name": "ace-test-package", | ||
"version": "1.0.0", | ||
"description": "Test package for Ace builds", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "tsc -p tsconfig.json", | ||
"test": "node index.js" | ||
}, | ||
"dependencies": { | ||
"ace-builds": "file:../../ace-builds-latest.tgz" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.7.3" | ||
} | ||
} |
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,25 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"strictFunctionTypes": true, | ||
"strictBindCallApply": true, | ||
"strictPropertyInitialization": true, | ||
"noImplicitThis": true, | ||
"alwaysStrict": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
// "noUncheckedIndexedAccess": true, | ||
// "noImplicitOverride": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"module": "commonjs", | ||
"target": "es2020", | ||
"moduleResolution": "node" | ||
}, | ||
"include": ["*.ts"], | ||
"exclude": ["node_modules"] | ||
} |
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,58 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
cd "$(dirname "$0")/.." | ||
REPO_ROOT="$(pwd)" | ||
|
||
npm install | ||
|
||
rm -rf ../ace-builds | ||
node ./Makefile.dryice.js full --target ../ace-builds | ||
|
||
cat > ../ace-builds/package.json <<'EOF' | ||
{ | ||
"name": "ace-builds", | ||
"main": "./src-noconflict/ace.js", | ||
"typings": "ace.d.ts", | ||
"version": "1.38.0", | ||
"description": "Ace (Ajax.org Cloud9 Editor)", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ajaxorg/ace-builds.git" | ||
}, | ||
"author": "", | ||
"license": "BSD-3-Clause", | ||
"bugs": { | ||
"url": "https://github.com/ajaxorg/ace-builds/issues" | ||
}, | ||
"homepage": "https://github.com/ajaxorg/ace-builds" | ||
} | ||
EOF | ||
|
||
cd ../ace-builds | ||
npm pack | ||
|
||
rm -f "$REPO_ROOT/ace-builds-latest.tgz" | ||
|
||
PACKAGE_FILE=$(ls ace-builds-*.tgz | sort -V | tail -n 1) | ||
|
||
mv "$PACKAGE_FILE" "$REPO_ROOT/ace-builds-latest.tgz" | ||
|
||
cd "$REPO_ROOT/demo/test_ace_builds" | ||
|
||
rm -rf node_modules | ||
rm -f package-lock.json | ||
|
||
npm install "$REPO_ROOT/ace-builds-latest.tgz" | ||
|
||
npm i typescript@latest | ||
|
||
rm -f index.js | ||
npm run build | ||
npm run test | ||
|
||
cd "$REPO_ROOT" | ||
rm -f ace-builds-latest.tgz |
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