@journeyapps/cloudcode-build
Advanced tools
Comparing version 1.9.0 to 1.9.1-dev.13c6651.4b08857
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.0", | ||
"main": "index.js", | ||
"version": "1.9.1-dev.13c6651.4b08857", | ||
"main": "./lib/index.js", | ||
"license": "MIT", | ||
@@ -30,3 +30,3 @@ "bin": { | ||
], | ||
"gitHead": "a725c7495929f89b9c115d3890a46214faba1875" | ||
"gitHead": "8dc88eee5dcbdf03b85e129d11eecaaa0cdec75e" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
16408
257
2