Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 26 additions & 27 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "warn",
"@typescript-eslint/no-use-before-define": "off"
},
"ignorePatterns": [
"test/**/index.ts",
"test/**/runTest.ts",
"node_modules",
"**/*.js",
"tools"
]
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/semi": "warn",
"no-throw-literal": "warn",
"semi": "warn",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
},
"ignorePatterns": [
"test/**/index.ts",
"test/**/runTest.ts",
"node_modules",
"**/*.js",
"src/test/suite/diagnose.test.ts"
]
}
32 changes: 28 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,41 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: yarn
- run: xvfb-run -a yarn test

- name: linux Install dosbox and dosbox-x tool
run: |
sudo apt-get update
sudo apt-get install dosbox
sudo apt install flatpak
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo flatpak install flathub com.dosbox_x.DOSBox-X -y
if: runner.os == 'Linux'
- name: macOS Install dosbox and dosbox-x tool
run: |
brew update
brew install dosbox
brew install dosbox-x
if: runner.os == 'macOS'

- run: |
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
echo ">>> Started xvfb"
if: runner.os == 'Linux'
- run: yarn test
if: runner.os != 'Linux'

- name: yarn,test
run: |
yarn
yarn test
env:
DISPLAY: ":99.0"

- run: yarn lint
if: runner.os == 'Linux'

- name: Publish
if: success() && startsWith( github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest'
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
node_modules
.vscode-test/
*.vsix
# temporary generated by Assembler
/workspace/*.*

**/.DS_store

web/res/test.jsdos
**.jsdos
15 changes: 1 addition & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,14 @@
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "npm: compile"
},
{
"name": "Run Extension(no pretask)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "npm: watch"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/dist/test/suite/index",
"${workspaceFolder}/samples"
Expand Down
25 changes: 25 additions & 0 deletions dev/downloadBundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const download = require('download');
const { existsSync } = require('fs');
const { resolve } = require('path');
const pkg = require("../package.json");

const actions = pkg.contributes.configuration.properties['masmtasm.ASM.actions'].default
const assemblers = Object.keys(actions).map(key => actions[key].baseBundle.replace('<built-in>/', ""));

const host = "https://dosasm.github.io/dosrun/bundles/"
const dstFolder = resolve(__dirname, "..", "resources");

async function main() {
for (const asm of assemblers) {
const dst = resolve(dstFolder, asm);
const src = host + asm;
if (existsSync(dst)) {
console.log('already downloaded', asm)
console.log(src, dst)
} else {
await download(src, dstFolder)
}
}
}

main()
Loading