@localnerve/web-component-build 0.2.2 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +8 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,13 +2,19 @@
2
2
 
3
3
  > Assembles a web component from css, html, and js parts
4
4
 
5
+ [![npm version](https://badge.fury.io/js/@localnerve%2Fweb-component-build.svg)](https://badge.fury.io/js/@localnerve%2Fweb-component-build)
6
+ ![Verify](https://github.com/localnerve/web-component-build/workflows/Verify/badge.svg)
7
+ [![Coverage Status](https://coveralls.io/repos/github/localnerve/web-component-build/badge.svg?branch=main)](https://coveralls.io/github/localnerve/web-component-build?branch=main)
8
+
5
9
  This library assembles a web component from its parts, allowing developers to author the component's parts in separate files. The parts are processed and written to an output directory. After processing, this library exposes the parts to a calling build process.
6
10
 
7
11
  The following is a table of _some_ of the possible input, processing, and output combos. See [options](#options) for detailed explanation of the processing input.
8
12
 
9
13
  | input | processing | output |
10
14
  | ----- | ---------- | ------ |
11
- | javascript | minify or optional pass-thru | javascript |
15
+ | javascript | minify javascript | javascript |
16
+ | css | minify css | css |
17
+ | html | minify html | html |
12
18
  | css, html | minify css, prepend style tag to html, minify html | css, html |
13
19
  | css, html, cssHref | minfy css, prepend style tag to html, prepend link tag to html, minify html | css, html |
14
20
  | cssHref, html | prepend link tag to html, minify html | html |
@@ -76,7 +82,7 @@ One or more of `cssPath`, `jsPath`, and/or `htmlPath` **must** be supplied. They
76
82
  + cssLinkHref will be prepended in a `link` tag
77
83
  + html will be inserted into the javascript file if `jsReplacement` and `jsPath` is supplied
78
84
  * `jsPath` {String} - Full path to the input javascript file
79
- * `jsReplacement` {String} - The token to replace with the css or html in the javascript file
85
+ * `jsReplacement` {String|RegExp} - The replacement pattern for the css or html in the javascript file. See [pattern](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#pattern) for full documentation
80
86
  If supplied:
81
87
  + A replacement will be attempted in the javascript file
82
88
  + If **not supplied** or falsy, No replacement will be attempted and all assets are just copied to `outputDir`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localnerve/web-component-build",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "A library to help build web components",
5
5
  "main": "index.js",
6
6
  "type": "module",