Skip to content

Commit

Permalink
refactor: use es6 sytanx
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Apr 18, 2023
1 parent 9c11e83 commit 822e3f8
Show file tree
Hide file tree
Showing 16 changed files with 139 additions and 233 deletions.
7 changes: 0 additions & 7 deletions .babelrc

This file was deleted.

11 changes: 0 additions & 11 deletions .editorconfig

This file was deleted.

11 changes: 6 additions & 5 deletions .gitignore
@@ -1,15 +1,16 @@
node_modules
bower_components
coverage
npm-debug.log
yarn.lock
Gemfile.lock
yarn-error.log
package-lock.json
.DS_Store
.idea
.vscode

# vscode localhistory
.history
dist

# package manager
npm-debug.log
yarn.lock
package-lock.json
pnpm-lock.yaml
9 changes: 6 additions & 3 deletions .npmignore
Expand Up @@ -6,19 +6,22 @@ test
__tests__
src
build
docs
gulpfile.js

.editorconfig
.prettierrc
Gemfile
jest.config.js
jest.setup.js
LICENSE.txt
Rakefile
.vscode
express.js
.babelrc
.vscode
.release-it.json
docs


# vscode localhistory
.history
jest.setup.js
.release-it.json
10 changes: 0 additions & 10 deletions .npmrc
@@ -1,11 +1 @@
registry=https://registry.npm.taobao.org
disturl=https://npm.taobao.org/dist
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
electron_mirror=https://npm.taobao.org/mirrors/electron/
chromedriver_cdnurl=https://npm.taobao.org/mirrors/chromedriver
operadriver_cdnurl=https://npm.taobao.org/mirrors/operadriver
selenium_cdnurl=https://npm.taobao.org/mirrors/selenium
node_inspector_cdnurl=https://npm.taobao.org/mirrors/node-inspector
fsevents_binary_host_mirror=http://npm.taobao.org/mirrors/fsevents/
package-lock=false
32 changes: 1 addition & 31 deletions .prettierrc
Expand Up @@ -6,35 +6,5 @@
"jsxBracketSameLine": true,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"overrides": [
{
"files": ["*.json", ".eslintrc", ".tslintrc", ".prettierrc", ".tern-project"],
"options": {
"parser": "json",
"tabWidth": 2
}
},
{
"files": "*.{css,sass,scss,less}",
"options": {
"parser": "postcss",
"tabWidth": 2
}
},
{
"files": "*.ts",
"options": {
"parser": "typescript"
}
},
{
"files": "*.md",
"options": {
"trailingComma": "none",
"tabWidth": 2,
"parser": "json"
}
}
]
"singleQuote": true
}
13 changes: 5 additions & 8 deletions .release-it.json
Expand Up @@ -3,15 +3,12 @@
"requireCleanWorkingDir": false
},
"hooks": {
"after:init": [
"npm run test",
"t2k"
],
"after:bump": [
"npm run build"
]
"after:init": ["npm run test", "t2k"],
"after:bump": ["npm run build"],
"after:release": ["npm pkg get name | cnpm sync"]
},
"github": {
"release": true
"release": true,
"proxy": "http://127.0.0.1:9090"
}
}
2 changes: 1 addition & 1 deletion LICENSE.txt
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 afei <1290657123@qq.com>
Copyright (c) 2016 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
13 changes: 0 additions & 13 deletions build/clean.js

This file was deleted.

22 changes: 0 additions & 22 deletions build/scripts.js

This file was deleted.

16 changes: 6 additions & 10 deletions gulpfile.js
@@ -1,13 +1,9 @@
(function() {
'use strict';
const gulp = require('gulp');
const { NxScripts, CleanRegistry } = require('@jswork/gulp-registry');

const gulp = require('gulp');
const fs = require('fs');
const task1 = new CleanRegistry();
const task2 = new NxScripts({ name: 'qs', classify: true });

//import
fs.readdirSync('./build').map(function(file) {
require('./build/' + file);
});
[task1, task2].forEach(gulp.registry);

gulp.task('default', gulp.series(['clean', 'scripts']));
})();
gulp.task('default', gulp.series(['clean', 'nx:scripts']));
3 changes: 3 additions & 0 deletions index.d.ts
@@ -0,0 +1,3 @@
interface NxStatic {
ActiveState: any;
}
1 change: 0 additions & 1 deletion jest.config.js
Expand Up @@ -4,7 +4,6 @@ module.exports = {
testRegex: [/\.spec.js/],
//preset: "jest-puppeteer",
automock: false,
setupFiles: ['./jest.setup.js'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
}
Expand Down
1 change: 0 additions & 1 deletion jest.setup.js

This file was deleted.

50 changes: 25 additions & 25 deletions package.json
Expand Up @@ -2,54 +2,54 @@
"name": "@jswork/next-active-state",
"version": "1.0.13",
"description": "Mini state mananger based on proxy.",
"homepage": "https://github.com/afeiship/next-active-state",
"homepage": "https://js.work",
"author": {
"name": "afei",
"email": "1290657123@qq.com"
},
"scripts": {
"build": "gulp",
"test": "jest",
"start": "node ./express.js",
"release": "release-it"
},
"main": "dist/index.js",
"module": "dist/index.esm.js",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.13.14",
"@babel/preset-env": "^7.13.12",
"@jswork/gulp-pkg-header": "^1.0.4",
"@jswork/next": "^1.0.5",
"@babel/core": "^7.21.3",
"@babel/preset-env": "^7.20.2",
"@jswork/gulp-pkg-header": "^1.0.8",
"@jswork/gulp-registry": "^1.0.20",
"@jswork/next": "^1.1.6",
"del": "^6.0.0",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-concat": "^2.6.1",
"gulp-debug": "^4.0.0",
"gulp-ignore": "^3.0.0",
"gulp-load-plugins": "^2.0.6",
"gulp-prettier": "^4.0.0",
"gulp-rename": "^2.0.0",
"gulp-size": "^3.0.0",
"gulp-replace": "^1.1.4",
"gulp-uglify": "^3.0.2",
"jest": "^26.6.3",
"release-it": "^14.2.2",
"uglify-js": "3.12.4",
"jest": "^29.5.0",
"jest-location-mock": "^1.0.9",
"uglify-save-license": "^0.4.1"
},
"babel": {
"presets": [
[
"@babel/preset-env"
]
]
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"dependencies": {
"@jswork/event-mitt": "^1.0.2",
"@jswork/next-deep-clone": "^1.0.0",
"@jswork/next-deep-each": "^1.0.0",
"@jswork/next-empty": "^1.0.0",
"@jswork/next-is-empty-object": "^1.0.1",
"@jswork/event-mitt": "^1.0.3",
"@jswork/next-deep-clone": "^1.0.2",
"@jswork/next-deep-each": "^1.0.1",
"@jswork/next-empty": "^1.0.1",
"@jswork/next-is-empty-object": "^1.0.3",
"fast-deep-equal": "^3.1.3"
},
"keywords": [
"next",
"active",
"state",
"proxy"
]
}
}

0 comments on commit 822e3f8

Please sign in to comment.