Giter Site home page Giter Site logo

idkjs / jsdf-github-june-2018 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keirah/jsdf-github-june-2018

0.0 0.0 0.0 1005 KB

This is a modified version of jsdf/github-reason-react-tutorial to use ReasonReact 0.4.2 and bs-platform 3.1.5

OCaml 90.84% HTML 9.16%

jsdf-github-june-2018's Introduction

jsdf-github-june-2018

Run Project

npm install
npm start
# in another tab
npm run webpack

After you see the webpack compilation succeed (the npm run webpack step), open up src/index.html (no server needed!). Then modify whichever .re file in src and refresh the page to see the changes.

For more elaborate ReasonReact examples, please see https://github.com/reasonml-community/reason-react-example

Run Alternative

Add Parcel Bundler

yarn add --dev parcel-bundler npm-run-all

Add index.html file

<html>
<body>
  <div id="root"></div>
  <script src="./src/Index.bs.js"></script>
</body>
</html>

Package.json Scripts

  "scripts": {
    "build": "bsb -make-world",
    "dev": "npm-run-all --parallel start serve",
    "start": "bsb -make-world -w",
    "serve": "yarn parcel index.html",
    "clean": "bsb -clean-world"
  },

Start Parcel in Browser

yarn dev

Build for Production

npm run build
npm run webpack:production

This will replace the development artifact build/Index.js for an optimized version.

To enable dead code elimination, change bsconfig.json's package-specs module from "commonjs" to "es6". Then re-run the above 2 commands. This will allow Webpack to remove unused code.

jsdf-github-june-2018's People

Contributors

idkjs avatar keirah 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.