rollup-plugin-conditional-compilation 0.0.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.
@@ -0,0 +1,47 @@
1
+ import { Plugin } from 'rollup';
2
+
3
+ interface RollupConditionalCompilationOptions {
4
+ variables: Record<string, unknown>;
5
+ }
6
+ type l = RollupConditionalCompilationOptions;
7
+ declare global {
8
+ type Opts = l;
9
+ const enum Dirv {
10
+ If = "#if",
11
+ Else = "#else",
12
+ Elif = "#elif",
13
+ Endif = "#endif"
14
+ }
15
+ interface IfBlock {
16
+ condition: boolean;
17
+ ifStart: number;
18
+ ifEnd: number;
19
+ endifStart: number;
20
+ endifEnd: number;
21
+ children: IfBlock[];
22
+ }
23
+ interface DirvBlock<D extends Dirv = Dirv> {
24
+ dirv: D;
25
+ condition: D extends Dirv.Endif ? null : boolean;
26
+ start: number;
27
+ end: number;
28
+ }
29
+ }
30
+
31
+ /**
32
+ * @param options options of the plugin
33
+ *
34
+ * ## About
35
+ * @package
36
+ * @author Kasukabe Tsumugi <futami16237@gmail.com>
37
+ * @version 0.1.0 (Last Update: 2025.10.07 16:24:21.460)
38
+ * @license MIT
39
+ * @link https://github.com/baendlorel/rollup-plugin-conditional-compilation
40
+ * @link https://baendlorel.github.io/ Welcome to my site!
41
+ * @description Conditional Compilation macros like #if #endif in C++.
42
+ * @copyright Copyright (c) 2025 Kasukabe Tsumugi. All rights reserved.
43
+ *
44
+ */
45
+ declare function conditionalCompilation(options?: Partial<RollupConditionalCompilationOptions>): Plugin;
46
+
47
+ export { conditionalCompilation as default };