Fix/windows builds (#764)
* Fix windows path issues * Few script changes to support windows * Update build scripts * remove duplicate call * changelog * Fix for telnet test runner
This commit is contained in:
1 parent
388cad36be
commit
112bad5d42
15 files changed
+130
-88
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
isBrsFile,
|
||||
} from 'brighterscript';
|
||||
import { existsSync } from 'fs-extra';
|
||||
import path from 'path';
|
||||
|
||||
export class ImportValidationPlugin implements CompilerPlugin {
|
||||
public name = 'ImportValidationPlugin';
|
||||
@@ -33,13 +34,13 @@ export class ImportValidationPlugin implements CompilerPlugin {
|
||||
}
|
||||
|
||||
generateXmlComponent(file: BscFile) {
|
||||
const path = file.pkgPath;
|
||||
const name = path.split('/').pop().replace('.bs', '') + `TestComponent${path.length}`;
|
||||
const pkgPath = file.pkgPath;
|
||||
const name = path.basename(pkgPath, '.bs') + `TestComponent${pkgPath.length}`;
|
||||
const content = `<component name="${name}" extends="Node">
|
||||
<script type="text/brightscript" uri="pkg:/${file.pkgPath}" />
|
||||
<script type="text/brightscript" uri="pkg:/${pkgPath}" />
|
||||
</component>`
|
||||
|
||||
file.program.setFile(`${path}.TestComponent.xml`, content);
|
||||
file.program.setFile(`${pkgPath}.TestComponent.xml`, content);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
FunctionStatement,
|
||||
DiagnosticSeverity,
|
||||
} from 'brighterscript';
|
||||
import path from 'path';
|
||||
|
||||
export class JobSystemPlugin implements CompilerPlugin {
|
||||
public name = 'JobSystemPlugin';
|
||||
@@ -29,7 +30,7 @@ export class JobSystemPlugin implements CompilerPlugin {
|
||||
}
|
||||
|
||||
const xml = this.generateJobXml(jobName, file.pkgPath)
|
||||
const xmlFile = `components/JobSystem/generated/${jobName}.xml`
|
||||
const xmlFile = path.join('components', 'JobSystem', 'generated', `${jobName}.xml`);
|
||||
|
||||
if (program.hasFile(xmlFile)) {
|
||||
const currentContent = program.getFile(xmlFile).fileContents
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
} from 'brighterscript';
|
||||
import path from 'path';
|
||||
|
||||
const loggingFilePath = 'source/utils/Logging.bs';
|
||||
const loggingFilePath = path.join('source', 'utils', 'Logging.bs');
|
||||
const logFunctions = {
|
||||
LogError: {
|
||||
stringLevel: 'ERROR',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// This plugin generates a file containing functions for type checking and type casting.
|
||||
import { CompilerPlugin, Program, SourceObj } from "brighterscript";
|
||||
import path from "path";
|
||||
|
||||
const types = [
|
||||
{ name: 'Bool', interface: 'ifBoolean', type: 'boolean', defaultValue: 'false' },
|
||||
@@ -16,7 +17,7 @@ const types = [
|
||||
|
||||
const generatedCodeHeader = `' The rest of this file is generated by the TypeGenPlugin`
|
||||
|
||||
const typesFilePath = 'source/utils/Types.bs';
|
||||
const typesFilePath = path.join("source", "utils", "Types.bs");
|
||||
|
||||
const isTypeTemplate = (name: string, _interface: string) => {
|
||||
return `' Returns true if the given object is of type ${name}, false otherwise
|
||||
|
||||
Reference in new issue
Block a user