Compare commits
32 Commits
Author | SHA1 | Date | |
---|---|---|---|
4925809030 | |||
622a080b3c | |||
18747dbc83 | |||
210a7a07f7 | |||
211d42c36b | |||
cfbe4bbcb9 | |||
72350a49ec | |||
d4a0d03301 | |||
75f506ba0e | |||
035207f4f9 | |||
6d2d48af9d | |||
9adbce12e1 | |||
318189c7b2 | |||
167483b909 | |||
67db62e7d5 | |||
ddf76c31b9 | |||
6a0a53adda | |||
eb1a70ea70 | |||
c10ddd3c1e | |||
9c9f7ae1dc | |||
70245584d7 | |||
f11d7c6cb0 | |||
dc7980e619 | |||
686a428624 | |||
6772bb439c | |||
3acab250db | |||
ec90a006ce | |||
30ba0c99fd | |||
17a7749f23 | |||
3926a66d1d | |||
6eb5755aed | |||
165113f132 |
4
.snyk
4
.snyk
@ -1,4 +0,0 @@
|
|||||||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
|
||||||
version: v1.13.3
|
|
||||||
ignore: {}
|
|
||||||
patch: {}
|
|
4
cli.child.ts
Normal file
4
cli.child.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
process.env.CLI_CALL = 'true';
|
||||||
|
import * as cliTool from './ts/index.js';
|
||||||
|
cliTool.runCli();
|
2
cli.js
2
cli.js
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
process.env.CLI_CALL = 'true';
|
process.env.CLI_CALL = 'true';
|
||||||
const cliTool = require('./dist_ts/index');
|
const cliTool = await import('./dist_ts/index.js');
|
||||||
cliTool.runCli();
|
cliTool.runCli();
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
process.env.CLI_CALL = 'true';
|
process.env.CLI_CALL = 'true';
|
||||||
require('@gitzone/tsrun');
|
import * as tsrun from '@gitzone/tsrun';
|
||||||
const cliTool = require('./ts/index');
|
tsrun.runPath('./cli.child.js');
|
||||||
cliTool.runCli();
|
|
1471
package-lock.json
generated
1471
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
17
package.json
17
package.json
@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsbuild",
|
"name": "@gitzone/tsbuild",
|
||||||
"version": "2.1.29",
|
"version": "2.1.49",
|
||||||
"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_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsbuild": "./cli.js"
|
"tsbuild": "./cli.js"
|
||||||
},
|
},
|
||||||
@ -29,18 +30,16 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/early": "^3.0.6",
|
"@pushrocks/early": "^3.0.6",
|
||||||
"@pushrocks/smartcli": "^3.0.14",
|
"@pushrocks/smartcli": "^3.0.14",
|
||||||
"@pushrocks/smartfile": "^8.0.10",
|
"@pushrocks/smartfile": "^9.0.6",
|
||||||
"@pushrocks/smartlog": "^2.0.44",
|
"@pushrocks/smartlog": "^2.0.44",
|
||||||
"@pushrocks/smartpath": "^4.0.3",
|
"@pushrocks/smartpath": "^4.0.3",
|
||||||
"@pushrocks/smartpromise": "^3.1.6",
|
"@pushrocks/smartpromise": "^3.1.7",
|
||||||
"typescript": "^4.4.2"
|
"typescript": "4.7.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsrun": "^1.2.17",
|
"@gitzone/tsrun": "^1.2.29",
|
||||||
"@pushrocks/tapbundle": "^3.2.14",
|
"@pushrocks/tapbundle": "^4.0.8",
|
||||||
"@types/node": "^16.7.13",
|
"@types/node": "^17.0.21"
|
||||||
"tslint": "^6.1.3",
|
|
||||||
"tslint-config-prettier": "^1.18.0"
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
|
@ -1,31 +1,10 @@
|
|||||||
"use strict";
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
||||||
}) : (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
o[k2] = m[k];
|
|
||||||
}));
|
|
||||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
||||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
||||||
}) : function(o, v) {
|
|
||||||
o["default"] = v;
|
|
||||||
});
|
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
console.log('test');
|
console.log('test');
|
||||||
console.log('test2');
|
console.log('test2');
|
||||||
const early = __importStar(require("@pushrocks/early"));
|
import * as early from '@pushrocks/early';
|
||||||
early.start();
|
early.start();
|
||||||
early.stop();
|
early.stop();
|
||||||
const tocompile2_1 = require("./tocompile2");
|
import { anExportedString } from './tocompile2.js';
|
||||||
console.log(tocompile2_1.anExportedString);
|
console.log(anExportedString);
|
||||||
class test2 {
|
class test2 {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.test = [];
|
this.test = [];
|
||||||
@ -35,4 +14,4 @@ class test2 {
|
|||||||
const run = async () => {
|
const run = async () => {
|
||||||
return 'hi';
|
return 'hi';
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=data:application/json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LEtBQUssQ0FBQyxJQUFJLEVBQUUsQ0FBQztBQUViLE9BQU8sRUFBQyxnQkFBZ0IsRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQ2pELE9BQU8sQ0FBQyxHQUFHLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztBQUU5QixNQUFNLEtBQUs7SUFFVDtRQURBLFNBQUksR0FBYSxFQUFFLENBQUM7UUFFbEIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNwQixDQUFDO0NBQ0Y7QUFFRCxNQUFNLEdBQUcsR0FBRyxLQUFLLElBQXFCLEVBQUU7SUFDdEMsT0FBTyxJQUFJLENBQUM7QUFDZCxDQUFDLENBQUMifQ==
|
@ -1,6 +1,3 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.anExportedString = void 0;
|
|
||||||
console.log('hello');
|
console.log('hello');
|
||||||
exports.anExportedString = 'exported string';
|
export const anExportedString = 'exported string';
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9jb21waWxlMi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RvY29tcGlsZTIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsT0FBTyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNSLFFBQUEsZ0JBQWdCLEdBQUcsaUJBQWlCLENBQUMifQ==
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9jb21waWxlMi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RvY29tcGlsZTIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNyQixNQUFNLENBQUMsTUFBTSxnQkFBZ0IsR0FBRyxpQkFBaUIsQ0FBQyJ9
|
@ -6,7 +6,7 @@ import * as early from '@pushrocks/early';
|
|||||||
early.start();
|
early.start();
|
||||||
early.stop();
|
early.stop();
|
||||||
|
|
||||||
import {anExportedString} from './tocompile2';
|
import {anExportedString} from './tocompile2.js';
|
||||||
console.log(anExportedString);
|
console.log(anExportedString);
|
||||||
|
|
||||||
class test2 {
|
class test2 {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { tap, expect } from '@pushrocks/tapbundle';
|
import { tap, expect, expectAsync } from '@pushrocks/tapbundle';
|
||||||
|
|
||||||
import * as tsn from '../ts/index';
|
import * as tsbuild from '../ts/index.js';
|
||||||
|
|
||||||
let assetfiles: string[] = ['./test/assets/tocompile.ts', './test/assets/tocompile2.ts'];
|
let assetfiles: string[] = ['./test/assets/tocompile.ts', './test/assets/tocompile2.ts'];
|
||||||
|
|
||||||
@ -9,11 +9,11 @@ let assetfiles2 = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
tap.test('should convert files from an array with single files to output', async tools => {
|
tap.test('should convert files from an array with single files to output', async tools => {
|
||||||
tsn.compileFileArray(assetfiles, { outDir: './test/assets/output' });
|
tsbuild.compileFileArray(assetfiles, { outDir: './test/assets/output' });
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should convert files from an array with single files to output', async tools => {
|
tap.test('should convert files from an array with single files to output', async tools => {
|
||||||
tsn.compileGlobStringObject(assetfiles2);
|
tsbuild.compileGlobStringObject(assetfiles2);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.start();
|
tap.start();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as early from '@pushrocks/early';
|
import * as early from '@pushrocks/early';
|
||||||
early.start('tsbuild');
|
early.start('tsbuild');
|
||||||
export * from './tsbuild.exports';
|
export * from './tsbuild.exports.js';
|
||||||
export * from './tsbuild.cli';
|
export * from './tsbuild.cli.js';
|
||||||
early.stop();
|
early.stop();
|
@ -1,7 +1,7 @@
|
|||||||
// import all the stuff we need
|
// import all the stuff we need
|
||||||
import * as plugins from './tsbuild.plugins';
|
import * as plugins from './tsbuild.plugins.js';
|
||||||
import { CompilerOptions } from 'typescript';
|
import { CompilerOptions, ScriptTarget, ModuleKind } from './tsbuild.exports.js';
|
||||||
export { CompilerOptions, ScriptTarget, ModuleKind } from 'typescript';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the default typescript compilerOptions
|
* the default typescript compilerOptions
|
||||||
@ -13,11 +13,12 @@ export const compilerOptionsDefault: CompilerOptions = {
|
|||||||
inlineSourceMap: true,
|
inlineSourceMap: true,
|
||||||
noEmitOnError: true,
|
noEmitOnError: true,
|
||||||
outDir: 'dist_ts/',
|
outDir: 'dist_ts/',
|
||||||
module: plugins.typescript.ModuleKind.CommonJS,
|
module: plugins.typescript.ModuleKind.ES2020,
|
||||||
lib: ['lib.es2017.d.ts'],
|
target: plugins.typescript.ScriptTarget.ES2020,
|
||||||
noImplicitAny: false,
|
moduleResolution: plugins.typescript.ModuleResolutionKind.Node12,
|
||||||
|
lib: [],
|
||||||
|
noImplicitAny: true,
|
||||||
esModuleInterop: true,
|
esModuleInterop: true,
|
||||||
target: plugins.typescript.ScriptTarget.ES2017,
|
|
||||||
importsNotUsedAsValues: plugins.typescript.ImportsNotUsedAsValues.Preserve
|
importsNotUsedAsValues: plugins.typescript.ImportsNotUsedAsValues.Preserve
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as plugins from './tsbuild.plugins';
|
import * as plugins from './tsbuild.plugins.js';
|
||||||
import * as tsbuild from './tsbuild.exports';
|
import * as tsbuild from './tsbuild.exports.js';
|
||||||
|
|
||||||
export const runCli = async () => {
|
export const runCli = async () => {
|
||||||
const tsbuildCli = new plugins.smartcli.Smartcli();
|
const tsbuildCli = new plugins.smartcli.Smartcli();
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
import * as plugins from './tsbuild.plugins';
|
import * as plugins from './tsbuild.plugins.js';
|
||||||
import { compiler, CompilerOptions, mergeCompilerOptions } from './tsbuild.classes.compiler';
|
import type { CompilerOptions, ScriptTarget, ModuleKind } from 'typescript';
|
||||||
|
import { compiler, mergeCompilerOptions } from './tsbuild.classes.compiler.js';
|
||||||
|
|
||||||
export * from './tsbuild.classes.compiler';
|
export type {
|
||||||
|
CompilerOptions,
|
||||||
|
ScriptTarget,
|
||||||
|
ModuleKind
|
||||||
|
}
|
||||||
|
|
||||||
|
export * from './tsbuild.classes.compiler.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* compile am array of absolute file paths
|
* compile am array of absolute file paths
|
||||||
|
@ -2,6 +2,6 @@ import * as smartcli from '@pushrocks/smartcli';
|
|||||||
import * as smartfile from '@pushrocks/smartfile';
|
import * as smartfile from '@pushrocks/smartfile';
|
||||||
import * as smartpath from '@pushrocks/smartpath';
|
import * as smartpath from '@pushrocks/smartpath';
|
||||||
import * as smartpromise from '@pushrocks/smartpromise';
|
import * as smartpromise from '@pushrocks/smartpromise';
|
||||||
import * as typescript from 'typescript';
|
import typescript from 'typescript';
|
||||||
|
|
||||||
export { smartcli, smartfile, smartpath, smartpromise, typescript };
|
export { smartcli, smartfile, smartpath, smartpromise, typescript };
|
||||||
|
17
tslint.json
17
tslint.json
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
|
||||||
"rules": {
|
|
||||||
"semicolon": [true, "always"],
|
|
||||||
"no-console": false,
|
|
||||||
"ordered-imports": false,
|
|
||||||
"object-literal-sort-keys": false,
|
|
||||||
"member-ordering": {
|
|
||||||
"options":{
|
|
||||||
"order": [
|
|
||||||
"static-method"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaultSeverity": "warning"
|
|
||||||
}
|
|
Reference in New Issue
Block a user