Revert previous changes
parent
7132702f57
commit
51c294b471
|
@ -1,9 +1,5 @@
|
||||||
dev
|
dev
|
||||||
.DS_Store
|
dist
|
||||||
.idea
|
.idea
|
||||||
node_modules
|
node_modules
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
index.js
|
|
||||||
index.mjs
|
|
||||||
noinit
|
|
||||||
shareon.min.css
|
|
||||||
|
|
34
package.json
34
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "shareon",
|
"name": "shareon",
|
||||||
"version": "1.3.0-5",
|
"version": "1.2.1",
|
||||||
"description": "Lightweight, stylish and ethical share buttons for popular social networks",
|
"description": "Lightweight, stylish and ethical share buttons for popular social networks",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://shareon.js.org",
|
"homepage": "https://shareon.js.org",
|
||||||
|
@ -21,27 +21,15 @@
|
||||||
"email": "nick@karamoff.dev",
|
"email": "nick@karamoff.dev",
|
||||||
"url": "https://karamoff.dev"
|
"url": "https://karamoff.dev"
|
||||||
},
|
},
|
||||||
"main": "./index.js",
|
"main": "./dist/shareon.cjs",
|
||||||
"module": "./index.mjs",
|
"module": "./dist/shareon.mjs",
|
||||||
"unpkg": "./index.js",
|
"unpkg": "./dist/shareon.min.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./package.json": "./package.json",
|
"require": "./dist/shareon.cjs",
|
||||||
".": {
|
"import": "./dist/shareon.mjs"
|
||||||
"browser": "./index.js",
|
|
||||||
"require": "./index.js",
|
|
||||||
"import": "./index.mjs"
|
|
||||||
},
|
|
||||||
"./noinit": {
|
|
||||||
"browser": "./noinit/index.js",
|
|
||||||
"require": "./noinit/index.js",
|
|
||||||
"import": "./noinit/index.mjs"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"dist"
|
||||||
"index.mjs",
|
|
||||||
"noinit/index.js",
|
|
||||||
"noinit/index.mjs"
|
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rollup -c",
|
"build": "rollup -c",
|
||||||
|
@ -78,16 +66,18 @@
|
||||||
"size-limit": [
|
"size-limit": [
|
||||||
{
|
{
|
||||||
"limit": "1 KB",
|
"limit": "1 KB",
|
||||||
"path": "./index.js",
|
"path": "./dist/shareon.min.js",
|
||||||
"webpack": false
|
"webpack": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"limit": "1 KB",
|
"limit": "1 KB",
|
||||||
"path": "./index.mjs"
|
"path": [
|
||||||
|
"./dist/shareon.cjs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"limit": "7 KB",
|
"limit": "7 KB",
|
||||||
"path": "./shareon.min.css",
|
"path": "./dist/shareon.min.css",
|
||||||
"webpack": false
|
"webpack": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -10,7 +10,7 @@ const isDev = process.env.ROLLUP_WATCH || process.env.NODE_ENV === 'development'
|
||||||
|
|
||||||
const pkg = require('./package.json');
|
const pkg = require('./package.json');
|
||||||
|
|
||||||
const outputDir = isDev ? './dev/' : './';
|
const outputDir = isDev ? './dev/' : './dist/';
|
||||||
|
|
||||||
const bannerText = `${pkg.name} v${pkg.version} by Nikita Karamov\n${pkg.homepage}`;
|
const bannerText = `${pkg.name} v${pkg.version} by Nikita Karamov\n${pkg.homepage}`;
|
||||||
|
|
||||||
|
@ -67,32 +67,26 @@ const getOutputs = (baseDir) => {
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
result.push({
|
result.push({
|
||||||
name: pkg.name,
|
name: pkg.name,
|
||||||
format: 'umd',
|
format: 'iife',
|
||||||
file: `${baseDir}index.js`,
|
file: `${baseDir}${pkg.name}.js`,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// result.push({
|
result.push({
|
||||||
// name: pkg.name,
|
name: pkg.name,
|
||||||
// format: 'cjs',
|
format: 'cjs',
|
||||||
// file: `${baseDir}index.cjs`,
|
file: `${baseDir}${pkg.name}.cjs`,
|
||||||
// });
|
});
|
||||||
result.push({
|
result.push({
|
||||||
name: pkg.name,
|
name: pkg.name,
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
file: `${baseDir}index.mjs`,
|
file: `${baseDir}${pkg.name}.mjs`,
|
||||||
});
|
});
|
||||||
result.push({
|
result.push({
|
||||||
name: pkg.name,
|
name: pkg.name,
|
||||||
format: 'umd',
|
format: 'iife',
|
||||||
file: `${baseDir}index.js`,
|
file: `${baseDir}${pkg.name}.min.js`,
|
||||||
plugins: [terser({ output: { comments: false } })],
|
plugins: [terser({ output: { comments: false } })],
|
||||||
});
|
});
|
||||||
// result.push({
|
|
||||||
// name: pkg.name,
|
|
||||||
// format: 'iife',
|
|
||||||
// file: `${baseDir}index.min.js`,
|
|
||||||
// plugins: [terser({ output: { comments: false } })],
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue