项目作者: doganozturk

项目描述 :
A SPA built with React.js for studying tree list cases.
高级语言: JavaScript
项目地址: git://github.com/doganozturk/react-datatable.git
创建时间: 2017-08-03T18:42:39Z
项目社区:https://github.com/doganozturk/react-datatable

开源协议:MIT License

下载


React-Datatable Build Status codecov

A SPA using React.js, an ejected Create-React-App as its boilerplate. It can be considered as a tree list case study. Application starts with a flat object, than first unflattens it. After that using that object as its data, application shows the user a responsive tree view where interacting user can expand an item, collapse it, delete it or traverse its children objects which have the same interaction capabilites as their respective parent elements.

Demo

https://react-datatable.surge.sh

Prerequisites

You need Node.js (v7.10.0), NPM and/or Yarn on your local machine. I strongly recommend usage of NVM for managing different versions of Node on your local machine.

Installing

React-Datatable uses Create-React-App as its base. So you have all commands that come with it and many more!

  1. # install dependencies
  2. yarn
  3. # serve with hot reload at localhost:3000
  4. yarn start
  5. # running the linters and Jest test
  6. yarn test
  7. # test task but with coverage reports by Istanbul
  8. yarn run test:ci
  9. # build for production with minification, sourcemaps etc.
  10. yarn run build
  11. # build for production and view the bundle analyzer report
  12. yarn run build && yarn run analyze

Running the tests and linters

The project uses current community favorites such as ESLint, Stylelint and Prettier for formatting both. I use VSCode as my text editor and there are appropriate plugins for these tools. All known and respected IDEs and editors have that kind of tools, so I recommend installing them before development.

For tests, the project uses Jest from Facebook. A Snapshot testing utility, Jest makes testing easy and fast. From my experience, I think it really opens the way for TDD practices. Istanbul is used for coverage reports and project is already configured so that after each succesful Travis-CI build, reports are being sent to Codecov for coverage reports.

Deployment

Project uses Travis-CI for continuous integration and amazing Surge.sh as its host. You can make appropriate changes and use this project’s setup as a boilerplate for your own projects.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details.