Flutter借用package.json管理Flutter常用
2020-01-02 本文已影响0人
IT晴天
Flutter的命令一般比较长,而个人“年纪大了”常记不太清楚,考虑电脑有node的环境,所以干脆利用package.json来管理一些常用命令:
package.json内容如下:
{
"name": "flutter-script",
"version": "0.0.1",
"author": "woodstream",
"homepage": "",
"scripts": {
"start": "flutter run",
"pub:g": "flutter packages get",
"pub:u": "flutter packages upgrade",
"json": "flutter packages pub run build_runner build",
"json:force": "flutter packages pub run build_runner build --delete-conflicting-outputs",
"run:ios": "flutter emulators --launch apple_ios_simulator && flutter run",
"run:android": "flutter emulators --launch Nexus_5X_API_26 && flutter run",
"clear:cache": "flutter pub pub cache repair",
"rm:lock": "rm /Users/woodstream/Documents/dev/projects/flutter/flutter/bin/cache/lockfile"
},
"private": true,
"dependencies": {},
"devDependencies": {},
"description": "flutter-script"
}