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
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"biomejs.biome",
"bierner.lit-html"
]
}
121 changes: 30 additions & 91 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/alphatab/scripts/CloneEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function createCloneMethod(
export default createEmitter('cloneable', (program, input) => {
console.log(`Writing Cloner for ${input.name!.text}`);
const sourceFileName = path.relative(
path.join(path.resolve(program.getCompilerOptions().baseUrl!)),
path.dirname(program.getCompilerOptions().configFilePath as string),
path.resolve(input.getSourceFile().fileName)
);

Expand Down
4 changes: 2 additions & 2 deletions packages/alphatab/scripts/EmitterBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const GENERATED_FILE_HEADER = `\
// </auto-generated>`;

export function generateFile(program: ts.Program, sourceFile: ts.SourceFile, fileName: string) {
const targetFileName = path.join(path.resolve(program.getCompilerOptions().baseUrl!), 'src/generated', fileName);
const targetFileName = path.join(path.dirname(program.getCompilerOptions().configFilePath as string), 'src/generated', fileName);

fs.mkdirSync(path.dirname(targetFileName), { recursive: true });

Expand Down Expand Up @@ -65,7 +65,7 @@ export function generateClass(
generate: (program: ts.Program, classDeclaration: ts.ClassDeclaration) => ts.SourceFile
) {
const sourceFileName = path.relative(
path.resolve(program.getCompilerOptions().baseUrl!, 'src'),
path.resolve(path.dirname(program.getCompilerOptions().configFilePath as string), 'src'),
path.resolve(classDeclaration.getSourceFile().fileName)
);

Expand Down
2 changes: 1 addition & 1 deletion packages/alphatab/scripts/SerializerEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { buildTypeSchema, toImportPath } from './TypeSchema';
export default createEmitter('json', (program, input) => {
console.log(`Writing Serializer for ${input.name!.text}`);
const sourceFileName = path.relative(
path.join(path.resolve(program.getCompilerOptions().baseUrl!)),
path.dirname(program.getCompilerOptions().configFilePath as string),
path.resolve(input.getSourceFile().fileName)
);

Expand Down
2 changes: 1 addition & 1 deletion packages/alphatab/scripts/TypeSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ function findModule(type: ts.Type, options: ts.CompilerOptions) {
for (const decl of type.symbol.declarations) {
const file = decl.getSourceFile();
if (file) {
const relative = path.relative(path.join(path.resolve(options.baseUrl!)), path.resolve(file.fileName));
const relative = path.relative(path.join(path.dirname(options.configFilePath as string)), path.resolve(file.fileName));
return toImportPath(relative);
}
}
Expand Down
Loading