Compare commits

..

8 Commits

Author SHA1 Message Date
Zeno Rocha
d17eca050e 2.0.4 2018-11-12 20:42:07 -08:00
kovenliao
5381600a26 fix webpack umd build (#599) 2018-11-12 20:35:19 -08:00
Zeno Rocha
5be63e28dd 2.0.3 2018-11-11 18:56:51 -08:00
Rouven Weßling
adc669df06 Always run webpack in production mode. (#595)
Otherwise horribly inefficent code that evals(!) strings of code is generated.
2018-11-11 18:53:43 -08:00
Rouven Weßling
b57e6d019f Don't claim to support ESM 2018-11-11 18:51:00 -08:00
Rouven Weßling
3d005b547e Maintain banner in minified file 2018-11-11 18:49:23 -08:00
Zeno Rocha
cf9e8fd7ce Updates devDependencies 2018-11-11 09:58:44 -08:00
Zeno Rocha
f1d99de5d3 Removes .npmignore file 2018-11-11 09:48:15 -08:00
8 changed files with 2327 additions and 717 deletions

View File

@@ -1,7 +0,0 @@
/.*/
/demo/
/test/
/.*
/bower.json
/karma.conf.js
/src

View File

@@ -1,6 +1,6 @@
{
"name": "clipboard",
"version": "2.0.2",
"version": "2.0.4",
"description": "Modern copy to clipboard. No Flash. Just 3kb",
"license": "MIT",
"main": "dist/clipboard.js",

954
dist/clipboard.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2043
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
Package.describe({
name: "zenorocha:clipboard",
summary: "Modern copy to clipboard. No Flash. Just 3kb.",
version: "2.0.2",
version: "2.0.4",
git: "https://github.com/zenorocha/clipboard.js"
});

View File

@@ -1,11 +1,10 @@
{
"name": "clipboard",
"version": "2.0.2",
"version": "2.0.4",
"description": "Modern copy to clipboard. No Flash. Just 2kb",
"repository": "zenorocha/clipboard.js",
"license": "MIT",
"main": "dist/clipboard.js",
"module": "dist/clipboard.js",
"keywords": [
"clipboard",
"copy",
@@ -21,25 +20,25 @@
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
"babel-preset-env": "^1.6.1",
"chai": "^3.4.1",
"cross-env": "^3.1.4",
"karma": "^1.3.0",
"chai": "^4.2.0",
"cross-env": "^5.2.0",
"karma": "^3.1.1",
"karma-chai": "^0.1.0",
"karma-mocha": "^1.2.0",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sinon": "^1.0.4",
"karma-webpack": "^2.0.2",
"mocha": "^3.1.2",
"karma-webpack": "^3.0.5",
"mocha": "^5.2.0",
"phantomjs-prebuilt": "^2.1.4",
"sinon": "^1.17.2",
"uglifyjs-webpack-plugin": "^1.2.4",
"sinon": "^7.1.1",
"uglifyjs-webpack-plugin": "^2.0.1",
"webpack": "^4.5.0",
"webpack-cli": "^3.1.2"
},
"scripts": {
"build": "npm run build-debug && npm run build-min",
"build-debug": "webpack --mode=development",
"build-min": "cross-env NODE_ENV=production webpack --mode=production",
"build-debug": "webpack",
"build-min": "cross-env NODE_ENV=production webpack",
"build-watch": "webpack --watch",
"test": "karma start --single-run",
"prepublish": "npm run build"

View File

@@ -12,11 +12,13 @@ Licensed MIT © Zeno Rocha`;
module.exports = {
entry: './src/clipboard.js',
mode: 'production',
output: {
filename: production ? 'clipboard.min.js' : 'clipboard.js',
path: path.resolve(__dirname, 'dist'),
library: 'ClipboardJS',
libraryTarget: 'umd'
libraryTarget: 'umd',
globalObject: 'this'
},
module: {
rules: [
@@ -24,6 +26,7 @@ module.exports = {
]
},
optimization: {
minimize: production,
minimizer: [
new UglifyJSPlugin({
parallel: require('os').cpus().length,
@@ -32,7 +35,7 @@ module.exports = {
keep_fnames: false,
output: {
beautify: false,
comments: false
comments: (node, {value, type}) => type == 'comment2' && value.startsWith('!')
}
}
})