fix(core): initial

This commit is contained in:
2018-07-25 20:56:42 +02:00
commit 64643b500f
21 changed files with 1519 additions and 0 deletions

4
test/assets/output/tocompile.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
declare class test {
test: string[];
constructor();
}

View File

@ -0,0 +1,9 @@
console.log('test');
console.log('test2');
class test {
constructor() {
this.test = [];
console.log('hi');
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9jb21waWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdG9jb21waWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDcEIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNyQjtJQUVFO1FBREEsU0FBSSxHQUFhLEVBQUUsQ0FBQztRQUVsQixPQUFPLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ3BCLENBQUM7Q0FDRiJ9

0
test/assets/output/tocompile2.d.ts vendored Normal file
View File

View File

@ -0,0 +1,2 @@
console.log('hello');
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9jb21waWxlMi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RvY29tcGlsZTIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQyJ9

8
test/assets/tocompile.ts Normal file
View File

@ -0,0 +1,8 @@
console.log('test');
console.log('test2');
class test {
test: string[] = [];
constructor() {
console.log('hi');
}
}

View File

@ -0,0 +1 @@
console.log('hello');

19
test/test.ts Normal file
View File

@ -0,0 +1,19 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as tsn from '../ts/index';
let assetfiles: string[] = ['./test/assets/tocompile.ts', './test/assets/tocompile2.ts'];
let assetfiles2 = {
'./test/assets/**/!(*.d.ts|*.js|output)': './test/assets/output'
};
tap.test('should convert files from an array with single files to output', async tools => {
tsn.compileFileArray(assetfiles, { outDir: './test/assets/output' });
});
tap.test('should convert files from an array with single files to output', async tools => {
tsn.compileGlobStringObject(assetfiles2);
});
tap.start();