1 | /**
|
2 | * Data about the environment in which JSDoc is running, including the configuration settings that
|
3 | * were used to run JSDoc.
|
4 | *
|
5 | * @module jsdoc/env
|
6 | */
|
7 | module.exports = {
|
8 | /**
|
9 | * The times at which JSDoc started and finished.
|
10 | *
|
11 | * @type {Object}
|
12 | * @property {Date} start - The time at which JSDoc started running.
|
13 | * @property {Date} finish - The time at which JSDoc finished running.
|
14 | */
|
15 | run: {
|
16 | start: new Date(),
|
17 | finish: null
|
18 | },
|
19 |
|
20 | /**
|
21 | * The command-line arguments passed to JSDoc.
|
22 | *
|
23 | * @type {Array<*>}
|
24 | */
|
25 | args: [],
|
26 |
|
27 | /**
|
28 | * The data parsed from JSDoc's configuration file.
|
29 | *
|
30 | * @type Object<string, *>
|
31 | */
|
32 | conf: {},
|
33 |
|
34 | /**
|
35 | * The absolute path to the base directory in which JSDoc is located. Set at startup.
|
36 | *
|
37 | * @private
|
38 | * @type {string}
|
39 | */
|
40 | dirname: null,
|
41 |
|
42 | /**
|
43 | * The user's working directory at the time when JSDoc started running.
|
44 | *
|
45 | * @private
|
46 | * @type {string}
|
47 | */
|
48 | pwd: null,
|
49 |
|
50 | /**
|
51 | * The command-line arguments, parsed into a key/value hash.
|
52 | *
|
53 | * @type {Object}
|
54 | * @example if (global.env.opts.help) { console.log('Helpful message.'); }
|
55 | */
|
56 | opts: {},
|
57 |
|
58 | /**
|
59 | * The source files that JSDoc will parse.
|
60 | *
|
61 | * @type {Array<string>}
|
62 | * @memberof env
|
63 | */
|
64 | sourceFiles: [],
|
65 |
|
66 | /**
|
67 | * The JSDoc version number and revision date.
|
68 | *
|
69 | * @type {Object<string, string>}
|
70 | * @property {string} number - The JSDoc version number.
|
71 | * @property {string} revision - The JSDoc revision number, expressed as a UTC date string.
|
72 | */
|
73 | version: {
|
74 | number: null,
|
75 | revision: null
|
76 | }
|
77 | };
|