Browse Source

Move commands config to TS

ts-style-manager
Artur Arseniev 4 years ago
parent
commit
75318f8010
  1. 10
      src/commands/config/config.js
  2. 28
      src/commands/config/config.ts

10
src/commands/config/config.js

@ -1,10 +0,0 @@
export default {
stylePrefix: 'com-',
// Default array of commands
defaults: [],
// If true, stateful commands (with `run` and `stop` methods) can't be runned multiple times.
// So, if the command is already active, running it again will not execute the `run` method
strict: 1,
};

28
src/commands/config/config.ts

@ -0,0 +1,28 @@
export interface CommandsConfig {
/**
* Style prefix
* @default 'com-'
*/
stylePrefix?: string;
/**
* Default array of commands
* @default []
*/
defaults: any[];
/**
* If true, stateful commands (with `run` and `stop` methods) can't be executed multiple times.
* If the command is already active, running it again will not execute the `run` method.
* @default true
*/
strict: boolean;
}
const config: CommandsConfig = {
stylePrefix: 'com-',
defaults: [],
strict: true,
};
export default config;
Loading…
Cancel
Save