From f9e24cde0b4f8a565ace3b770b47853d62d5bb21 Mon Sep 17 00:00:00 2001 From: liuruoran88 Date: Wed, 19 Sep 2018 18:24:20 +0800 Subject: [PATCH] =?UTF-8?q?upload=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/upload.sh b/upload.sh index 3040c60..7f829a9 100644 --- a/upload.sh +++ b/upload.sh @@ -51,7 +51,8 @@ rm 'upload.sh' rm -rf '.git' #修改组件模板变量的三个文件 -newContent='所需脚本| {% if: {{ name }} %}{% if: {{ name }} === 'mip2-extensions' %}[https://c.mipcdn.com/static/v2/{{ compName }}/{{ compName }}.js](https://c.mipcdn.com/static/v2/{{ compName }}/{{ compName }}.js){% else %}[https://c.mipcdn.com/extensions/platform/v2/{{name}}/{{ compName }}/{{ compName }}.js](https://c.mipcdn.com/extensions/platform/v2/{{name}}/{{ compName }}/{{ compName }}.js){% /if %}{% /if %}' +newContent='所需脚本| {% if: {{name}} %}{% if: {{name}} === "mip2-extensions" %}[https://c.mipcdn.com/static/v2/{{ compName }}/{{ compName }}.js](https://c.mipcdn.com/static/v2/{{ compName }}/{{ compName }}.js){% else %}[https://c.mipcdn.com/extensions/platform/v2/{{name}}/{{ compName }}/{{ compName }}.js](https://c.mipcdn.com/extensions/platform/v2/{{name}}/{{ compName }}/{{ compName }}.js){% /if %}{% /if %}' + #1.mip-example.html sed -i '' 's/mip-example/\{\{ compName \}\}/g' mip-component/components/mip-example/example/mip-example.html @@ -63,7 +64,7 @@ ${newContent} #3.package.json sed -i '' 's/\"name\": \"name\"/\"name\": \"\{\{ name \}\}\"/g' package.json sed -i '' 's/\"description\": \"description\"/\"description\": \"\{\{ description \}\}\"/g' package.json -sed -i '' 's/\"author\": \"yourname\"/\"author\": \"\{\{ yourname \}\}\"/g' package.json +sed -i '' 's/\"author\": \"yourname\"/\"author\": \"\{\{ author \}\}\"/g' package.json zip -r ../mip-plugin-site-template.zip . .[^.]*