不要怂,就是干,撸起袖子干!

Commit 010111b7 by Sushant

Added npm scripts based build

* Moved all tasks to simple npm scripts
* Updated Docs
* Removed makefile
1 parent 2115a06d
Showing with 45 additions and 9 deletions
......@@ -29,8 +29,8 @@ before_script:
- "psql sequelize_test -c 'create extension postgis;' -U postgres"
script:
- "make test"
- "npm test"
matrix:
fast_finish: true
include:
......
......@@ -124,10 +124,10 @@ All tests are located in the `test` folder (which contains the
lovely [Mocha](http://visionmedia.github.io/mocha/) tests).
```console
$ make all || mysql || sqlite || pgsql || postgres || mariadb || postgres-native
$ npm run all || mysql || sqlite || pgsql || postgres || mariadb || postgres-native
$ # alternatively you can pass database credentials with $variables when testing
$ DIALECT=dialect SEQ_DB=database SEQ_USER=user SEQ_PW=password make test
$ DIALECT=dialect SEQ_DB=database SEQ_USER=user SEQ_PW=password npm test
```
#### 4a. Check the documentation
......@@ -186,4 +186,4 @@ Yes
4. Update changelog to match version number, commit changelog
5. `git push --tags origin master`
6. `npm publish .`
7. Copy changelog for version to release notes for version on github
7. Copy changelog for version to release notes for version on github
......@@ -87,11 +87,47 @@
],
"main": "index",
"scripts": {
"test": "make all",
"test-docker": "docker-compose run sequelize /bin/sh -c \"make all\"",
"test-docker-unit": "docker-compose run sequelize /bin/sh -c \"make test-unit-all\"",
"test": "if [ $COVERAGE ]; then npm run codeclimate; else npm run jshint && npm run teaser && npm run test-unit && npm run test-integration; fi",
"test-docker": "docker-compose run sequelize /bin/sh -c \"npm run all\"",
"test-docker-unit": "docker-compose run sequelize /bin/sh -c \"npm run test-unit-all\"",
"build-docker": "docker-compose build",
"docs": "node docs/docs-generator.js"
"docs": "node docs/docs-generator.js",
"jshint": "./node_modules/.bin/jshint lib test",
"teaser": "echo ''; node -pe \"Array(20 + process.env.DIALECT.length + 3).join('#')\"; echo '# Running tests for '$DIALECT' #'; node -pe \"Array(20 + process.env.DIALECT.length + 3).join('#')\";echo '';",
"test-unit": "./node_modules/.bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 15000 --reporter spec 'test/unit/**/*.js'",
"test-unit-mysql":"DIALECT=mysql npm run test-unit",
"test-unit-postgres":"DIALECT=postgres npm run test-unit",
"test-unit-postgres-native":"DIALECT=postgres-native npm run test-unit",
"test-unit-mariadb":"DIALECT=mariadb npm run test-unit",
"test-unit-sqlite":"DIALECT=sqlite npm run test-unit",
"test-unit-mssql":"DIALECT=mssql npm run test-unit",
"test-unit-all":"npm run test-unit-mysql && npm run test-unit-postgres && npm run test-unit-postgres-native && npm run test-unit-mssql && npm run test-unit-sqlite && npm run test-unit-mariadb",
"test-integration": "./node_modules/.bin/mocha --globals setImmediate,clearImmediate --ui tdd --check-leaks --colors -t 15000 --reporter spec --grep ''$GREP'' 'test/integration/**/*.test.js'",
"test-integration-mysql":"DIALECT=mysql npm run test-integration",
"test-integration-postgres":"DIALECT=postgres npm run test-integration",
"test-integration-postgres-native":"DIALECT=postgres-native npm run test-integration",
"test-integration-mariadb":"DIALECT=mariadb npm run test-integration",
"test-integration-sqlite":"DIALECT=sqlite npm run test-integration",
"test-integration-mssql":"DIALECT=mssql npm run test-integration",
"test-integration-all":"npm run test-integration-mysql && npm run test-integration-postgres && npm run test-integration-postgres-native && npm run test-integration-mssql && npm run test-integration-sqlite && npm run test-integration-mariadb",
"cover": "rm -rf coverage && npm run teaser && COVERAGE=true ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- -t 30000 --ui tdd 'test/integration/**/*.test.js'",
"mysql-cover": "DIALECT=mysql npm run cover && mv coverage coverage-mysql",
"sqlite-cover": "DIALECT=sqlite npm run cover && mv coverage coverage-sqlite",
"postgres-cover": "DIALECT=postgres npm run cover && mv coverage coverage-postgres",
"postgres-native-cover": "DIALECT=postgres-native npm run cover && mv coverage coverage-postgres-native",
"mariadb-cover": "DIALECT=mariadb npm run cover && mv coverage coverage-mariadb",
"mssql-cover": "DIALECT=mssql npm run cover && mv coverage coverage-mssql",
"merge-coverage": "rm -rf coverage && mkdir coverage && './node_modules/.bin/lcov-result-merger coverage-*/lcov.info' 'coverage/lcov.info'",
"codeclimate-send": "npm install -g codeclimate-test-reporter && CODECLIMATE_REPO_TOKEN=ce835a510bbf423a5ab5400a9bdcc2ec2d189d840b31657c6ee7cb9916b161d6 codeclimate < coverage/lcov.info",
"cover-all": "npm run mysql-cover && npm run postgres-cover && npm run postgres-native-cover && npm run mssql-cover && npm run sqlite-cover && npm run mariadb-cover",
"codeclimate": "npm run cover-all && npm run codeclimate-send",
"mysql": "DIALECT=mysql npm test",
"sqlite": "DIALECT=sqlite npm test",
"postgres": "DIALECT=postgres npm test",
"postgres-native": "DIALECT=postgres-native npm test",
"mariadb": "DIALECT=mariadb npm test",
"mssql": "DIALECT=mssql npm test",
"all": "npm run mysql && npm run sqlite && npm run postgres && npm run postgres-native && npm run mariadb && npm run mssql"
},
"engines": {
"node": ">=0.6.21"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!