Giter Site home page Giter Site logo

mark9462 / simple_react_startkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from reactmaker/simple_react_startkit

0.0 1.0 0.0 6.63 MB

This is a simple react boilerplate, without complex dependencies(eg. redux or router), this project can help you start the react project in seconds.

License: Other

JavaScript 84.07% HTML 14.46% Dockerfile 1.47%

simple_react_startkit's Introduction

Build Status Renovate enabled david-dm Known Vulnerabilities

Simple React Startkit

This is a simple react boilerplate, without complex dependencies(eg. redux or router), this project can help you start the react project in seconds.

這個環境包可以讓你快速體驗 ReactJS 開發環境的便利,我們並沒有在裏面放入額外的套件(例如 redux, router),希望可以讓你用最簡單的環境開始學習 React

特色 feature

需求配置 requirement

  • node ^6.11.5
  • npm ^3.10.10

開始 getting start

先確定好安裝了 node 6.11.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]/#/

Docker

如果想要把專案 build 到 docker 上面跑,請執行這條命令

npm run build:docker

輸入完命令之後會建立 docker image 名稱為 reactdocker

我們可以透過以下指令把映像檔跑起來

docker run --name reactmaker -d -P reactdocker

因為我是用-P參數自動分配port,所以跑起來之後輸入 docker ps 察看系統給我哪個 port

接著就可以在瀏覽器輸入localhost:32768看到我們包好的網頁了

simple_react_startkit's People

Contributors

renovate-bot avatar chnbohwr avatar bbandydd avatar kmsheng avatar jimmyhouwistron avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.