File tree 4 files changed +15
-6
lines changed
4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,11 @@ $ npm install --save bcdice
18
18
## Usage
19
19
JavaScript (CommonJS)
20
20
``` js
21
- const { DynamicLoader } = require (' bcdice' );
21
+ const { DynamicLoader , Version } = require (' bcdice' );
22
22
23
23
async function main () {
24
+ console .log (' BCDice Version:' , Version);
25
+
24
26
const loader = new DynamicLoader ();
25
27
26
28
console .log (loader .listAvailableGameSystems ().map (info => info .id ));
@@ -40,9 +42,11 @@ main();
40
42
41
43
TypeScript
42
44
``` ts
43
- import { DynamicLoader } from ' bcdice' ;
45
+ import { DynamicLoader , Version } from ' bcdice' ;
44
46
45
47
async function main(): Promise <void > {
48
+ console .log (' BCDice Version:' , Version );
49
+
46
50
const loader = new DynamicLoader ();
47
51
48
52
console .log (loader .listAvailableGameSystems ().map (info => info .id ));
Original file line number Diff line number Diff line change 1
1
/* eslint-env node */
2
2
/* eslint-disable @typescript-eslint/no-var-requires */
3
3
4
- // const { DynamicLoader } = require('bcdice');
5
- const { DynamicLoader } = require ( '../../lib' ) ;
4
+ // const { DynamicLoader, Version } = require('bcdice');
5
+ const { DynamicLoader, Version } = require ( '../../lib' ) ;
6
6
7
7
async function main ( ) {
8
+ console . log ( 'BCDice Version:' , Version ) ;
9
+
8
10
const loader = new DynamicLoader ( ) ;
9
11
10
12
console . log ( loader . listAvailableGameSystems ( ) . map ( info => info . id ) ) ;
Original file line number Diff line number Diff line change 1
- // import { DynamicLoader } from 'bcdice';
2
- import { DynamicLoader } from '../../lib' ;
1
+ // import { DynamicLoader, Version } from 'bcdice';
2
+ import { DynamicLoader , Version } from '../../lib' ;
3
3
4
4
async function main ( ) : Promise < void > {
5
+ console . log ( 'BCDice Version:' , Version ) ;
6
+
5
7
const loader = new DynamicLoader ( ) ;
6
8
7
9
console . log ( loader . listAvailableGameSystems ( ) . map ( info => info . id ) ) ;
Original file line number Diff line number Diff line change 1
1
export { default as Base } from './base' ;
2
2
export { default as DynamicLoader } from './loader/dynamic_loader' ;
3
3
export { default as UserDefinedDiceTable } from './user_defined_dice_table' ;
4
+ export { default as Version } from './version' ;
You can’t perform that action at this time.
0 commit comments