fix(core):

This commit is contained in:
2019-05-06 14:00:21 +02:00
parent a5d1927dcb
commit ae375e30e3
6 changed files with 143 additions and 2 deletions

View File

@ -1,4 +1,8 @@
import * as early from '@pushrocks/early';
early.start('tsbundle');
import * as plugins from './tsbundle.plugins';
import { logger } from './tsbundle.logger';
early.stop();
const rollupOptions: plugins.rollup.RollupOptions = {
input: `ts_web/index.ts`,
@ -72,9 +76,11 @@ const rollupOptions: plugins.rollup.RollupOptions = {
async function build() {
// create a bundle
logger.log('info', `starting bundling now!`);
const bundle = await plugins.rollup.rollup(rollupOptions);
bundle.generate(rollupOptions.output);
bundle.write(rollupOptions.output);
logger.log('ok', `Successfully bundled files!`);
}
build();

15
ts/tsbundle.logger.ts Normal file
View File

@ -0,0 +1,15 @@
import * as plugins from './tsbundle.plugins';
export const logger = new plugins.smartlog.Smartlog({
logContext: {
company: 'Some Company',
companyunit: 'Some CompanyUnit',
containerName: 'Some Containername',
environment: "local",
runtime: 'node',
zone: 'gitzone'
},
minimumLogLevel: 'silly'
});
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());

View File

@ -1,3 +1,13 @@
// pushrocks scope
import * as smartlog from '@pushrocks/smartlog';
import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local';
export {
smartlog,
smartlogDestinationLocal
}
// third party scope
import * as rollup from 'rollup';
import rollupBabel from 'rollup-plugin-babel';
import rollupCommonjs from 'rollup-plugin-commonjs';