@jesscss/patch-css 2.0.0-alpha.7 → 2.0.0-alpha.9

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 +33 -3
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -1,5 +1,35 @@
1
- # patch-css
1
+ # @jesscss/patch-css
2
2
 
3
- A small utility module to be loaded in the head of a document, without async or defer, to attach any cached stylesheets in localStorage.
3
+ **A tiny runtime helper that attaches cached stylesheets from `localStorage` in
4
+ the document head.**
4
5
 
5
- To refresh the cache, run `updateSheet` for every stylesheet.
6
+ `@jesscss/patch-css` is a small browser utility from the
7
+ [Jess](https://github.com/jesscss/jess) project. Loaded synchronously in the
8
+ `<head>` — without `async` or `defer` — it re-attaches any stylesheets that were
9
+ previously cached in `localStorage`, so styling is in place before first paint.
10
+
11
+ It exposes a single function, `updateSheet(text, id)`, which inserts (or updates)
12
+ a `<style>` element for the given id and writes the current stylesheet cache back
13
+ to `localStorage`. To refresh the cache, call `updateSheet` for each stylesheet.
14
+
15
+ ## Install
16
+
17
+ ```sh
18
+ npm install @jesscss/patch-css
19
+ ```
20
+
21
+ The `latest` and `alpha` dist-tags both point at the current alpha.
22
+
23
+ ## Status
24
+
25
+ Alpha, and an early utility surface — expect the shape to change. Please
26
+ [report bugs](https://github.com/jesscss/jess/issues).
27
+
28
+ ## Links
29
+
30
+ - Repository: <https://github.com/jesscss/jess>
31
+ - Documentation: <https://jesscss.github.io/> (currently pre-alpha content)
32
+
33
+ ## License
34
+
35
+ [MIT](https://github.com/jesscss/jess/blob/dev/LICENSE)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jesscss/patch-css",
3
3
  "type": "module",
4
- "version": "2.0.0-alpha.7",
4
+ "version": "2.0.0-alpha.9",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -25,6 +25,7 @@
25
25
  "license": "MIT",
26
26
  "scripts": {
27
27
  "ci": "pnpm build && pnpm test",
28
+ "test": "echo 'patch-css has no active test suite (see test:tofix)'",
28
29
  "dist": "rollup -c",
29
30
  "build": "pnpm clean && pnpm compile",
30
31
  "clean": "shx rm -rf ./dist ./lib tsconfig.tsbuildinfo",