ReactMaker / shopping_cart_demo

使用 React.js 建立購物車網站的教學

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shopping Cart Demo

使用ReactStrap版型,搭配React state做出購物車

Imgur

DEMO

特色

需求配置

  • node ^4.5.0
  • npm ^3.0.0

開始

先確定好安裝了 node 4.5 以上的版本,接著就可以輸入以下指令

$ git clone https://github.com/ReactMaker/simple_react_start_kit_2017
$ cd simple_react_start_kit_2017
$ npm install                   # Install project dependencies
$ npm start                     # Compile and launch

如果一切成功,就會看到以下畫面,並且瀏覽器會打開的範例頁面

Imgur

開發當中最常用到的是 npm start 指令,我們還有一些其他的指令要介紹給你知道

npm run <script> 說明
start 啟動網站在 8000 port
dist 編譯整個網站成品到 dist 資料夾下
lint 檢查所有的 js 檔案有沒有符合 coding style
lint:fix 檢查所有的 js 檔案有沒有符合 coding style ,如果是一些簡單的錯誤就會嘗試修復
deploy 編譯整個網站成品後,上傳至Github靜態頁面,https://[Github 帳號].github.io/[Repositories Name]/#/

About

使用 React.js 建立購物車網站的教學

License:Other


Languages

Language:JavaScript 94.2%Language:CSS 3.5%Language:HTML 2.3%