Rename shareon to index
parent
bac84769e8
commit
59399f5a1c
|
@ -1,5 +1,6 @@
|
|||
dev
|
||||
dist
|
||||
!dist/noinit/package.json
|
||||
.DS_Store
|
||||
.idea
|
||||
node_modules
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"main": "index.cjs",
|
||||
"module": "index.mjs",
|
||||
"browser": {
|
||||
"./index.js": "./index.min.js"
|
||||
}
|
||||
}
|
30
package.json
30
package.json
|
@ -21,22 +21,26 @@
|
|||
"email": "nick@karamoff.dev",
|
||||
"url": "https://karamoff.dev"
|
||||
},
|
||||
"main": "./dist/shareon.cjs",
|
||||
"module": "./dist/shareon.mjs",
|
||||
"unpkg": "./dist/shareon.min.js",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"unpkg": "./dist/index.min.js",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"browser": "./dist/shareon.min.js",
|
||||
"require": "./dist/shareon.cjs",
|
||||
"import": "./dist/shareon.mjs"
|
||||
"browser": "./dist/index.min.js",
|
||||
"require": "./dist/index.cjs",
|
||||
"import": "./dist/index.mjs"
|
||||
},
|
||||
"./noinit/package.json": "./dist/noinit/package.json",
|
||||
"./noinit": {
|
||||
"browser": "./dist/noinit/shareon.min.js",
|
||||
"require": "./dist/noinit/shareon.cjs",
|
||||
"import": "./dist/noinit/shareon.mjs"
|
||||
"browser": "./dist/noinit/index.min.js",
|
||||
"require": "./dist/noinit/index.cjs",
|
||||
"import": "./dist/noinit/index.mjs"
|
||||
}
|
||||
},
|
||||
"browser": {
|
||||
"./index.js": "./dist/index.min.js"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
|
@ -75,18 +79,16 @@
|
|||
"size-limit": [
|
||||
{
|
||||
"limit": "1 KB",
|
||||
"path": "./dist/shareon.min.js",
|
||||
"path": "./dist/index.min.js",
|
||||
"webpack": false
|
||||
},
|
||||
{
|
||||
"limit": "1 KB",
|
||||
"path": [
|
||||
"./dist/shareon.cjs"
|
||||
]
|
||||
"path": "./dist/index.mjs"
|
||||
},
|
||||
{
|
||||
"limit": "7 KB",
|
||||
"path": "./dist/shareon.min.css",
|
||||
"path": "./dist/index.min.css",
|
||||
"webpack": false
|
||||
}
|
||||
]
|
||||
|
|
|
@ -68,23 +68,23 @@ const getOutputs = (baseDir) => {
|
|||
result.push({
|
||||
name: pkg.name,
|
||||
format: 'iife',
|
||||
file: `${baseDir}${pkg.name}.js`,
|
||||
file: `${baseDir}index.js`,
|
||||
});
|
||||
} else {
|
||||
result.push({
|
||||
name: pkg.name,
|
||||
format: 'cjs',
|
||||
file: `${baseDir}${pkg.name}.cjs`,
|
||||
file: `${baseDir}index.cjs`,
|
||||
});
|
||||
result.push({
|
||||
name: pkg.name,
|
||||
format: 'esm',
|
||||
file: `${baseDir}${pkg.name}.mjs`,
|
||||
file: `${baseDir}index.mjs`,
|
||||
});
|
||||
result.push({
|
||||
name: pkg.name,
|
||||
format: 'iife',
|
||||
file: `${baseDir}${pkg.name}.min.js`,
|
||||
file: `${baseDir}index.min.js`,
|
||||
plugins: [terser({ output: { comments: false } })],
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue