applets conversion cli
1.0.0
Alat konversi program mini mendukung skenario konversi umum, seperti xml, js, dan css. Saat ini, hanya "WeChat" dan "Alipay" yang didukung
# npm
npm install applets-conversion-tool -g
# yarn
yarn add applets-conversion-tool global
parameter
parameter | nilai | menggambarkan |
-s "--src" | jalur | Masukkan jalur direktori sebelum konversi |
-o "--keluar" | jalur | Jalur direktori keluaran yang dikonversi |
-t "--target" | wx, wah | Masukkan tipe applet direktori "Saat ini hanya mendukung wx, my" |
-e "-mengharapkan" | wx, wah | Jenis applet dari direktori keluaran "saat ini hanya mendukung wx, my" |
-5 「–es5」 | benar, salah | Saat menemukan beberapa sintaks es6, haruskah Anda mengonversinya ke es5? |
-f "--filter" | rangkaian | Filter kata kunci, filter kata kunci yang sesuai di jalur file, dan filter "node_modules, .tea, .idea" secara default |
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
Wechat wechat
Alipay
Tes
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.