Code Monkey home page Code Monkey logo

mongo_loadextractcompute's Introduction

Red todo Boilerplate

This starter kit was made to help to develop a react project

It helps:

  • to transpile with Babel ES6 code
  • to bundle with Wbepack JS files and hot reload client's code
  • to write tests and check code coverage.

Install

Install node first. After that:

$ npm install -g yarn install
$ yarn install

Edit config/default.js for your needs.

Development Mode

Launch Client

$ yarn build:dev
yarn build:dev 
$ NODE_ENV=development webpack-dev-server --progress --config webpack.config.js 

Project is running at http://0.0.0.0:3000/
webpack output is served from /assets/
Content not from webpack is served from ./public
404s will fallback to /index.html

webpack: bundle is now VALID.

Point your browser to http://0.0.0.0:3000/ it will load client side application.

You should see Hello World, this is my first react app!, open your console and check you have :

[HMR] Waiting for update signal from WDS...
mounting react app ...
[WDS] Hot Module Replacement enabled.

As you can guess we are using webpack hot reload module, try to update any file under src/client and your browser should reload your code.

[WDS] App updated. Recompiling...

Test

Test, test and re-test …

$ yarn test

Tests are installed under test folder.

fake.js

A simple template to implement simple unit tests. In todo context you will try to test every functions or classes from client code. Just import your files and check (http://shouldjs.github.io/)[should] documentation to extend the test.

Coverage

yarn coverage

> [email protected] coverage /home/eric/JS/todo_boilerplate
> NODE_ENV=test nyc -r lcov -r text mocha --require babel-core/register

Check results …. of this command, and launch your browser to ./coverage/lcov-report/index.html

That’s all folks ...

mongo_loadextractcompute's People

Contributors

es-so avatar

Watchers

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