rollup-plugin-conditional-compilation 1.0.4 → 1.0.6
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/README.md +11 -4
- package/dist/index.cjs +6486 -1
- package/dist/index.d.ts +20 -6
- package/dist/index.mjs +6484 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
+
import * as acorn from 'acorn';
|
|
2
3
|
|
|
3
4
|
interface RollupConditionalCompilationOptions {
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Variables to be used in the expressions `#if` or `#elif`
|
|
7
|
+
*/
|
|
8
|
+
variables: Record<string, unknown>;
|
|
9
|
+
/**
|
|
10
|
+
* Will be passed to Acorn
|
|
11
|
+
* - default: 'module'
|
|
12
|
+
*/
|
|
13
|
+
sourceType: 'script' | 'module';
|
|
14
|
+
/**
|
|
15
|
+
* Will be passed to Acorn
|
|
16
|
+
* - default: 'latest'
|
|
17
|
+
*/
|
|
18
|
+
ecmaVersion: acorn.ecmaVersion;
|
|
5
19
|
}
|
|
6
20
|
|
|
7
21
|
/**
|
|
22
|
+
* ## Usage
|
|
23
|
+
* Using `// #if` and `// #endif` to do the conditional compilation like C++!
|
|
8
24
|
* @param options options of the plugin
|
|
9
25
|
*
|
|
10
26
|
* ## About
|
|
11
|
-
* @package
|
|
27
|
+
* @package
|
|
12
28
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
13
|
-
* @version 1.0.
|
|
29
|
+
* @version 1.0.6 (Last Update: 2025.10.09 06:41:12.284)
|
|
14
30
|
* @license MIT
|
|
15
31
|
* @link https://github.com/baendlorel/rollup-plugin-conditional-compilation
|
|
16
32
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
17
33
|
* @description Conditional Compilation macros like #if #endif in C++.
|
|
18
34
|
* @copyright Copyright (c) 2025 Kasukabe Tsumugi. All rights reserved.
|
|
19
35
|
*/
|
|
20
|
-
declare function conditionalCompilation(
|
|
21
|
-
options?: Partial<RollupConditionalCompilationOptions>
|
|
22
|
-
): Plugin;
|
|
36
|
+
declare function conditionalCompilation(options?: Partial<RollupConditionalCompilationOptions>): Plugin;
|
|
23
37
|
|
|
24
38
|
export { conditionalCompilation as default };
|