@substrate-system/radio-input 0.0.1 → 0.0.3
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/README.md +16 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
[](https://semver.org/)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
|
|
9
|
-
Radio inputs with some style.
|
|
10
|
-
|
|
11
|
-
[See a live demo](https://substrate-system.github.io/radio-input/)
|
|
9
|
+
Radio inputs with some style. [See a live demo](https://substrate-system.github.io/radio-input/)
|
|
12
10
|
|
|
13
11
|
<!-- toc -->
|
|
14
12
|
|
|
@@ -21,7 +19,7 @@ Radio inputs with some style.
|
|
|
21
19
|
* [CSS variables](#css-variables)
|
|
22
20
|
- [Example](#example)
|
|
23
21
|
* [HTML](#html)
|
|
24
|
-
* [pre-built
|
|
22
|
+
* [pre-built](#pre-built)
|
|
25
23
|
|
|
26
24
|
<!-- tocstop -->
|
|
27
25
|
|
|
@@ -33,11 +31,14 @@ npm i -S @substrate-system/radio-input
|
|
|
33
31
|
|
|
34
32
|
## API
|
|
35
33
|
|
|
36
|
-
This exposes ESM and common JS via [package.json `exports` field](https://nodejs.org/api/packages.html#exports).
|
|
34
|
+
This exposes ESM and common JS via [package.json `exports` field](https://nodejs.org/api/packages.html#exports). Just import the package, then you can use the tag, `<radio-input>` , in HTML.
|
|
37
35
|
|
|
38
36
|
### ESM
|
|
39
37
|
```js
|
|
40
38
|
import '@substrate-system/radio-input'
|
|
39
|
+
import '@substrate-system/radio-input/css'
|
|
40
|
+
// or minified CSS
|
|
41
|
+
import '@substrate-system/radio-input/css/min'
|
|
41
42
|
```
|
|
42
43
|
|
|
43
44
|
### attributes
|
|
@@ -96,16 +97,23 @@ import '@substrate-system/radio-input/css'
|
|
|
96
97
|
</form>
|
|
97
98
|
```
|
|
98
99
|
|
|
99
|
-
### pre-built
|
|
100
|
-
This package exposes minified JS files too. Copy them to a location that is
|
|
100
|
+
### pre-built
|
|
101
|
+
This package exposes minified JS and CSS files too. Copy them to a location that is
|
|
101
102
|
accessible to your web server, then link to them in HTML.
|
|
102
103
|
|
|
103
104
|
#### copy
|
|
104
105
|
```sh
|
|
105
106
|
cp ./node_modules/@substrate-system/radio-input/dist/index.min.js ./public/radio-input.min.js
|
|
107
|
+
cp ./node_modules/@substrate-system/radio-input/dist/style.min.css ./public/radio-input.min.css
|
|
106
108
|
```
|
|
107
109
|
|
|
108
110
|
#### HTML
|
|
109
111
|
```html
|
|
110
|
-
<
|
|
112
|
+
<head>
|
|
113
|
+
<link rel="stylesheet" href="./radio-input.min.css">
|
|
114
|
+
</head>
|
|
115
|
+
<body>
|
|
116
|
+
<!-- ... -->
|
|
117
|
+
<script type="module" src="./radio-input.min.js"></script>
|
|
118
|
+
</body>
|
|
111
119
|
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrate-system/radio-input",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"./dist/*"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"build-cjs": "esbuild src/*.ts --format=cjs --keep-names --tsconfig=tsconfig.build.json --outdir=./dist --out-extension:.js=.cjs --sourcemap",
|
|
17
17
|
"build-esm": "esbuild src/*.ts --format=esm --metafile=dist/meta.json --keep-names --tsconfig=tsconfig.build.json --outdir=./dist --sourcemap && tsc --emitDeclarationOnly --project tsconfig.build.json --outDir dist",
|
|
18
18
|
"build-esm:min": "esbuild ./src/*.ts --format=esm --keep-names --bundle --tsconfig=tsconfig.build.json --minify --out-extension:.js=.min.js --outdir=./dist --sourcemap",
|
|
19
|
-
"build-example": "mkdir -p ./public && rm -rf ./public/* && vite --base=\"/radio-input\" build",
|
|
19
|
+
"build-example": "mkdir -p ./public && rm -rf ./public/* && VITE_DEBUG_MODE=staging vite --mode staging --base=\"/radio-input\" build",
|
|
20
20
|
"build-docs": "typedoc --tsconfig tsconfig.build.json ./src/index.ts",
|
|
21
21
|
"build": "mkdir -p ./dist && rm -rf ./dist/* && npm run build-cjs && npm run build-esm && npm run build-esm:min && npm run build-css && npm run build-css:min",
|
|
22
22
|
"start": "vite",
|