macroforge 0.1.4 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +13 -15
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # macroforge
2
2
 
3
+ > **Warning:** This is a work in progress and probably won't work for you. Use at your own risk!
4
+
3
5
  TypeScript macro expansion engine powered by Rust and SWC.
4
6
 
5
7
  ## Overview
@@ -214,8 +216,7 @@ napi-build = "2.3.1"
214
216
 
215
217
  **src/lib.rs:**
216
218
  ```rust
217
- use macroforge_ts::ts_macro_derive::ts_macro_derive;
218
- use macroforge_ts::ts_quote::body;
219
+ use macroforge_ts::macros::{ts_macro_derive, body};
219
220
  use macroforge_ts::ts_syn::{
220
221
  Data, DeriveInput, MacroforgeError, TsStream, parse_ts_macro_input,
221
222
  };
@@ -263,19 +264,16 @@ The `ts_template!` and `body!` macros support:
263
264
  `macroforge_ts` re-exports everything needed for macro development:
264
265
 
265
266
  ```rust
266
- // All available via macroforge_ts::*
267
- pub extern crate ts_syn; // AST types, parsing
268
- pub extern crate ts_quote; // Code generation templates
269
- pub extern crate ts_macro_derive; // #[ts_macro_derive] attribute
270
- pub extern crate inventory; // Macro registration
271
- pub extern crate serde_json; // Serialization
272
- pub extern crate napi; // Node.js bindings
273
- pub extern crate napi_derive; // NAPI proc-macros
274
-
275
- // SWC modules
276
- pub use ts_syn::swc_core;
277
- pub use ts_syn::swc_common;
278
- pub use ts_syn::swc_ecma_ast;
267
+ // TypeScript syntax types
268
+ use macroforge_ts::ts_syn::*;
269
+
270
+ // Macro attributes and quote templates
271
+ use macroforge_ts::macros::{ts_macro_derive, body, ts_template, above, below};
272
+
273
+ // SWC modules (for advanced use)
274
+ use macroforge_ts::swc_core;
275
+ use macroforge_ts::swc_common;
276
+ use macroforge_ts::swc_ecma_ast;
279
277
  ```
280
278
 
281
279
  ## Integration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "macroforge",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "TypeScript macro expansion engine powered by Rust and SWC",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -41,12 +41,12 @@
41
41
  "node": ">= 18"
42
42
  },
43
43
  "optionalDependencies": {
44
- "@macroforge/bin-darwin-x64": "0.1.4",
45
- "@macroforge/bin-darwin-arm64": "0.1.4",
46
- "@macroforge/bin-linux-x64-gnu": "0.1.4",
47
- "@macroforge/bin-linux-arm64-gnu": "0.1.4",
48
- "@macroforge/bin-win32-x64-msvc": "0.1.4",
49
- "@macroforge/bin-win32-arm64-msvc": "0.1.4"
44
+ "@macroforge/bin-darwin-x64": "0.1.6",
45
+ "@macroforge/bin-darwin-arm64": "0.1.6",
46
+ "@macroforge/bin-linux-x64-gnu": "0.1.6",
47
+ "@macroforge/bin-linux-arm64-gnu": "0.1.6",
48
+ "@macroforge/bin-win32-x64-msvc": "0.1.6",
49
+ "@macroforge/bin-win32-arm64-msvc": "0.1.6"
50
50
  },
51
51
  "scripts": {
52
52
  "artifacts": "napi artifacts --npm-dir npm"