crelt 1.0.4 → 1.0.6
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/LICENSE +1 -1
- package/dist/index.d.cts +4 -0
- package/index.d.ts +3 -6
- package/package.json +11 -5
- package/rollup.config.js +10 -4
- /package/dist/{index.js → index.cjs} +0 -0
- /package/{index.es.js → index.js} +0 -0
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (C) 2020 by Marijn Haverbeke <
|
|
1
|
+
Copyright (C) 2020 by Marijn Haverbeke <marijn@haverbeke.berlin>
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
4
|
of this software and associated documentation files (the "Software"), to deal
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
type Child = string | Node | null | undefined | readonly Child[]
|
|
2
|
+
|
|
3
|
+
export default function crelt(elt: string | HTMLElement, attrs: {[attr: string]: any}, ...children: Child[]): HTMLElement
|
|
4
|
+
export default function crelt(elt: string | HTMLElement, ...children: Child[]): HTMLElement
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type Child = string | Node | null | undefined | readonly Child[]
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function crelt(elt: string | HTMLElement,
|
|
6
|
-
attrs?: Child | {[attr: string]: any},
|
|
7
|
-
...children: Child[]): HTMLElement
|
|
3
|
+
export default function crelt(elt: string | HTMLElement, attrs: {[attr: string]: any}, ...children: Child[]): HTMLElement
|
|
4
|
+
export default function crelt(elt: string | HTMLElement, ...children: Child[]): HTMLElement
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crelt",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Tiny DOM-element-creation utility",
|
|
5
|
-
"main": "dist/index.
|
|
6
|
-
"
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
"import": "./index.js",
|
|
9
|
+
"require": "./dist/index.cjs"
|
|
10
|
+
},
|
|
11
|
+
"module": "index.js",
|
|
7
12
|
"types": "index.d.ts",
|
|
8
13
|
"scripts": {
|
|
9
14
|
"prepare": "rollup -c"
|
|
@@ -17,13 +22,14 @@
|
|
|
17
22
|
"creation",
|
|
18
23
|
"crel"
|
|
19
24
|
],
|
|
20
|
-
"author": "Marijn Haverbeke <
|
|
25
|
+
"author": "Marijn Haverbeke <marijn@haverbeke.berlin>",
|
|
21
26
|
"license": "MIT",
|
|
22
27
|
"bugs": {
|
|
23
28
|
"url": "https://github.com/marijnh/crelt/issues"
|
|
24
29
|
},
|
|
25
30
|
"homepage": "https://github.com/marijnh/crelt#readme",
|
|
26
31
|
"devDependencies": {
|
|
27
|
-
"rollup": "^2.0.5"
|
|
32
|
+
"rollup": "^2.0.5",
|
|
33
|
+
"rollup-plugin-copy": "^3.4.0"
|
|
28
34
|
}
|
|
29
35
|
}
|
package/rollup.config.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import copy from "rollup-plugin-copy"
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
|
-
input: "index.
|
|
4
|
+
input: "index.js",
|
|
3
5
|
output: {
|
|
4
|
-
file: "dist/index.
|
|
5
|
-
format: "cjs"
|
|
6
|
-
|
|
6
|
+
file: "dist/index.cjs",
|
|
7
|
+
format: "cjs",
|
|
8
|
+
exports: "default"
|
|
9
|
+
},
|
|
10
|
+
plugins: [
|
|
11
|
+
copy({targets: [{src: "index.d.ts", dest: "dist", rename: () => "index.d.cts"}]})
|
|
12
|
+
]
|
|
7
13
|
}
|
|
File without changes
|
|
File without changes
|