Using RollUp
This commit is contained in:
1673
dist/sigpro-ui.cjs
vendored
Normal file
1673
dist/sigpro-ui.cjs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1617
dist/sigpro-ui.esm.js
vendored
Normal file
1617
dist/sigpro-ui.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1385
dist/sigpro-ui.js
vendored
1385
dist/sigpro-ui.js
vendored
File diff suppressed because it is too large
Load Diff
7
dist/sigpro-ui.min.js
vendored
7
dist/sigpro-ui.min.js
vendored
File diff suppressed because one or more lines are too long
1676
dist/sigpro-ui.umd.js
vendored
Normal file
1676
dist/sigpro-ui.umd.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
dist/sigpro-ui.umd.min.js
vendored
Normal file
1
dist/sigpro-ui.umd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
53
package.json
53
package.json
@@ -1,14 +1,22 @@
|
||||
{
|
||||
"name": "sigpro-ui",
|
||||
"version": "1.0.4",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"main": "./dist/sigpro-ui.js",
|
||||
"module": "./index.js",
|
||||
"unpkg": "./dist/sigpro-ui.min.js",
|
||||
"jsdelivr": "./dist/sigpro-ui.min.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/natxocc/sigpro-ui.git"
|
||||
},
|
||||
"main": "./dist/sigpro-ui.cjs",
|
||||
"module": "./dist/sigpro-ui.esm.js",
|
||||
"unpkg": "./dist/sigpro-ui.umd.min.js",
|
||||
"jsdelivr": "./dist/sigpro-ui.umd.min.js",
|
||||
"exports": {
|
||||
".": "./index.js"
|
||||
".": {
|
||||
"import": "./dist/sigpro-ui.esm.js",
|
||||
"require": "./dist/sigpro-ui.cjs"
|
||||
}
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/natxocc/sigpro-ui/issues"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
@@ -18,21 +26,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"homepage": "https://natxocc.github.io/sigpro-ui/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/natxocc/sigpro-ui.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/natxocc/sigpro-ui/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"docs": "bun x serve docs",
|
||||
"build": "bun build ./index.js --bundle --external sigpro --outfile=./dist/sigpro-ui.js --format=iife --global-name=SigProUI --global-name=sigpro=SigProCore && bun build ./index.js --bundle --external sigpro --outfile=./dist/sigpro-ui.min.js --format=iife --global-name=SigProUI --global-name=sigpro=SigProCore --minify",
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"sigpro": ">=1.1.16"
|
||||
},
|
||||
"keywords": [
|
||||
"signals",
|
||||
"reactive",
|
||||
@@ -41,5 +34,19 @@
|
||||
"UI",
|
||||
"vanilla-js",
|
||||
"reactive-programming"
|
||||
]
|
||||
],
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"docs": "bun x serve docs",
|
||||
"build": "rollup -c",
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"sigpro": ">=1.1.16"
|
||||
},
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"rollup": "^4.34.8"
|
||||
}
|
||||
}
|
||||
49
rollup.config.js
Normal file
49
rollup.config.js
Normal file
@@ -0,0 +1,49 @@
|
||||
import terser from '@rollup/plugin-terser';
|
||||
|
||||
export default [
|
||||
// ESM
|
||||
{
|
||||
input: './index.js',
|
||||
external: ['sigpro'],
|
||||
output: {
|
||||
file: './dist/sigpro-ui.esm.js',
|
||||
format: 'esm'
|
||||
}
|
||||
},
|
||||
// CommonJS
|
||||
{
|
||||
input: './index.js',
|
||||
external: ['sigpro'],
|
||||
output: {
|
||||
file: './dist/sigpro-ui.cjs',
|
||||
format: 'cjs'
|
||||
}
|
||||
},
|
||||
// UMD (IIFE para navegador)
|
||||
{
|
||||
input: './index.js',
|
||||
external: ['sigpro'],
|
||||
output: {
|
||||
file: './dist/sigpro-ui.umd.js',
|
||||
format: 'iife',
|
||||
name: 'SigProUI',
|
||||
globals: {
|
||||
sigpro: 'SigProCore'
|
||||
}
|
||||
}
|
||||
},
|
||||
// UMD minificado
|
||||
{
|
||||
input: './index.js',
|
||||
external: ['sigpro'],
|
||||
output: {
|
||||
file: './dist/sigpro-ui.umd.min.js',
|
||||
format: 'iife',
|
||||
name: 'SigProUI',
|
||||
globals: {
|
||||
sigpro: 'SigProCore'
|
||||
},
|
||||
plugins: [terser()]
|
||||
}
|
||||
}
|
||||
];
|
||||
Reference in New Issue
Block a user