@normed/bundle 2.0.1 → 2.0.4

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/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ # 2.0.4
2
+
3
+ * MINOR: Fixes builds to actually use the normal compiler and not tsc
4
+ * MINOR: declarations now work for typescript
5
+ * MINOR: metafiles can be output with --analyse
6
+
7
+ # 2.0.3
8
+
9
+ * MINOR: Adds color
10
+ * MINOR: Bumps dependencies
11
+ * MINOR: Uses bundle's own log function for logging in cli rather than console.log/error
12
+ * MINOR: Fixes build to support ES202 and less types
13
+ * MINOR: Correctly handles escaping Windows paths during substitution
14
+ * MINOR: Alters build logs to have relative paths only
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Premise
2
+
3
+ A used-in-production proof of concept bundler, `@normed/bundle` bundles with output directory structure as *the* first class citizen. Given files in a source directory (defaults to `src`) it transpiles and bundles the entrypoints into the destination directory (defaults to `bundles`). The twist is that any file containing the pre-prefix `static` is automatically an entrypoint, and aside from stripping the pre-prefix and transforming the prefix (ie. `ts` -> `js`) the relative structure remains the same.
4
+
5
+ ## Examples
6
+
7
+ ```
8
+ in: out:
9
+ src/ bundles/
10
+ ├─ api.ts |
11
+ ├─ logger.ts |
12
+ ├─ index.static.ts ├─ index.js
13
+ ├─ public/ ├─ public/
14
+ ├─ base.style.less |
15
+ ├─ favicon.static.ico ├─ favicon.ico
16
+ ├─ index.static.less ├─ index.css
17
+ ├─ index.static.pug ├─ index.html
18
+ ├─ index.static.ts ├─ index.js
19
+ ```
20
+
21
+ # Things to note
22
+
23
+ The following global javascript variables are available in most environments:
24
+ * `__filename` and `__dirname` - refers to the executing bundle filename/dirname
25
+ The following additional variables provided by `@normed/bundle`, and do not exist by default if not built by `@normed/bundle`:
26
+ * `__source_filename` and `__source_dirname` - refer to the original source files absolute filename/dirname
27
+ * `__source_relative_filename` and `__source_relative_dirname` - refer to the original source files filename/direnation relative to the source directory
28
+
29
+ The current version of `@normed/bundle` is built on top of es-build for speed.
30
+
31
+ # Development
32
+
33
+ ## build pipeline
34
+
35
+ `@normed/bundle` is bootstrapped by being built from typescript to javascript first (using `tsc`, output to `dist`), then using the javascript output to build the original source (output to `bundles-a`), then using that output to build the original source again (output to `bundles`), and finally the last two outputs are compared to ensure they are the same.
@@ -0,0 +1 @@
1
+ export {};