Compare commits

...

9 Commits

Author SHA1 Message Date
5a68e83abf 2.1.9 2019-04-30 13:26:50 +02:00
def7dc65c8 fix(core): update 2019-04-30 13:26:49 +02:00
649ca48d03 2.1.8 2019-01-27 20:02:39 +01:00
abc515c742 2.1.7 2019-01-27 19:21:07 +01:00
1eb2b727aa fix(custom directory compilation): now picking up TypeScript files correctly 2019-01-27 19:21:07 +01:00
93a332ba50 2.1.6 2019-01-27 02:44:55 +01:00
109ba0b0ee fix(core): update 2019-01-27 02:44:54 +01:00
ee3ef5d6e9 2.1.5 2019-01-27 02:42:58 +01:00
d5852ce85d fix(core): update 2019-01-27 02:42:58 +01:00
6 changed files with 33 additions and 15 deletions

4
.snyk Normal file
View File

@ -0,0 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.13.3
ignore: {}
patch: {}

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@gitzone/tsbuild",
"version": "2.1.4",
"version": "2.1.9",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@gitzone/tsbuild",
"version": "2.1.4",
"version": "2.1.9",
"private": false,
"description": "TypeScript nightly to easily make use of latest features",
"main": "dist/index.js",
@ -10,6 +10,7 @@
},
"scripts": {
"test": "tsrun test/test.ts",
"testCustom": "node cli.ts.js custom ts_web",
"build": "node cli.ts.js"
},
"repository": {

View File

@ -1,11 +1,3 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
console.log('test');
console.log('test2');
class test2 {
@ -14,7 +6,7 @@ class test2 {
console.log('hi');
}
}
const run = () => __awaiter(this, void 0, void 0, function* () {
const run = async () => {
return 'hi';
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9jb21waWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdG9jb21waWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUEsT0FBTyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUNwQixPQUFPLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBQ3JCLE1BQU0sS0FBSztJQUVUO1FBREEsU0FBSSxHQUFhLEVBQUUsQ0FBQztRQUVsQixPQUFPLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ3BCLENBQUM7Q0FDRjtBQUVELE1BQU0sR0FBRyxHQUFHLEdBQTBCLEVBQUU7SUFDdEMsT0FBTyxJQUFJLENBQUM7QUFDZCxDQUFDLENBQUEsQ0FBQyJ9
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9jb21waWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdG9jb21waWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDcEIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNyQixNQUFNLEtBQUs7SUFFVDtRQURBLFNBQUksR0FBYSxFQUFFLENBQUM7UUFFbEIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNwQixDQUFDO0NBQ0Y7QUFFRCxNQUFNLEdBQUcsR0FBRyxLQUFLLElBQXFCLEVBQUU7SUFDdEMsT0FBTyxJQUFJLENBQUM7QUFDZCxDQUFDLENBQUMifQ==

View File

@ -14,9 +14,9 @@ export const compilerOptionsDefault: CompilerOptions = {
noEmitOnError: true,
outDir: 'dist/',
module: plugins.typescript.ModuleKind.CommonJS,
lib: ['lib.es2016.d.ts', 'lib.es2017.d.ts'],
lib: ['lib.es2017.d.ts'],
noImplicitAny: false,
target: plugins.typescript.ScriptTarget.ES2015
target: plugins.typescript.ScriptTarget.ES2017
};
export const compilerOptionsWebDefault: CompilerOptions = {

View File

@ -3,6 +3,9 @@ import * as tsbuild from './tsbuild.exports';
const tsbuildCli = new plugins.smartcli.Smartcli();
/**
* the standard task compiles anything in ts/ directory to dist directory
*/
tsbuildCli.standardTask().subscribe(argvArg => {
if (process.env.CLI_CALL_TSBUILD === 'true') {
tsbuild.compileGlobStringObject(
@ -16,4 +19,22 @@ tsbuildCli.standardTask().subscribe(argvArg => {
}
});
/**
* the custom command compiles any customDir to dist_customDir
*/
tsbuildCli.addCommand('custom').subscribe(argvArg => {
const listedDirectories = argvArg._;
listedDirectories.shift();
const compilationCommandObject: {[key: string]: string} = {};
for (const directory of listedDirectories) {
compilationCommandObject[`./${directory}/**/*.ts`] = `./dist_${directory}`;
};
tsbuild.compileGlobStringObject(
compilationCommandObject,
{},
process.cwd(),
argvArg
);
})
tsbuildCli.startParse();