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 ef8c1e3 commit 98ec8ff
Show file tree
Hide file tree
Showing 18 changed files with 105 additions and 206 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ package-lock.json
.idea
.vscode

config.json
# vscode localhistory
.history
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ jest.config.js
LICENSE.txt
Rakefile
.vscode
.release-it.json
docs

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

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 afei <1290657123@qq.com>
Copyright (c) 2020 afei <1290657123@qq.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# next-tx-cos-bucket
> Tencent cos bucket for next.
[![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-bucket
npm install -S @jswork/next-tx-cos-bucket
```

## apis
Expand All @@ -20,7 +25,7 @@ npm install -S @feizheng/next-tx-cos-bucket

## usage
```js
import NxTxCosBucket from '@feizheng/next-tx-cos-bucket';
import NxTxCosBucket from '@jswork/next-tx-cos-bucket';

// code goes here:
```
Expand All @@ -29,3 +34,19 @@ import NxTxCosBucket from '@feizheng/next-tx-cos-bucket';
- https://stackoverflow.com/questions/24586110/resolve-promises-one-after-another-i-e-in-sequence
- http://bluebirdjs.com/docs/api-reference.html
- https://cloud.tencent.com/document/product/436/36118


## license
Code released under [the MIT license](https://github.com/afeiship/next-tx-cos-bucket/blob/master/LICENSE.txt).

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

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

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

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

This file was deleted.

4 changes: 2 additions & 2 deletions __tests__/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function () {
var nx = require('@feizheng/next-js-core2');
var NxTxCosBucket = require('../src/next-tx-cos-bucket');
const NxTxCosBucket = require('../src');

var config = require('./config.json');
var bucket = new NxTxCosBucket(config);

Expand Down
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
19 changes: 19 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*!
* name: @jswork/next-tx-cos-bucket
* description: Tencent cos bucket for next.
* homepage: https://github.com/afeiship/next-tx-cos-bucket
* version: 1.0.0
* date: 2020-11-21 11:00:35
* license: MIT
*/

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

var NxTxCosBucket = nx.declare('nx.TxCosBucket', {});

if (typeof module !== 'undefined' && module.exports) {
module.exports = NxTxCosBucket;
}
})();
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-bucket
* description: Tencent cos bucket for next.
* homepage: https://github.com/afeiship/next-tx-cos-bucket
* version: 1.0.0
* date: 2020-11-21 11:00:35
* license: MIT
*/
!function(){var e=((this||window||Function("return this")()).nx||require("@jswork/next")).declare("nx.TxCosBucket",{});"undefined"!=typeof module&&module.exports&&(module.exports=e)}();
82 changes: 0 additions & 82 deletions dist/next-tx-cos-bucket.js

This file was deleted.

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

This file was deleted.

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

This file was deleted.

3 changes: 0 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// https://jestjs.io/docs/en/configuration

module.exports = {
verbose: true,
testRegex: [/\.spec.js/],
Expand All @@ -8,5 +7,3 @@ module.exports = {
'^@/(.*)$': '<rootDir>/src/$1'
}
};


35 changes: 15 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@feizheng/next-tx-cos-bucket",
"version": "1.0.2",
"name": "@jswork/next-tx-cos-bucket",
"version": "1.0.0",
"description": "Tencent cos bucket for next.",
"homepage": "https://github.com/afeiship/next-tx-cos-bucket",
"author": {
Expand All @@ -9,35 +9,30 @@
},
"scripts": {
"build": "gulp",
"test": "jest"
"test": "jest",
"release": "release-it"
},
"main": "dist/next-tx-cos-bucket.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",
"@jswork/gulp-pkg-header": "^1.0.2",
"@jswork/next": "^1.0.2",
"del": "^6.0.0",
"gulp": "^4.0.2",
"gulp-concat": "^2.6.1",
"gulp-debug": "^4.0.0",
"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.1.0",
"uglify-js": "3.7.2",
"uglify-save-license": "^0.4.1",
"yargs": "^15.3.1"
},
"dependencies": {
"@feizheng/next-js-core2": "^2.4.4",
"@feizheng/next-tx-abstract-cos": "^1.0.0",
"bluebird": "^3.7.2",
"cos-nodejs-sdk-v5": "^2.5.20"
"jest": "^26.6.3",
"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"
}
}
10 changes: 10 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(function() {
var global = global || this || window || Function('return this')();
var nx = global.nx || require('@jswork/next');

var NxTxCosBucket = nx.declare('nx.TxCosBucket', {});

if (typeof module !== 'undefined' && module.exports) {
module.exports = NxTxCosBucket;
}
})();
Loading

0 comments on commit 98ec8ff

Please sign in to comment.