@journeyapps/cloudcode-build
Advanced tools
Comparing version 1.9.1-dev.953da0e.49da882 to 1.9.1
export declare function buildAll(): Promise<void>; | ||
export declare function buildTypescript(): Promise<void>; | ||
export declare function buildTypescript(path?: string): Promise<void>; |
@@ -7,5 +7,5 @@ "use strict"; | ||
exports.buildAll = buildAll; | ||
async function buildTypescript() { | ||
async function buildTypescript(path) { | ||
const tsc = require.resolve('typescript/bin/tsc'); | ||
const child = child_process_1.spawnSync(tsc, ['--project', '.'], { encoding: 'utf8' }); | ||
const child = child_process_1.spawnSync(tsc, ['--project', '.'], { encoding: 'utf8', cwd: path }); | ||
if (child.status !== 0) { | ||
@@ -12,0 +12,0 @@ throw new ProcessError_1.ProcessError(child); |
@@ -12,3 +12,4 @@ #!/usr/bin/env node | ||
yargs | ||
.command('build', 'build a task', yargs => { | ||
.command(['build', '$0'], // $0 means this is the default command | ||
'build a task', yargs => { | ||
return yargs.option('datamodel', { default: DEFAULT_SCHEMA_PATH }); | ||
@@ -15,0 +16,0 @@ }, handled(async (argv) => { |
@@ -0,1 +1,18 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const datamodel_1 = require("./datamodel"); | ||
exports.fileToDefinitions = datamodel_1.fileToDefinitions; | ||
const build_1 = require("./build"); | ||
exports.buildTypescript = build_1.buildTypescript; | ||
const path = require("path"); | ||
const DEFAULT_OPTIONS = { | ||
datamodel: '../../schema.xml' | ||
}; | ||
const DEFAULT_DATAMODEL_OUT = 'gen/datamodel.d.ts'; | ||
async function buildTask(taskPath, options) { | ||
options = { ...DEFAULT_OPTIONS, ...options }; | ||
await datamodel_1.fileToDefinitions(path.resolve(taskPath, options.datamodel), path.resolve(taskPath, DEFAULT_DATAMODEL_OUT)); | ||
await build_1.buildTypescript(taskPath); | ||
} | ||
exports.buildTask = buildTask; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@journeyapps/cloudcode-build", | ||
"version": "1.9.1-dev.953da0e.49da882", | ||
"main": "index.js", | ||
"version": "1.9.1", | ||
"main": "./lib/index.js", | ||
"license": "MIT", | ||
@@ -30,3 +30,3 @@ "bin": { | ||
], | ||
"gitHead": "cbcd524e6ba92643c33ce23a8c5d7942dddb6021" | ||
"gitHead": "de4bab09cb51000774fa76c7b805d6b43ce52a16" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
16388
257
1