feat(core): Semantic release
This commit is contained in:
parent
5156e3063a
commit
14b78975bd
13
.travis.yml
13
.travis.yml
|
@ -1,5 +1,16 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "6"
|
||||
- "8"
|
||||
- "10"
|
||||
- "12"
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: release
|
||||
node_js: lts/*
|
||||
# script: skip
|
||||
deploy:
|
||||
provider: script
|
||||
skip_cleanup: true
|
||||
script:
|
||||
- npx semantic-release
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright (C) 2018 Dmitry Shirokov
|
||||
Copyright (C) 2019 Dmitry Shirokov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -17,7 +17,7 @@ npm i chardet
|
|||
To return the encoding with the highest confidence:
|
||||
```javascript
|
||||
var chardet = require('chardet');
|
||||
chardet.detect(Buffer.alloc('hello there!'));
|
||||
chardet.detect(Buffer.from('hello there!'));
|
||||
// or
|
||||
chardet.detectFile('/path/to/file', function(err, encoding) {});
|
||||
// or
|
||||
|
@ -28,7 +28,7 @@ chardet.detectFileSync('/path/to/file');
|
|||
To return the full list of possible encodings:
|
||||
```javascript
|
||||
var chardet = require('chardet');
|
||||
chardet.detectAll(Buffer.alloc('hello there!'));
|
||||
chardet.detectAll(Buffer.from('hello there!'));
|
||||
// or
|
||||
chardet.detectFileAll('/path/to/file', function(err, encoding) {});
|
||||
// or
|
||||
|
|
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "chardet",
|
||||
"version": "0.7.0",
|
||||
"version": "0.0.0-development",
|
||||
"homepage": "https://github.com/runk/node-chardet",
|
||||
"description": "Character detector",
|
||||
"keywords": [
|
||||
|
@ -20,12 +20,12 @@
|
|||
"@zevanty"
|
||||
],
|
||||
"devDependencies": {
|
||||
"github-publish-release": "^5.0.0",
|
||||
"mocha": "^5.2.0"
|
||||
"mocha": "^6.1.4",
|
||||
"semantic-release": "^15.13.18"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:runk/node-chardet.git"
|
||||
"url": "https://github.com/runk/node-chardet.git"
|
||||
},
|
||||
"bugs": {
|
||||
"mail": "deadrunk@gmail.com",
|
||||
|
@ -33,7 +33,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"test": "mocha -R spec --recursive --bail",
|
||||
"release": "scripts/release"
|
||||
"semantic-release": "semantic-release"
|
||||
},
|
||||
"main": "index.js",
|
||||
"engine": {
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit immediately if a pipeline returns non-zero status
|
||||
# http://www.gnu.org/software/bash/manual/bashref.html#The-Set-Builtin
|
||||
set -e
|
||||
|
||||
npm test
|
||||
|
||||
if [ -n "$npm_config_major" ]; then SEMVER="major"
|
||||
elif [ -n "$npm_config_patch" ]; then SEMVER="patch"
|
||||
else SEMVER="minor"; fi
|
||||
|
||||
npm version $SEMVER
|
||||
github-publish-release
|
||||
git push --follow-tags
|
||||
npm publish
|
Loading…
Reference in New Issue