Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
835fba3452 | |||
d35cff7135 | |||
6bbfd8b8a5 | |||
9e6ab262ed | |||
58246c406d | |||
345df135b9 | |||
31e99a0035 | |||
8aa3823e65 | |||
d36a5f7751 | |||
6b1c7c4dc8 | |||
dbcfa977fd | |||
fda30f611a | |||
c1e43788a6 |
21
.gitignore
vendored
21
.gitignore
vendored
@ -1,7 +1,20 @@
|
|||||||
# gitzone standard
|
.nogit/
|
||||||
node_modules/
|
|
||||||
|
# artifacts
|
||||||
coverage/
|
coverage/
|
||||||
pages/
|
|
||||||
public/
|
public/
|
||||||
assets/output/
|
pages/
|
||||||
|
|
||||||
|
# installs
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# caches
|
||||||
|
.yarn/
|
||||||
|
.cache/
|
||||||
|
.rpt2_cache
|
||||||
|
|
||||||
|
# builds
|
||||||
dist/
|
dist/
|
||||||
|
dist_*/
|
||||||
|
|
||||||
|
# custom
|
@ -1,16 +1,16 @@
|
|||||||
# gitzone standard
|
# gitzone ci_default
|
||||||
image: hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- .npmci_cache/
|
- .npmci_cache/
|
||||||
key: "$CI_BUILD_STAGE"
|
key: '$CI_BUILD_STAGE'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- security
|
- security
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
- metadata
|
- metadata
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# security stage
|
# security stage
|
||||||
@ -20,17 +20,19 @@ mirror:
|
|||||||
script:
|
script:
|
||||||
- npmci git mirror
|
- npmci git mirror
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
snyk:
|
snyk:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:snyk
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci command npm install -g snyk
|
|
||||||
- npmci command npm install --ignore-scripts
|
- npmci command npm install --ignore-scripts
|
||||||
- npmci command snyk test
|
- npmci command snyk test
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
@ -38,19 +40,7 @@ snyk:
|
|||||||
# test stage
|
# test stage
|
||||||
# ====================
|
# ====================
|
||||||
|
|
||||||
testLTS:
|
testStable:
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci node install lts
|
|
||||||
- npmci npm install
|
|
||||||
- npmci npm test
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
testSTABLE:
|
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
@ -59,6 +49,20 @@ testSTABLE:
|
|||||||
- npmci npm test
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- priv
|
||||||
|
|
||||||
|
testBuild:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command npm run build
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
@ -70,6 +74,7 @@ release:
|
|||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
@ -78,20 +83,14 @@ release:
|
|||||||
# ====================
|
# ====================
|
||||||
codequality:
|
codequality:
|
||||||
stage: metadata
|
stage: metadata
|
||||||
image: docker:stable
|
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
services:
|
|
||||||
- docker:stable-dind
|
|
||||||
script:
|
script:
|
||||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
- npmci command npm install -g tslint typescript
|
||||||
- docker run
|
- npmci npm prepare
|
||||||
--env SOURCE_CODE="$PWD"
|
- npmci npm install
|
||||||
--volume "$PWD":/code
|
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
|
|
||||||
artifacts:
|
|
||||||
paths: [codeclimate.json]
|
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- priv
|
- priv
|
||||||
|
|
||||||
@ -102,18 +101,20 @@ trigger:
|
|||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
image: hosttoday/ht-docker-node:npmci
|
|
||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g typedoc typescript
|
- npmci node install lts
|
||||||
|
- npmci command npm install -g @gitzone/tsdoc
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
|
- npmci command tsdoc
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
only:
|
only:
|
||||||
|
29
.vscode/launch.json
vendored
Normal file
29
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "current file",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [
|
||||||
|
"${relativeFile}"
|
||||||
|
],
|
||||||
|
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"protocol": "inspector",
|
||||||
|
"internalConsoleOptions": "openOnSessionStart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test.ts",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [
|
||||||
|
"test/test.ts"
|
||||||
|
],
|
||||||
|
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"protocol": "inspector",
|
||||||
|
"internalConsoleOptions": "openOnSessionStart"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
26
.vscode/settings.json
vendored
Normal file
26
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"json.schemas": [
|
||||||
|
{
|
||||||
|
"fileMatch": ["/npmextra.json"],
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"npmci": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "settings for npmci"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "settings for gitzone",
|
||||||
|
"properties": {
|
||||||
|
"projectType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["website", "element", "service", "npm"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
70
README.md
70
README.md
@ -1,70 +0,0 @@
|
|||||||
# tsn
|
|
||||||
|
|
||||||
## Availabililty
|
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/tsn)
|
|
||||||
[](https://gitlab.com/pushrocks/tsn)
|
|
||||||
[](https://github.com/pushrocks/tsn)
|
|
||||||
[](https://pushrocks.gitlab.io/tsn/)
|
|
||||||
|
|
||||||
## Status for master
|
|
||||||
|
|
||||||
[](https://gitlab.com/pushrocks/tsn/commits/master)
|
|
||||||
[](https://gitlab.com/pushrocks/tsn/commits/master)
|
|
||||||
[](https://david-dm.org/pushrocks/tsn)
|
|
||||||
[](https://www.bithound.io/github/pushrocks/tsn/master/dependencies/npm)
|
|
||||||
[](https://www.bithound.io/github/pushrocks/tsn)
|
|
||||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
||||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
||||||
[](http://standardjs.com/)
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Tsn uses the **next** tagged npm version of typescript
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import * as tsn from 'tsn';
|
|
||||||
|
|
||||||
let myGlobStringObject = {
|
|
||||||
'./myTsFolder/**/*.ts': './myDestinationFolder/',
|
|
||||||
'./someOtherTsFolder/**/*.ts': './myOtherDestinationFolder/'
|
|
||||||
};
|
|
||||||
|
|
||||||
let tsOptions = {
|
|
||||||
target: tsn.ScriptTarget.ES2015,
|
|
||||||
module: tsn.ModuleKind.CommonJS
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
note: since this only works in code, here are the target numbers
|
|
||||||
enum ScriptTarget {
|
|
||||||
ES3 = 0,
|
|
||||||
ES5 = 1,
|
|
||||||
ES2015 = 2,
|
|
||||||
ES2016 = 3,
|
|
||||||
ES2017 = 4,
|
|
||||||
ESNext = 5,
|
|
||||||
Latest = 5,
|
|
||||||
}
|
|
||||||
|
|
||||||
and here are the module kinds
|
|
||||||
enum ModuleKind {
|
|
||||||
None = 0,
|
|
||||||
CommonJS = 1,
|
|
||||||
AMD = 2,
|
|
||||||
UMD = 3,
|
|
||||||
System = 4,
|
|
||||||
ES2015 = 5,
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
let myCwd = process.cwd();
|
|
||||||
|
|
||||||
tsn.compileGlobStringObject(
|
|
||||||
myGlobStringObject, // the glob string object describing from where to compile what to where
|
|
||||||
tsOptions, // the options for TypeScript
|
|
||||||
myCwd // a custom cwd, optional, defaults to process.cwd()
|
|
||||||
);
|
|
||||||
```
|
|
||||||
|
|
||||||
[](https://push.rocks)
|
|
@ -2,5 +2,16 @@
|
|||||||
"npmci": {
|
"npmci": {
|
||||||
"npmGlobalTools": [],
|
"npmGlobalTools": [],
|
||||||
"npmAccessLevel": "public"
|
"npmAccessLevel": "public"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"projectType": "npm",
|
||||||
|
"module": {
|
||||||
|
"githost": "gitlab.com",
|
||||||
|
"gitscope": "gitzone",
|
||||||
|
"gitrepo": "tsbuild",
|
||||||
|
"shortDescription": "TypeScript nightly to easily make use of latest features",
|
||||||
|
"npmPackagename": "@gitzone/tsbuild",
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsbuild",
|
"name": "@gitzone/tsbuild",
|
||||||
"version": "2.1.13",
|
"version": "2.1.21",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
19
package.json
19
package.json
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsbuild",
|
"name": "@gitzone/tsbuild",
|
||||||
"version": "2.1.13",
|
"version": "2.1.21",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "TypeScript nightly to easily make use of latest features",
|
"description": "TypeScript nightly to easily make use of latest features",
|
||||||
"main": "dist/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsbuild": "cli.js"
|
"tsbuild": "cli.js"
|
||||||
@ -40,5 +40,18 @@
|
|||||||
"@types/node": "^12.7.2",
|
"@types/node": "^12.7.2",
|
||||||
"tslint": "^5.19.0",
|
"tslint": "^5.19.0",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
}
|
},
|
||||||
|
"files": [
|
||||||
|
"ts/**/*",
|
||||||
|
"ts_web/**/*",
|
||||||
|
"dist/**/*",
|
||||||
|
"dist_bundle/**/*",
|
||||||
|
"dist_web/**/*",
|
||||||
|
"dist_ts/**/*",
|
||||||
|
"dist_ts_web/**/*",
|
||||||
|
"assets/**/*",
|
||||||
|
"cli.js",
|
||||||
|
"npmextra.json",
|
||||||
|
"readme.md"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ export const compilerOptionsDefault: CompilerOptions = {
|
|||||||
experimentalDecorators: true,
|
experimentalDecorators: true,
|
||||||
inlineSourceMap: true,
|
inlineSourceMap: true,
|
||||||
noEmitOnError: true,
|
noEmitOnError: true,
|
||||||
outDir: 'dist/',
|
outDir: 'dist_ts/',
|
||||||
module: plugins.typescript.ModuleKind.CommonJS,
|
module: plugins.typescript.ModuleKind.CommonJS,
|
||||||
lib: ['lib.es2017.d.ts'],
|
lib: ['lib.es2017.d.ts'],
|
||||||
noImplicitAny: false,
|
noImplicitAny: false,
|
||||||
@ -28,7 +28,10 @@ export const compilerOptionsWebDefault: CompilerOptions = {
|
|||||||
/**
|
/**
|
||||||
* merges compilerOptions with the default compiler options
|
* merges compilerOptions with the default compiler options
|
||||||
*/
|
*/
|
||||||
export const mergeCompilerOptions = (customTsOptions: CompilerOptions, argvArg?: any): CompilerOptions => {
|
export const mergeCompilerOptions = (
|
||||||
|
customTsOptions: CompilerOptions,
|
||||||
|
argvArg?: any
|
||||||
|
): CompilerOptions => {
|
||||||
const defaultOptionsToMerge = (() => {
|
const defaultOptionsToMerge = (() => {
|
||||||
if (argvArg && argvArg.web) {
|
if (argvArg && argvArg.web) {
|
||||||
return compilerOptionsWebDefault;
|
return compilerOptionsWebDefault;
|
||||||
@ -38,7 +41,7 @@ export const mergeCompilerOptions = (customTsOptions: CompilerOptions, argvArg?:
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
// create merged options
|
// create merged options
|
||||||
let mergedOptions: CompilerOptions = {
|
const mergedOptions: CompilerOptions = {
|
||||||
...defaultOptionsToMerge,
|
...defaultOptionsToMerge,
|
||||||
...customTsOptions
|
...customTsOptions
|
||||||
};
|
};
|
||||||
@ -52,25 +55,25 @@ export const mergeCompilerOptions = (customTsOptions: CompilerOptions, argvArg?:
|
|||||||
export const compiler = (
|
export const compiler = (
|
||||||
fileNames: string[],
|
fileNames: string[],
|
||||||
options: plugins.typescript.CompilerOptions,
|
options: plugins.typescript.CompilerOptions,
|
||||||
argvArg?: any,
|
argvArg?: any
|
||||||
): Promise<any[]> => {
|
): Promise<any[]> => {
|
||||||
console.log(`Compiling ${fileNames.length} files...`);
|
console.log(`Compiling ${fileNames.length} files...`);
|
||||||
let done = plugins.smartpromise.defer<any[]>();
|
const done = plugins.smartpromise.defer<any[]>();
|
||||||
let program = plugins.typescript.createProgram(fileNames, options);
|
const program = plugins.typescript.createProgram(fileNames, options);
|
||||||
let emitResult = program.emit();
|
const emitResult = program.emit();
|
||||||
|
|
||||||
// implement check only
|
// implement check only
|
||||||
/*let emitResult = program.emit(undefined,(args) => {
|
/*let emitResult = program.emit(undefined,(args) => {
|
||||||
console.log(args)
|
console.log(args)
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
let allDiagnostics = plugins.typescript
|
const allDiagnostics = plugins.typescript
|
||||||
.getPreEmitDiagnostics(program)
|
.getPreEmitDiagnostics(program)
|
||||||
.concat(emitResult.diagnostics);
|
.concat(emitResult.diagnostics);
|
||||||
allDiagnostics.forEach(diagnostic => {
|
allDiagnostics.forEach(diagnostic => {
|
||||||
if (diagnostic.file) {
|
if (diagnostic.file) {
|
||||||
let { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!);
|
const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!);
|
||||||
let message = plugins.typescript.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
|
const message = plugins.typescript.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
|
||||||
console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
console.log(
|
||||||
@ -79,7 +82,7 @@ export const compiler = (
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let exitCode = emitResult.emitSkipped ? 1 : 0;
|
const exitCode = emitResult.emitSkipped ? 1 : 0;
|
||||||
if (exitCode === 0) {
|
if (exitCode === 0) {
|
||||||
console.log('TypeScript emit succeeded!');
|
console.log('TypeScript emit succeeded!');
|
||||||
done.resolve(emitResult.emittedFiles);
|
done.resolve(emitResult.emittedFiles);
|
||||||
|
@ -6,11 +6,11 @@ const tsbuildCli = new plugins.smartcli.Smartcli();
|
|||||||
/**
|
/**
|
||||||
* the standard task compiles anything in ts/ directory to dist directory
|
* the standard task compiles anything in ts/ directory to dist directory
|
||||||
*/
|
*/
|
||||||
tsbuildCli.standardTask().subscribe(argvArg => {
|
tsbuildCli.standardTask().subscribe(async argvArg => {
|
||||||
if (process.env.CLI_CALL_TSBUILD === 'true') {
|
if (process.env.CLI_CALL_TSBUILD === 'true') {
|
||||||
tsbuild.compileGlobStringObject(
|
tsbuild.compileGlobStringObject(
|
||||||
{
|
{
|
||||||
'./ts/**/*.ts': './dist'
|
'./ts/**/*.ts': './dist_ts'
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
process.cwd(),
|
process.cwd(),
|
||||||
@ -22,18 +22,24 @@ tsbuildCli.standardTask().subscribe(argvArg => {
|
|||||||
/**
|
/**
|
||||||
* the custom command compiles any customDir to dist_customDir
|
* the custom command compiles any customDir to dist_customDir
|
||||||
*/
|
*/
|
||||||
tsbuildCli.addCommand('custom').subscribe(argvArg => {
|
tsbuildCli.addCommand('custom').subscribe(async argvArg => {
|
||||||
const listedDirectories = argvArg._;
|
const listedDirectories = argvArg._;
|
||||||
listedDirectories.shift();
|
listedDirectories.shift();
|
||||||
const compilationCommandObject: {[key: string]: string} = {};
|
const compilationCommandObject: { [key: string]: string } = {};
|
||||||
for (const directory of listedDirectories) {
|
for (const directory of listedDirectories) {
|
||||||
compilationCommandObject[`./${directory}/**/*.ts`] = `./dist_${directory}`;
|
compilationCommandObject[`./${directory}/**/*.ts`] = `./dist_${directory}`;
|
||||||
};
|
}
|
||||||
tsbuild.compileGlobStringObject(
|
await tsbuild.compileGlobStringObject(compilationCommandObject, {}, process.cwd(), argvArg);
|
||||||
compilationCommandObject,
|
});
|
||||||
|
|
||||||
|
tsbuildCli.addCommand('element').subscribe(async argvArg => {
|
||||||
|
await tsbuild.compileGlobStringObject(
|
||||||
|
{
|
||||||
|
'./ts_web/**/*.ts': 'dist_ts_web'
|
||||||
|
},
|
||||||
{},
|
{},
|
||||||
process.cwd(),
|
process.cwd(),
|
||||||
argvArg
|
{ web: true }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ export * from './tsbuild.classes.compiler';
|
|||||||
export let compileFileArray = (
|
export let compileFileArray = (
|
||||||
fileStringArrayArg: string[],
|
fileStringArrayArg: string[],
|
||||||
compilerOptionsArg: CompilerOptions = {},
|
compilerOptionsArg: CompilerOptions = {},
|
||||||
argvArg?: any,
|
argvArg?: any
|
||||||
): Promise<any[]> => {
|
): Promise<any[]> => {
|
||||||
return compiler(fileStringArrayArg, mergeCompilerOptions(compilerOptionsArg, argvArg), argvArg);
|
return compiler(fileStringArrayArg, mergeCompilerOptions(compilerOptionsArg, argvArg), argvArg);
|
||||||
};
|
};
|
||||||
@ -25,11 +25,11 @@ export let compileGlobStringObject = async (
|
|||||||
globStringObjectArg: any,
|
globStringObjectArg: any,
|
||||||
tsOptionsArg: CompilerOptions = {},
|
tsOptionsArg: CompilerOptions = {},
|
||||||
cwdArg: string = process.cwd(),
|
cwdArg: string = process.cwd(),
|
||||||
argvArg?: any,
|
argvArg?: any
|
||||||
) => {
|
) => {
|
||||||
let compiledFiles = [];
|
let compiledFiles = [];
|
||||||
for (const keyArg in globStringObjectArg) {
|
for (const keyArg in globStringObjectArg) {
|
||||||
if(globStringObjectArg[keyArg]) {
|
if (globStringObjectArg[keyArg]) {
|
||||||
console.log(
|
console.log(
|
||||||
`TypeScript assignment: transpile from ${keyArg} to ${globStringObjectArg[keyArg]}`
|
`TypeScript assignment: transpile from ${keyArg} to ${globStringObjectArg[keyArg]}`
|
||||||
);
|
);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "dist/",
|
"outDir": "dist_ts/",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es2015",
|
"target": "es2015",
|
||||||
"lib":[
|
"lib":[
|
||||||
|
Reference in New Issue
Block a user