klenod-plugin-javascript 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a961463a8ad09b4be5a7ddb6dd4d32dcf31a7d95f9c3408b8832916426b60d9a
4
+ data.tar.gz: a540320c4088451e7b0452484460f1b809b66afc0b7bea88f6b8bfcc795ed9b4
5
+ SHA512:
6
+ metadata.gz: a048c250b3e6d362e61dc7f7154575cbe90ed65d0561adefeb96c72d10174ac746f2d2229a325e8cc3db6172e348771ea58fb7242faaace5fda17d9324f17677
7
+ data.tar.gz: 801039ee6bc6ea8e4718870ff8e1be2bb05fe58010986ef3b8774d00dddbf7e39fb93ce50399c7fe6538d27047cf06f4583f8b22d392bccf485762fd0a7ec55d
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # klenod-plugin-javascript
2
+
3
+ JavaScript asset plugin for [Klenod](https://github.com/aalin/klenod), powered
4
+ by [SWC](https://swc.rs/).
5
+
6
+ It:
7
+
8
+ - collects static imports, re-exports, and string-literal dynamic imports
9
+ - transforms JavaScript, TypeScript, JSX, and TSX
10
+ - rewrites local imports to content-hashed asset paths
11
+ - preserves external URL imports
12
+
13
+ Bare package imports and npm resolution are not currently supported.
14
+
15
+ ## Options
16
+
17
+ ```ruby
18
+ require "klenod/plugin/javascript"
19
+
20
+ Klenod::Build::Plugins::JavaScriptPlugin.new(
21
+ source_maps: :development,
22
+ minify: false
23
+ )
24
+ ```
25
+
26
+ - `source_maps:` accepts `false`, `true`, or `:development` (the default).
27
+ - `minify:` also minifies in development when `true`; build output is always
28
+ minified.