Skip to content

Commit b111ab3

Browse files
committed
feat: 增加自动发布脚本
1 parent 8252280 commit b111ab3

File tree

8 files changed

+20
-6
lines changed

8 files changed

+20
-6
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"packages/*"
77
],
88
"scripts": {
9-
"test": "echo \"Error: no test specified\" && exit 1"
9+
"publish": "sh scripts/publish.sh"
1010
},
1111
"keywords": [],
1212
"author": "fujunkui",

Diff for: packages/color-replace-loader/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fu1996/color-replace-loader",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "a webpack color replace loader",
55
"main": "index.js",
66
"scripts": {

Diff for: packages/i18n-translate-tool/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fu1996/i18n-translate-tool",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "",
55
"main": "index.js",
66
"git": "https://github.com/fu1996/i18n-translate-tool.git",

Diff for: packages/var-color-replace-loader/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fu1996/var-color-replace-loader",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "a webpack loader can replace var color",
55
"main": "index.js",
66
"scripts": {

Diff for: packages/webpack-resolve-mode-plugin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fu1996/webapck-resolver-mode-plugin",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "A Webpack plug-in that compiles files with different endings according to different configurations (conditional compilation at the file level)",
55
"main": "index.js",
66
"files": [

Diff for: packages/webpack-used-files-plugin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fu1996/webpack-used-files-plugin",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A plug-in used in webpack to find which files are used",
55
"main": "index.js",
66
"scripts": {

Diff for: scripts/publish.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
pwd=${PWD}
2+
3+
for j in $(ls -d ./packages/*)
4+
do
5+
echo "当前项目是 $j"
6+
i=$(echo $j | cut -d'/' -f 3)
7+
target="$pwd/packages/$i"
8+
echo "\033[1;41m 当前操作的是\033[0m: $i, $pwd, $target";
9+
cd $target &&
10+
npm version patch &&
11+
npm publish --access public
12+
done

Diff for: scripts/test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pwd=${PWD}
2+
echo ${pwd}

0 commit comments

Comments
 (0)