@docpensieve/shared 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/constants.js +18 -2
- package/types/constants.d.ts +17 -2
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -6,8 +6,24 @@
|
|
|
6
6
|
/** File extensions recognised as documentation pages. */
|
|
7
7
|
export const DOC_EXTENSIONS = ['.md', '.mdx'];
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Name of the configuration file `init` writes at the project root.
|
|
11
|
+
*
|
|
12
|
+
* `.mjs` rather than `.js`: the file is an ES module, and Node reads a `.js`
|
|
13
|
+
* file as one only when the nearest package.json declares "type": "module".
|
|
14
|
+
* Elsewhere it warns on every build — or refuses the file outright when that
|
|
15
|
+
* package.json says "commonjs", as `npm init -y` now writes.
|
|
16
|
+
*/
|
|
17
|
+
export const CONFIG_FILENAME = 'docpensieve.config.mjs';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Names accepted for the configuration file, in the order they are looked for.
|
|
21
|
+
* The `.js` spelling still works in a project whose package.json declares
|
|
22
|
+
* "type": "module".
|
|
23
|
+
*
|
|
24
|
+
* @type {readonly string[]}
|
|
25
|
+
*/
|
|
26
|
+
export const CONFIG_FILENAMES = Object.freeze([CONFIG_FILENAME, 'docpensieve.config.js']);
|
|
11
27
|
|
|
12
28
|
/** Default output directory of a build. */
|
|
13
29
|
export const DEFAULT_OUT_DIR = 'dist';
|
package/types/constants.d.ts
CHANGED
|
@@ -4,8 +4,23 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/** File extensions recognised as documentation pages. */
|
|
6
6
|
export declare const DOC_EXTENSIONS: string[];
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Name of the configuration file `init` writes at the project root.
|
|
9
|
+
*
|
|
10
|
+
* `.mjs` rather than `.js`: the file is an ES module, and Node reads a `.js`
|
|
11
|
+
* file as one only when the nearest package.json declares "type": "module".
|
|
12
|
+
* Elsewhere it warns on every build — or refuses the file outright when that
|
|
13
|
+
* package.json says "commonjs", as `npm init -y` now writes.
|
|
14
|
+
*/
|
|
15
|
+
export declare const CONFIG_FILENAME = "docpensieve.config.mjs";
|
|
16
|
+
/**
|
|
17
|
+
* Names accepted for the configuration file, in the order they are looked for.
|
|
18
|
+
* The `.js` spelling still works in a project whose package.json declares
|
|
19
|
+
* "type": "module".
|
|
20
|
+
*
|
|
21
|
+
* @type {readonly string[]}
|
|
22
|
+
*/
|
|
23
|
+
export declare const CONFIG_FILENAMES: readonly string[];
|
|
9
24
|
/** Default output directory of a build. */
|
|
10
25
|
export declare const DEFAULT_OUT_DIR = "dist";
|
|
11
26
|
/** Version manifest written by every build. */
|