mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Adds test for browserify
This commit adds tests to make sure that the browserify bundle will work in the dist file of clipboard.js This commit adds the mocha and chai modules, since karma doesn't work well with node only tests. Also splited tests tasks in package.json and updated .gitignore
This commit is contained in:
committed by
Zeno Rocha
parent
623614a4e0
commit
4534fc4ca0
16
package.json
16
package.json
@@ -6,9 +6,14 @@
|
||||
"main": "dist/clipboard.js",
|
||||
"browser": "src/clipboard.js",
|
||||
"browserify": {
|
||||
"transform": [["babelify", {
|
||||
"loose": "all"
|
||||
}]]
|
||||
"transform": [
|
||||
[
|
||||
"babelify",
|
||||
{
|
||||
"loose": "all"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -29,6 +34,7 @@
|
||||
"karma-mocha": "^0.2.0",
|
||||
"karma-phantomjs-launcher": "^0.2.1",
|
||||
"karma-sinon": "^1.0.4",
|
||||
"mocha": "^2.3.3",
|
||||
"phantomjs-polyfill": "0.0.1",
|
||||
"uglify": "^0.1.5"
|
||||
},
|
||||
@@ -36,6 +42,8 @@
|
||||
"publish": "npm run build && npm run minify",
|
||||
"build": "browserify src/clipboard.js -s Clipboard -o dist/clipboard.js",
|
||||
"minify": "uglify -s dist/clipboard.js -o dist/clipboard.min.js",
|
||||
"test": "karma start --single-run"
|
||||
"test": "npm run mocha | npm run karma",
|
||||
"karma": "karma start --single-run",
|
||||
"mocha": "mocha test/node.js"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user