Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.

Commit

Permalink
fix build options
Browse files Browse the repository at this point in the history
  • Loading branch information
sebasptsch committed Oct 12, 2022
1 parent 12b4f44 commit acaf9e7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import registerAutocompletes from './register-autocomples';
import registerEvents from './register-events';
import registerHelp from './register-help';
import registerCommands from './register-commands';
import MQTT from './services/MQTT';

dotenv.config();

Container.import([Logger, DB, Events, Client]);
Container.import([Logger, DB, Events, Client, MQTT]);

registerCommands();
registerHelp();
Expand Down
8 changes: 4 additions & 4 deletions src/services/Logger.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { config } from 'dotenv';
import signale from 'signale';
import { Service } from 'typedi';
import { Service, Token } from 'typedi';

config();
export const LoggerToken = new Token<Logger>('Logger');

/** Signale Logger instance */
@Service()
@Service({ id: Logger })
export default class Logger extends signale.Signale {
constructor() {
super({ disabled: false, interactive: false });
}
}

// const logger = new signale.Signale({
// disabled: false,
// interactive: false,
Expand Down
8 changes: 4 additions & 4 deletions tsup.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { defineConfig } from 'tsup';

export default defineConfig((options) => ({
export default defineConfig(() => ({
entry: ['src/index.ts', 'src/deploy-commands.ts', 'src/remove-commands.ts'],
splitting: !options.watch,
splitting: false,
sourcemap: true,
clean: true,
format: ['esm'],
platform: 'node',
minify: !options.watch,
dts: options.watch,
minify: false,
dts: true,
bundle: true,
metafile: true,
}));

0 comments on commit acaf9e7

Please sign in to comment.