Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
4b0d99cf3a | |||
38426a24bc | |||
dadd0b70b3 | |||
516b0ff578 |
@ -36,6 +36,7 @@ auditProductionDependencies:
|
|||||||
- npmci command npm audit --audit-level=high --only=prod --production
|
- npmci command npm audit --audit-level=high --only=prod --production
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
auditDevDependencies:
|
auditDevDependencies:
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
14512
package-lock.json
generated
14512
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsbundle",
|
"name": "@gitzone/tsbundle",
|
||||||
"version": "1.0.79",
|
"version": "1.0.81",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "a bundler using rollup for painless bundling of web projects",
|
"description": "a bundler using rollup for painless bundling of web projects",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -8,7 +8,7 @@
|
|||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "cd test && node ../cli.ts.js --production",
|
"test": "(tstest test/) && (cd test && node ../cli.ts.js --production)",
|
||||||
"build": "(tsbuild --web)"
|
"build": "(tsbuild --web)"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -1,8 +1,15 @@
|
|||||||
import { expect, tap } from '@pushrocks/tapbundle';
|
import { expect, tap } from '@pushrocks/tapbundle';
|
||||||
import * as tsbundle from '../ts/index';
|
import * as tsbundle from '../ts/index';
|
||||||
|
|
||||||
tap.test('first test', async () => {
|
import * as path from 'path';
|
||||||
|
|
||||||
|
tap.skip.test('first test', async () => {
|
||||||
await tsbundle.runCli();
|
await tsbundle.runCli();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
tap.test('should run a custom function', async () => {
|
||||||
|
const tsbundleInstance = new tsbundle.TsBundle();
|
||||||
|
await tsbundleInstance.buildProduction(process.cwd(), './test/ts_web/index.ts', './test/dist_manual/index.js')
|
||||||
|
})
|
||||||
|
|
||||||
tap.start();
|
tap.start();
|
||||||
|
@ -1,3 +1,18 @@
|
|||||||
const myConst = 'hello';
|
const myConst: string = 'hello';
|
||||||
|
|
||||||
|
function sealed(constructor: Function) {
|
||||||
|
Object.seal(constructor);
|
||||||
|
Object.seal(constructor.prototype);
|
||||||
|
}
|
||||||
|
|
||||||
|
@sealed
|
||||||
|
class BugReport {
|
||||||
|
type = "report";
|
||||||
|
title: string;
|
||||||
|
|
||||||
|
constructor(t: string) {
|
||||||
|
this.title = t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
console.log(myConst);
|
console.log(myConst);
|
||||||
|
@ -126,7 +126,9 @@ export class TsBundle {
|
|||||||
/**
|
/**
|
||||||
* creates a bundle for the production environment
|
* creates a bundle for the production environment
|
||||||
*/
|
*/
|
||||||
public async buildProduction(fromArg: string, toArg: string) {
|
public async buildProduction(cwdArg: string, fromArg: string, toArg: string) {
|
||||||
|
process.chdir(cwdArg);
|
||||||
|
console.log(process.cwd())
|
||||||
// create a bundle
|
// create a bundle
|
||||||
logger.log('info', `bundling for PRODUCTION!`);
|
logger.log('info', `bundling for PRODUCTION!`);
|
||||||
const buildOptions = this.getOptionsProduction(fromArg, toArg);
|
const buildOptions = this.getOptionsProduction(fromArg, toArg);
|
||||||
|
@ -10,7 +10,7 @@ export const runCli = async () => {
|
|||||||
// const htmlHandler = new HtmlHandler();
|
// const htmlHandler = new HtmlHandler();
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case argvArg.production || process.env.CI:
|
case argvArg.production || process.env.CI:
|
||||||
await tsbundle.buildProduction(argvArg.from, argvArg.to);
|
await tsbundle.buildProduction(process.cwd(), argvArg.from, argvArg.to);
|
||||||
// await htmlHandler.minifyHtml();
|
// await htmlHandler.minifyHtml();
|
||||||
break;
|
break;
|
||||||
case argvArg.test:
|
case argvArg.test:
|
||||||
@ -26,7 +26,7 @@ export const runCli = async () => {
|
|||||||
// const htmlHandler = new HtmlHandler();
|
// const htmlHandler = new HtmlHandler();
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case argvArg.production || process.env.CI:
|
case argvArg.production || process.env.CI:
|
||||||
await tsbundle.buildProduction('./ts_web/index.ts', './dist_bundle/bundle.js');
|
await tsbundle.buildProduction(process.cwd(), './ts_web/index.ts', './dist_bundle/bundle.js');
|
||||||
// await htmlHandler.minifyHtml();
|
// await htmlHandler.minifyHtml();
|
||||||
break;
|
break;
|
||||||
case argvArg.test:
|
case argvArg.test:
|
||||||
@ -42,7 +42,7 @@ export const runCli = async () => {
|
|||||||
// const htmlHandler = new HtmlHandler();
|
// const htmlHandler = new HtmlHandler();
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case argvArg.production || process.env.CI:
|
case argvArg.production || process.env.CI:
|
||||||
await tsbundle.buildProduction('./ts/index.ts', './dist_bundle/bundle.js');
|
await tsbundle.buildProduction(process.cwd(), './ts/index.ts', './dist_bundle/bundle.js');
|
||||||
// await htmlHandler.minifyHtml();
|
// await htmlHandler.minifyHtml();
|
||||||
break;
|
break;
|
||||||
case argvArg.test:
|
case argvArg.test:
|
||||||
@ -58,7 +58,7 @@ export const runCli = async () => {
|
|||||||
const htmlHandler = new HtmlHandler();
|
const htmlHandler = new HtmlHandler();
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case argvArg.production || process.env.CI:
|
case argvArg.production || process.env.CI:
|
||||||
await tsbundle.buildProduction('./ts_web/index.ts', './dist_serve/bundle.js');
|
await tsbundle.buildProduction(process.cwd(), './ts_web/index.ts', './dist_serve/bundle.js');
|
||||||
await htmlHandler.minifyHtml();
|
await htmlHandler.minifyHtml();
|
||||||
break;
|
break;
|
||||||
case argvArg.test:
|
case argvArg.test:
|
||||||
|
5
tsconfig.json
Normal file
5
tsconfig.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"experimentalDecorators": true
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user