Skip to content
28 changes: 28 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
language: node_js
node_js:
- "6.12.0"
- "node"
- "lts/*"
- "8"
- "7"
- "6"
- "5"
- "4"

cache: yarn

before_script:
- yarn global add bower
- bower -v
- bower i
- yarn global add phantomjs
- phantomjs --version
- yarn global add mocha
- mocha --version
- yarn global add mocha-phantomjs
- mocha-phantomjs --version

script:
- yarn run build
- mocha-phantomjs ./test/test.html
- yarn run spec
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"main": "./jquery.serialize-object.js",
"scripts": {
"test": "npm run build && open ./test/test.html",
"build": "npm run minify",
"minify": "uglifyjs jquery.serialize-object.js -m -c --comments > dist/jquery.serialize-object.min.js"
"spec": "mocha -u tdd --reporter spec",
"build": "npm run minify > dist/jquery.serialize-object.min.js",
"minify": "uglifyjs jquery.serialize-object.js -m -c --comments"
},
"repository": {
"type": "git",
Expand All @@ -29,6 +30,7 @@
"url": "https://github.com/macek/jquery-serialize-object/issues"
},
"devDependencies": {
"mocha": "^5.0.1",
"uglify-js": "^2.4.16"
}
}