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
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- "6"
|
|
||||||
- "8"
|
- "8"
|
||||||
- "10"
|
- "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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
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:
|
To return the encoding with the highest confidence:
|
||||||
```javascript
|
```javascript
|
||||||
var chardet = require('chardet');
|
var chardet = require('chardet');
|
||||||
chardet.detect(Buffer.alloc('hello there!'));
|
chardet.detect(Buffer.from('hello there!'));
|
||||||
// or
|
// or
|
||||||
chardet.detectFile('/path/to/file', function(err, encoding) {});
|
chardet.detectFile('/path/to/file', function(err, encoding) {});
|
||||||
// or
|
// or
|
||||||
|
@ -28,7 +28,7 @@ chardet.detectFileSync('/path/to/file');
|
||||||
To return the full list of possible encodings:
|
To return the full list of possible encodings:
|
||||||
```javascript
|
```javascript
|
||||||
var chardet = require('chardet');
|
var chardet = require('chardet');
|
||||||
chardet.detectAll(Buffer.alloc('hello there!'));
|
chardet.detectAll(Buffer.from('hello there!'));
|
||||||
// or
|
// or
|
||||||
chardet.detectFileAll('/path/to/file', function(err, encoding) {});
|
chardet.detectFileAll('/path/to/file', function(err, encoding) {});
|
||||||
// or
|
// or
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "chardet",
|
"name": "chardet",
|
||||||
"version": "0.7.0",
|
"version": "0.0.0-development",
|
||||||
"homepage": "https://github.com/runk/node-chardet",
|
"homepage": "https://github.com/runk/node-chardet",
|
||||||
"description": "Character detector",
|
"description": "Character detector",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -20,12 +20,12 @@
|
||||||
"@zevanty"
|
"@zevanty"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"github-publish-release": "^5.0.0",
|
"mocha": "^6.1.4",
|
||||||
"mocha": "^5.2.0"
|
"semantic-release": "^15.13.18"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@github.com:runk/node-chardet.git"
|
"url": "https://github.com/runk/node-chardet.git"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"mail": "deadrunk@gmail.com",
|
"mail": "deadrunk@gmail.com",
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha -R spec --recursive --bail",
|
"test": "mocha -R spec --recursive --bail",
|
||||||
"release": "scripts/release"
|
"semantic-release": "semantic-release"
|
||||||
},
|
},
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"engine": {
|
"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