Skip to content

Commit 00b8d4a

Browse files
authored
Merge pull request #29 from dosasm/dev-extdep
depend on vscode-dosbox
2 parents 2c3f982 + c8b4b88 commit 00b8d4a

Some content is hidden

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

75 files changed

+1573
-2924
lines changed

.eslintrc.json

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
{
2-
"root": true,
3-
"parser": "@typescript-eslint/parser",
4-
"parserOptions": {
5-
"ecmaVersion": 6,
6-
"sourceType": "module"
7-
},
8-
"plugins": [
9-
"@typescript-eslint"
10-
],
11-
"extends": [
12-
"plugin:@typescript-eslint/recommended"
13-
],
14-
"rules": {
15-
"@typescript-eslint/semi": "warn",
16-
"curly": "warn",
17-
"eqeqeq": "warn",
18-
"no-throw-literal": "warn",
19-
"semi": "warn",
20-
"@typescript-eslint/no-use-before-define": "off"
21-
},
22-
"ignorePatterns": [
23-
"test/**/index.ts",
24-
"test/**/runTest.ts",
25-
"node_modules",
26-
"**/*.js",
27-
"tools"
28-
]
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
11+
"extends": [
12+
"plugin:@typescript-eslint/recommended"
13+
],
14+
"rules": {
15+
"@typescript-eslint/semi": "warn",
16+
"no-throw-literal": "warn",
17+
"semi": "warn",
18+
"@typescript-eslint/no-use-before-define": "off",
19+
"@typescript-eslint/explicit-module-boundary-types": "off"
20+
},
21+
"ignorePatterns": [
22+
"test/**/index.ts",
23+
"test/**/runTest.ts",
24+
"node_modules",
25+
"**/*.js",
26+
"src/test/suite/diagnose.test.ts"
27+
]
2928
}

.github/workflows/ci.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,41 @@ jobs:
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v2
24+
2425
- name: Install Node.js
2526
uses: actions/setup-node@v1
2627
with:
2728
node-version: 14.x
28-
- run: yarn
29-
- run: xvfb-run -a yarn test
29+
30+
- name: linux Install dosbox and dosbox-x tool
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install dosbox
34+
sudo apt install flatpak
35+
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
36+
sudo flatpak install flathub com.dosbox_x.DOSBox-X -y
37+
if: runner.os == 'Linux'
38+
- name: macOS Install dosbox and dosbox-x tool
39+
run: |
40+
brew update
41+
brew install dosbox
42+
brew install dosbox-x
43+
if: runner.os == 'macOS'
44+
45+
- run: |
46+
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
47+
echo ">>> Started xvfb"
3048
if: runner.os == 'Linux'
31-
- run: yarn test
32-
if: runner.os != 'Linux'
49+
50+
- name: yarn,test
51+
run: |
52+
yarn
53+
yarn test
54+
env:
55+
DISPLAY: ":99.0"
3356

3457
- run: yarn lint
58+
if: runner.os == 'Linux'
3559

3660
- name: Publish
3761
if: success() && startsWith( github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest'

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
node_modules
44
.vscode-test/
55
*.vsix
6-
# temporary generated by Assembler
7-
/workspace/*.*
86

97
**/.DS_store
108

11-
web/res/test.jsdos
9+
**.jsdos

.vscode/launch.json

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,14 @@
1616
"outFiles": [
1717
"${workspaceFolder}/dist/**/*.js"
1818
],
19-
"preLaunchTask": "npm: compile"
20-
},
21-
{
22-
"name": "Run Extension(no pretask)",
23-
"type": "extensionHost",
24-
"request": "launch",
25-
"runtimeExecutable": "${execPath}",
26-
"args": [
27-
"--extensionDevelopmentPath=${workspaceFolder}"
28-
],
29-
"outFiles": [
30-
"${workspaceFolder}/dist/**/*.js"
31-
],
19+
"preLaunchTask": "npm: watch"
3220
},
3321
{
3422
"name": "Extension Tests",
3523
"type": "extensionHost",
3624
"request": "launch",
3725
"runtimeExecutable": "${execPath}",
3826
"args": [
39-
"--disable-extensions",
4027
"--extensionDevelopmentPath=${workspaceFolder}",
4128
"--extensionTestsPath=${workspaceFolder}/dist/test/suite/index",
4229
"${workspaceFolder}/samples"

dev/downloadBundle.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const download = require('download');
2+
const { existsSync } = require('fs');
3+
const { resolve } = require('path');
4+
const pkg = require("../package.json");
5+
6+
const actions = pkg.contributes.configuration.properties['masmtasm.ASM.actions'].default
7+
const assemblers = Object.keys(actions).map(key => actions[key].baseBundle.replace('<built-in>/', ""));
8+
9+
const host = "https://dosasm.github.io/dosrun/bundles/"
10+
const dstFolder = resolve(__dirname, "..", "resources");
11+
12+
async function main() {
13+
for (const asm of assemblers) {
14+
const dst = resolve(dstFolder, asm);
15+
const src = host + asm;
16+
if (existsSync(dst)) {
17+
console.log('already downloaded', asm)
18+
console.log(src, dst)
19+
} else {
20+
await download(src, dstFolder)
21+
}
22+
}
23+
}
24+
25+
main()

0 commit comments

Comments
 (0)