js-utils-url
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "js-utils-url", | ||
"version": "1.0.0", | ||
"description": "URL 解析、修改/追加参数等方法集", | ||
"version": "1.0.1", | ||
"description": "> 仅依赖", | ||
"keywords": [ | ||
"JS Engine", | ||
"URL Parse", | ||
"set search" | ||
"empty, isArray, isObject" | ||
], | ||
"main": "build/es/index.js", | ||
"repository": "https://github.com/lamovv/js-utils-url.git", | ||
"license": "MIT", | ||
"browser": "dist/index.es.js", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.es.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"build", | ||
"README.md", | ||
"package.json" | ||
"dist" | ||
], | ||
"author": "lamovv<lamovv@gmail.com>", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/lamovv/js-utils-url.git" | ||
}, | ||
"engines": { | ||
"node": ">=10.15.3" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.8.7", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.8.3", | ||
"@babel/preset-env": "^7.8.7", | ||
"@babel/core": "^7.9.0", | ||
"@babel/plugin-proposal-class-properties": "^7.8.3", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.9.0", | ||
"@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||
"@babel/plugin-transform-runtime": "^7.9.0", | ||
"@babel/preset-env": "^7.9.0", | ||
"@commitlint/cli": "^8.3.5", | ||
"@commitlint/config-conventional": "^8.3.4", | ||
"@rollup/plugin-alias": "^3.0.1", | ||
"@rollup/plugin-commonjs": "^11.0.2", | ||
"@rollup/plugin-node-resolve": "^7.1.1", | ||
"@rollup/plugin-replace": "^2.3.1", | ||
"babel-eslint": "^10.1.0", | ||
"babel-loader": "^8.1.0", | ||
"console-log-h5": "^1.0.6", | ||
"conventional-changelog-cli": "^2.0.31", | ||
"cross-env": "^7.0.2", | ||
"eslint": "^6.8.0", | ||
"eslint-loader": "^3.0.3", | ||
"husky": "^4.2.3", | ||
"lodash": "^4.17.15", | ||
"ip": "^1.1.5", | ||
"lint-staged": "^10.0.9", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.0.2", | ||
"rollup": "^2.1.0", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-replace": "^2.2.0" | ||
"typescript": "^3.8.3", | ||
"webpack": "^4.42.1", | ||
"webpack-cli": "^3.3.11", | ||
"webpack-dev-server": "^3.10.3" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged", | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"lint-staged": { | ||
"./src/**/*.{ts,js}": [ | ||
"prettier --tab-width 2 --write", | ||
"eslint --cache --fix", | ||
"conventional-changelog -p angular -i CHANGELOG.md -s", | ||
"git add CHANGELOG.md" | ||
] | ||
}, | ||
"scripts": { | ||
"build": "rollup -c" | ||
"2git": "npm repo", | ||
"init": "npm run clean && rm -rf node_modules && yarn install -s --force", | ||
"init:nolock": "npm run clean && rm -rf node_modules && yarn install -s --force --no-lockfile", | ||
"build": "run-p build:es build:types", | ||
"build:es": "rm -rf dist && rollup -c --silent", | ||
"build:umd": "cross-env NODE_FORMAT=umd rollup -c --silent", | ||
"build:all": "run-p build build:umd", | ||
"build:types": "tsc --declaration --emitDeclarationOnly --outDir dist && prettier \"dist/*.d.ts\" --write", | ||
"build:wpk": "cross-env NODE_ENV=production webpack --mode=production", | ||
"clean": "rm -rf dist", | ||
"dev": "webpack-dev-server --watch --mode=development", | ||
"dev:open": "webpack-dev-server --watch --mode=development --open", | ||
"postversion": "git push --follow-tags", | ||
"prettier": "prettier --write ./src", | ||
"push": "sh ./publish.sh -pm", | ||
"pub": "npm run build:es && sh ./publish.sh -npm" | ||
} | ||
} |
@@ -6,6 +6,6 @@ # `js-utils-url` | ||
## Usage | ||
1. 添加依赖 `yarn` | ||
1. 添加依赖 | ||
``` | ||
yarn add js-utils-url | ||
$ yarn add js-utils-url | ||
``` | ||
@@ -65,2 +65,19 @@ | ||
"https://m.foo.com/pages/foo/index?a=7&b=2&c=3&e=9#newHash" | ||
``` | ||
``` | ||
## Dev | ||
1. 默认使用`yarn`安装npm包,若无请先安装:`$ npm i -g yarn` | ||
2. 初始化环境:`npm run init` | ||
3. 启动开发服务:`$ npm run dev` | ||
- 自动打开浏览器:`$ npm run dev:open` | ||
4. 构建: | ||
- 默认构建cjs与es6 module:`$ npm run build` | ||
- 若只构建umd:`$ npm run build:umd` | ||
- 同时,需要手动修改`package.json` main字段指向`dist/index.umd.js` | ||
- 若全部构建:`$ npm run build:all` | ||
5. 要使用命令一步完成git push提交:`$ npm run push -- commit-message` | ||
- `commit-message`:为git commit提交时的message,自行输入 | ||
- 如:`$ npm run push -- "feat(scope): add yy"` | ||
- **message格式参照 `commitlint.config.js` 规范提交** | ||
6. 提交git并发布npm包:`npm run pub -- commit-message` | ||
- 指定版本位(patch|minor|major),默认为patch,自动+1:`npm run pub -- commit-message -v minor` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
11382
6
203
1
81
0
31
1