fix(core):
This commit is contained in:
@ -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
15
ts/tsbundle.logger.ts
Normal 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());
|
@ -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';
|
||||
|
Reference in New Issue
Block a user