chore: publish dist from root dir (#32)
This commit is contained in:
parent
43b526a870
commit
64fd600435
5 changed files with 36 additions and 41 deletions
19
.npmignore
Normal file
19
.npmignore
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
node_modules/
|
||||||
|
examples/
|
||||||
|
assets/
|
||||||
|
src/
|
||||||
|
.vscode/
|
||||||
|
tsconfig.json
|
||||||
|
|
||||||
|
# temporary files
|
||||||
|
*~
|
||||||
|
*swo
|
||||||
|
*swp
|
||||||
|
|
||||||
|
# nitro site
|
||||||
|
site/
|
||||||
|
*.log*
|
||||||
|
.nitro
|
||||||
|
.cache
|
||||||
|
.output
|
||||||
|
.env
|
19
package-lock.json
generated
19
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "web-component-base",
|
"name": "web-component-base",
|
||||||
"version": "2.0.6",
|
"version": "0.0.0-experimental.12",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "web-component-base",
|
"name": "web-component-base",
|
||||||
"version": "2.0.6",
|
"version": "0.0.0-experimental.12",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"site"
|
"site"
|
||||||
|
@ -15,8 +15,7 @@
|
||||||
"@size-limit/preset-small-lib": "^11.0.0",
|
"@size-limit/preset-small-lib": "^11.0.0",
|
||||||
"esbuild": "^0.19.9",
|
"esbuild": "^0.19.9",
|
||||||
"prettier": "^3.1.1",
|
"prettier": "^3.1.1",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2"
|
||||||
"uglify-js": "^3.17.4"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@cloudflare/kv-asset-handler": {
|
"node_modules/@cloudflare/kv-asset-handler": {
|
||||||
|
@ -4016,18 +4015,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz",
|
||||||
"integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA=="
|
"integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA=="
|
||||||
},
|
},
|
||||||
"node_modules/uglify-js": {
|
|
||||||
"version": "3.17.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz",
|
|
||||||
"integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==",
|
|
||||||
"dev": true,
|
|
||||||
"bin": {
|
|
||||||
"uglifyjs": "bin/uglifyjs"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.8.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ultrahtml": {
|
"node_modules/ultrahtml": {
|
||||||
"version": "1.5.2",
|
"version": "1.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/ultrahtml/-/ultrahtml-1.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/ultrahtml/-/ultrahtml-1.5.2.tgz",
|
||||||
|
|
32
package.json
32
package.json
|
@ -1,40 +1,37 @@
|
||||||
{
|
{
|
||||||
"name": "web-component-base",
|
"name": "web-component-base",
|
||||||
"version": "2.1.0-beta",
|
"version": "2.1.0-beta.1",
|
||||||
"description": "A zero-dependency & tiny JS base class for creating reactive custom elements easily",
|
"description": "A zero-dependency & tiny JS base class for creating reactive custom elements easily",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"import": "./index.js"
|
"import": "./dist/index.js"
|
||||||
},
|
},
|
||||||
"./*": {
|
"./*": {
|
||||||
"types": "./*.d.ts",
|
"types": "./dist/*.d.ts",
|
||||||
"import": "./*.js"
|
"import": "./dist/*.js"
|
||||||
},
|
},
|
||||||
"./utils": {
|
"./utils": {
|
||||||
"types": "./utils/index.d.ts",
|
"types": "./dist/utils/index.d.ts",
|
||||||
"import": "./utils/index.js"
|
"import": "./dist/utils/index.js"
|
||||||
},
|
},
|
||||||
"./utils/*": {
|
"./utils/*": {
|
||||||
"types": "./utils/*.d.ts",
|
"types": "./dist/utils/*.d.ts",
|
||||||
"import": "./utils/*.js"
|
"import": "./dist/utils/*.js"
|
||||||
},
|
|
||||||
"./WebComponent.min.js": {
|
|
||||||
"types": "./WebComponent.d.ts",
|
|
||||||
"import": "./WebComponent.min.js"
|
|
||||||
},
|
},
|
||||||
"./package.json": "./package.json"
|
"./package.json": "./package.json"
|
||||||
},
|
},
|
||||||
|
"main": "./dist/index.js",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "npx simple-server .",
|
"start": "npx simple-server .",
|
||||||
"demo": "npx simple-server .",
|
"demo": "npx simple-server .",
|
||||||
"site": "npm start -w site",
|
"site": "npm start -w site",
|
||||||
"build": "npm run clean && tsc && npm run copy:meta && npm run copy:source",
|
"build": "npm run clean && tsc && npm run copy:source",
|
||||||
"clean": "rm -rf dist",
|
"clean": "rm -rf dist",
|
||||||
"copy:meta": "node prepare.js && cp README.md ./dist && cp LICENSE ./dist && cp -r ./src/vendors ./dist",
|
|
||||||
"copy:source": "esbuild --minify --bundle ./src/*.js ./src/utils/* --outdir=\"./dist\" --format=\"esm\"",
|
"copy:source": "esbuild --minify --bundle ./src/*.js ./src/utils/* --outdir=\"./dist\" --format=\"esm\"",
|
||||||
"pub": "npm run clean && npm run build && cd ./dist && npm publish",
|
"pub": "npm run clean && npm run build && npm publish",
|
||||||
"pub:patch": "npm version patch && npm run pub",
|
"pub:patch": "npm version patch && npm run pub",
|
||||||
"pub:minor": "npm version minor && npm run pub",
|
"pub:minor": "npm version minor && npm run pub",
|
||||||
"check:size": "npm run build && size-limit ./dist/WebComponent.js",
|
"check:size": "npm run build && size-limit ./dist/WebComponent.js",
|
||||||
|
@ -57,8 +54,7 @@
|
||||||
"@size-limit/preset-small-lib": "^11.0.0",
|
"@size-limit/preset-small-lib": "^11.0.0",
|
||||||
"esbuild": "^0.19.9",
|
"esbuild": "^0.19.9",
|
||||||
"prettier": "^3.1.1",
|
"prettier": "^3.1.1",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2"
|
||||||
"uglify-js": "^3.17.4"
|
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"site"
|
"site"
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { writeFileSync } from "node:fs";
|
|
||||||
import { createRequire } from "node:module";
|
|
||||||
|
|
||||||
const require = createRequire(import.meta.url);
|
|
||||||
const pkg = require("./package.json");
|
|
||||||
const { scripts, devDependencies, ...rest } = pkg;
|
|
||||||
writeFileSync("./dist/package.json", JSON.stringify(rest));
|
|
Loading…
Reference in a new issue