Skip to content

Commit

Permalink
chore: jswork scope
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Nov 21, 2020
1 parent b0cdadb commit 138ce07
Show file tree
Hide file tree
Showing 19 changed files with 148 additions and 141 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ package-lock.json
.DS_Store
.idea
.vscode

# vscode localhistory
.history
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ test
__tests__
src
build
docs
gulpfile.js

.editorconfig
Expand All @@ -16,3 +17,9 @@ LICENSE.txt
Rakefile
express.js
.vscode
.release-it.json


# vscode localhistory
.history
.release-it.json
17 changes: 17 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"git": {
"requireCleanWorkingDir": false
},
"hooks": {
"after:init": [
"npm run test",
"t2k"
],
"after:bump": [
"npm run build"
]
},
"github": {
"release": true
}
}
5 changes: 0 additions & 5 deletions Gemfile

This file was deleted.

38 changes: 33 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,45 @@
# next-tx-cos-regions
> Const for tencent cos regions.
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @feizheng/next-tx-cos-regions
npm install -S @jswork/next-tx-cos-regions
```

## usage
```js
import '@feizheng/next-tx-cos-regions';
import '@jswork/next-tx-cos-regions';

//DOCS here!
nx.txCosRegions = [
"ap-chengdu",
"ap-chongqing",
"ap-shanghai",
"ap-chongqing",
"ap-beijing",
"ap-nanjing",
"ap-guangzhou",
"ap-shenzhen-fsi",
"ap-shanghai-fsi",
"ap-beijing-fsi"
];
```

## resources
- https://cloud.tencent.com/document/product/436/6224
## license
Code released under [the MIT license](https://github.com/afeiship/next-tx-cos-regions/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-tx-cos-regions
[version-url]: https://npmjs.org/package/@jswork/next-tx-cos-regions

[license-image]: https://img.shields.io/npm/l/@jswork/next-tx-cos-regions
[license-url]: https://github.com/afeiship/next-tx-cos-regions/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-tx-cos-regions
[size-url]: https://github.com/afeiship/next-tx-cos-regions/blob/master/dist/next-tx-cos-regions.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-tx-cos-regions
[download-url]: https://www.npmjs.com/package/@jswork/next-tx-cos-regions
4 changes: 0 additions & 4 deletions Rakefile

This file was deleted.

12 changes: 0 additions & 12 deletions __tests__/api.spec.js

This file was deleted.

16 changes: 0 additions & 16 deletions __tests__/index.html

This file was deleted.

11 changes: 11 additions & 0 deletions __tests__/index.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(function () {
require('../src');

describe('api.basic test', () => {
test('nx.txCosRegions', function () {
const obj1 = { name: 'fei' };
const obj2 = { email: '1290657123@qq.com' };
const result = {};
});
});
})();
7 changes: 2 additions & 5 deletions build/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@
const gulp = require('gulp');
const saveLicense = require('uglify-save-license');
const $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*', 'del', '@feizheng/gulp-*']
pattern: ['gulp-*', 'gulp.*', 'del', '@jswork/gulp-*']
});

gulp.task('scripts', function() {
return gulp
.src('src/*.js')
.pipe($.sourcemaps.init())
.pipe($.feizheng.pkgHeader())
.pipe($.sourcemaps.write('.'))
.pipe($.jswork.pkgHeader())
.pipe(gulp.dest('dist'))
.pipe($.size({ title: '[ default size ]:' }))
.pipe($.ignore('*.js.map'))
.pipe($.uglify({ output: { comments: saveLicense } }))
.pipe($.rename({ extname: '.min.js' }))
.pipe(gulp.dest('dist'))
Expand Down
30 changes: 30 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*!
* name: @jswork/next-tx-cos-regions
* description: Const for tencent cos regions.
* homepage: https://github.com/afeiship/next-tx-cos-regions
* version: 1.0.0
* date: 2020-11-21 10:53:20
* license: MIT
*/

(function () {
var global = global || this || window || Function('return this')();
var nx = global.nx || require('@jswork/next');

nx.txCosRegions = [
'ap-chengdu',
'ap-chongqing',
'ap-shanghai',
'ap-chongqing',
'ap-beijing',
'ap-nanjing',
'ap-guangzhou',
'ap-shenzhen-fsi',
'ap-shanghai-fsi',
'ap-beijing-fsi'
];

if (typeof module !== 'undefined' && module.exports) {
module.exports = nx.txCosRegions;
}
})();
9 changes: 9 additions & 0 deletions dist/index.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*!
* name: @jswork/next-tx-cos-regions
* description: Const for tencent cos regions.
* homepage: https://github.com/afeiship/next-tx-cos-regions
* version: 1.0.0
* date: 2020-11-21 10:53:20
* license: MIT
*/
!function(){var n=(this||window||Function("return this")()).nx||require("@jswork/next");n.txCosRegions=["ap-chengdu","ap-chongqing","ap-shanghai","ap-chongqing","ap-beijing","ap-nanjing","ap-guangzhou","ap-shenzhen-fsi","ap-shanghai-fsi","ap-beijing-fsi"],"undefined"!=typeof module&&module.exports&&(module.exports=n.txCosRegions)}();
32 changes: 0 additions & 32 deletions dist/next-tx-cos-regions.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/next-tx-cos-regions.js.map

This file was deleted.

9 changes: 0 additions & 9 deletions dist/next-tx-cos-regions.min.js

This file was deleted.

13 changes: 0 additions & 13 deletions express.js

This file was deleted.

33 changes: 15 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@feizheng/next-tx-cos-regions",
"name": "@jswork/next-tx-cos-regions",
"version": "1.0.0",
"description": "Const for tencent cos regions.",
"homepage": "https://github.com/afeiship/next-tx-cos-regions",
Expand All @@ -10,34 +10,31 @@
"scripts": {
"build": "gulp",
"test": "jest",
"start": "node ./express.js"
"start": "node ./express.js",
"release": "release-it"
},
"main": "dist/next-tx-cos-regions.js",
"main": "dist/index.js",
"license": "MIT",
"devDependencies": {
"@feizheng/gulp-pkg-header": "^1.0.2",
"@feizheng/rake-git": "^1.2.1",
"del": "^5.1.0",
"express": "^4.17.1",
"@jswork/gulp-pkg-header": "^1.0.2",
"@jswork/next": "^1.0.2",
"del": "^6.0.0",
"gulp": "^4.0.2",
"gulp-debug": "^4.0.0",
"gulp-header": "^2.0.9",
"gulp-ignore": "^3.0.0",
"gulp-load-plugins": "^2.0.2",
"gulp-load-plugins": "^2.0.5",
"gulp-rename": "^2.0.0",
"gulp-size": "^3.0.0",
"gulp-sourcemaps": "^2.6.5",
"gulp-uglify": "^3.0.2",
"jest": "^25.2.3",
"prettier": "^2.0.2",
"uglify-save-license": "^0.4.1",
"uglify-js": "3.7.2",
"yargs": "^15.3.1"
},
"dependencies": {
"@feizheng/next-js-core2": "^2.4.4"
"jest": "^26.6.3",
"prettier": "^2.1.2",
"release-it": "^14.2.1",
"uglify-js": "3.11.6",
"uglify-save-license": "^0.4.1"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
"access": "public",
"registry": "https://registry.npmjs.org"
}
}
21 changes: 21 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(function () {
var global = global || this || window || Function('return this')();
var nx = global.nx || require('@jswork/next');

nx.txCosRegions = [
'ap-chengdu',
'ap-chongqing',
'ap-shanghai',
'ap-chongqing',
'ap-beijing',
'ap-nanjing',
'ap-guangzhou',
'ap-shenzhen-fsi',
'ap-shanghai-fsi',
'ap-beijing-fsi'
];

if (typeof module !== 'undefined' && module.exports) {
module.exports = nx.txCosRegions;
}
})();
21 changes: 0 additions & 21 deletions src/next-tx-cos-regions.js

This file was deleted.

0 comments on commit 138ce07

Please sign in to comment.