天天看點

weex建構項目

D:\ooo>weex create awesome-project ---------建立一個weex項目

√ Installed 1 packages

√ Linked 152 latest versions

√ Run 0 scripts

deprecate @weex-cli/[email protected][email protected][email protected] › coffee-script@^1.12.4 CoffeeScript on NPM has moved to "coffeescript" (no hyphen)

Recently updated (since 2019-02-21): 2 packages (detail see file C:\Users\o_o\.wx\modules\node_modules\.recently_updates.txt)

2019-02-26

→ @weex-cli/generator@latest(2.0.0-beta.2) (19:24:38)

→ @weex-cli/[email protected][email protected][email protected] › js-yaml@^3.8.1(3.12.2) (23:03:08)

√ All packages installed (165 packages installed from npm registry, used 1m(network 1m), speed 41.87kB/s, json 153(261.04kB), tarball 2.55MB)

Start checking package, please wait ...

compelied, cost 72.362s

? Project name aaa ----------項目名字自己起

? Project description A weex project ----------------------項目描述回車就行

? Author --------------------作者不用輸入(看自己需要)

? Select weex web render lts -------------------(選擇weex web渲染器)? 選項有兩個:這裡我選第二項,推薦項

? Babel compiler (https://babeljs.io/docs/plugins/#stage-x-experimental-presets) stage-0 ------------(js編譯器)?選項有4個,按推薦選擇第一個“stage-0”,支援所有es6文法

? Use vue-router to manage your view router? (not recommended) No -------------------要不要用Vue的路由,這個可以不用,之後項目有用到可以自己加

? Use ESLint to lint your code? No --------------------- 是否使用ESLint管理代碼,有了eslint的校驗,可以來規範開發人員的代碼,是挺好的。但是有些像縮進、空

格、空白行之類的規範,在開發過程中一直報錯,未免太過于苛刻了。是以,我還是會選擇關閉eslint校驗

? Pick an ESLint preset Standard --------------Standard (https://github.com/feross/standard) 标準,去給提示的standardgithub位址看一下, 是js的标準風格

AirBNB (https://github.com/airbnb/javascript) JavaScript最合理的方法,這個github位址說的是JavaScript最合理的方法

none (configure it yourself) 自己定義風格,

我選擇了第一項标準風格

? Set up unit tests Yes --------------------要不要設定單元測試?有關于這個東西看(https://www.jianshu.com/p/8e22c1213260)看個人需要,我選是

? Should we run `npm install` for you after the project has been created? (recommended) no -----在項目建立之後,我們是否應該為您運作NPM安裝?(推薦)(使用箭頭鍵)

Success! Created awesome-project at D:\ooo\awesome-project

Inside that directory, you can run several commands:

npm start

Starts the development server for you to preview your weex page on browser

You can also scan the QR code using weex playground to preview weex page on native

npm run dev

Open the code compilation task in watch mode

npm run ios

(Mac only, requires Xcode)

Starts the development server and loads your app in an iOS simulator

npm run android

(Requires Android build tools)

Starts the development server and loads your app on a connected Android device or emulator

npm run pack:ios

(Mac only, requires Xcode)

Packaging ios project into ipa package

npm run pack:android

(Requires Android build tools)

Packaging android project into apk package

npm run pack:web

Packaging html5 project into `web/build` folder

npm run test

Starts the test runner

To get started:

cd awesome-project

npm install && npm start

Enjoy your hacking time!

D:\ooo>