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
40 changes: 40 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"name": "Launch C# Compiler",
"type": "node",
Expand All @@ -25,6 +26,45 @@
"env": {
"TS_NODE_PROJECT": "tsconfig.build-csharp.json"
}
},

{
"name": "Launch TypeScript Generator",
"type": "node",
"request": "launch",
"args": [
"src.compiler/typescript/AlphaTabGenerator.ts",
"--project",
"tsconfig.build-csharp.json"
],
"runtimeArgs": [
"--nolazy",
"-r",
"ts-node/register"
],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"smartStep": false,
"internalConsoleOptions": "openOnSessionStart",
"env": {
"TS_NODE_PROJECT": "tsconfig.build-csharp.json"
}
},

{
"name": "Launch JavaScript Compiler",
"type": "node",
"request": "launch",
"runtimeExecutable": "npm",
"windows": {
"runtimeExecutable": "npm.cmd"
},
"runtimeArgs": [
"run-script",
"build",
"--inspect-brk=5858"
],
"port": 5858
}
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"files.exclude": {
"dist/lib.csharp/**": true,
"src.csharp/**": true
"src.csharp/**": true,
"node_modules/**": true
}
}
20 changes: 20 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const storage = multer.diskStorage({
const upload = multer({ storage: storage });
const cors = require('cors');
const fs = require('fs');
const path = require('path');

module.exports = function (config) {
config.set({
Expand Down Expand Up @@ -54,6 +55,25 @@ module.exports = function (config) {
port: 8090,
appVisitor: function (app, log) {
app.use(cors());
app.get(
'/list-files',
function (req, res) {
log.info(`loading files from ${req.query.dir}`);

const directoryPath = path.join(__dirname, req.query.dir);
fs.readdir(directoryPath, (err, files) => {
//handling error
if (err) {
res.status(400);
res.send(JSON.stringify(`Error: ${err.message}`));
} else {
res.send(JSON.stringify(files.filter(f =>
fs.statSync(path.join(directoryPath, f)).isFile()
)));
}
});
}
);
app.post(
'/save-visual-error',
upload.fields([
Expand Down
103 changes: 40 additions & 63 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@
"scripts": {
"clean": "rimraf dist",
"lint": "tslint --project tsconfig.build.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'",
"build": "ttsc --project tsconfig.build.json && rollup -c rollup.config.js",
"build": "npm run generate-typescript && tsc --project tsconfig.build.json && rollup -c rollup.config.js",
"build-ci": "npm run clean && npm run build && npm pack",
"start": "node scripts/setup-playground.js && npm run build && concurrently --kill-others \"ttsc --project tsconfig.build.json --watch\" \"rollup -c rollup.config.js -w\"",
"test": "ttsc --project tsconfig.json && concurrently --kill-others \"ttsc --project tsconfig.json -w\" \"karma start karma.conf.js --browsers Chrome --no-single-run --reporters spec,kjhtml\"",
"test-ci": "ttsc --project tsconfig.json && karma start karma.conf.js --browsers ChromeHeadless --single-run --reporters spec",
"generate-csharp": "ts-node --project tsconfig.build-csharp.json src.compiler/csharp/CSharpTranspiler.ts --project tsconfig.build-csharp.json",
"start": "node scripts/setup-playground.js && npm run build && concurrently --kill-others \"tsc --project tsconfig.build.json --watch\" \"rollup -c rollup.config.js -w\"",
"test": "npm run generate-typescript && tsc --project tsconfig.json && concurrently --kill-others \"tsc --project tsconfig.json -w\" \"karma start karma.conf.js --browsers Chrome --no-single-run --reporters spec,kjhtml\"",
"test-ci": "npm run generate-typescript && tsc --project tsconfig.json && karma start karma.conf.js --browsers ChromeHeadless --single-run --reporters spec",
"generate-typescript": "rimraf src/generated && ts-node --project tsconfig.build-csharp.json src.compiler/typescript/AlphaTabGenerator.ts --project tsconfig.build-csharp.json",
"generate-csharp": "npm run generate-typescript && ts-node --project tsconfig.build-csharp.json src.compiler/csharp/CSharpTranspiler.ts --project tsconfig.build-csharp.json",
"build-csharp": "npm run generate-csharp && cd src.csharp && dotnet build -c Release",
"build-csharp-ci": "npm run clean && npm run generate-csharp && cd src.csharp && dotnet build -c Release",
"test-csharp": "cd src.csharp && dotnet test",
"test-csharp-ci": "cd src.csharp && dotnet test"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^16.0.0",
"@types/jasmine": "^3.6.1",
"@rollup/plugin-commonjs": "^17.0.0",
"@types/jasmine": "^3.6.2",
"concurrently": "^5.3.0",
"cors": "^2.8.5",
"fs-extra": "^9.0.1",
Expand All @@ -56,19 +57,19 @@
"lodash": "^4.17.20",
"multer": "^1.4.2",
"rimraf": "^3.0.2",
"rollup": "^2.33.1",
"rollup": "^2.35.1",
"rollup-plugin-copy": "^3.3.0",
"rollup-plugin-dts": "^1.4.13",
"rollup-plugin-dts": "^2.0.1",
"rollup-plugin-license": "^2.2.0",
"rollup-plugin-serve": "^1.1.0",
"rollup-plugin-terser": "^7.0.2",
"terser": "^5.3.8",
"ts-node": "^9.0.0",
"terser": "^5.5.1",
"ts-node": "^9.1.1",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0",
"tslint-config-standard": "^9.0.0",
"ttypescript": "^1.5.12",
"typescript": "^4.0.5"
"typescript": "^4.1.3"
},
"files": [
"/dist/alphaTab.js",
Expand Down
Loading