applets conversion cli
1.0.0
小程式轉換工具,支援了較普遍的轉換場景,例如:xml,js,css。目前,只支援「微信」和「支付寶」
# npm
npm install applets-conversion-tool -g
# yarn
yarn add applets-conversion-tool global
參數
參數 | 值 | 描述 |
-s “–src” | path | 轉換前的輸入目錄路徑 |
-o “–out” | path | 轉換後的輸出目錄路徑 |
-t “–target” | wx, my | 輸入目錄的小程式類型「目前只支援wx, my」 |
-e “–expect” | wx, my | 輸出目錄的小程式類型「目前只支援wx, my」 |
-5 “–es5” | true, false | 遇到一些es6 語法時,是否轉為es5? |
-f “–filter” | string | 過濾關鍵字,過濾存在對應關鍵字在檔案路徑,預設過濾“node_modules, .tea, .idea” |
Demo
# -s
applets-cli -t wx -e my -s test/applets/wechat-demo
# -o
applets-cli -t wx -e my -s test/applets/wechat-demo -o test/applets/wechat-demo-to-alipay
# -f
applets-cli -t wx -e my -s test/applets/wechat-demo -o test/applets/wechat-demo-to-alipay-filter -f expect-filter-dir
# -5
applets-cli -t wx -e my -s test/applets/wechat-demo -o test/applets/wechat-demo-to-alipay-filter-es5 -f expect-filter-dir -5 true
# init
yarn install
# build
./node_modules/gulp/bin/gulp.js
# npm
npm run test
# yarn
yarn test
Alipay
Test
Copyright (C) 2019 CaMnter [email protected]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.