Skip to content

Latest commit

 

History

History
111 lines (67 loc) · 2.52 KB

development.md

File metadata and controls

111 lines (67 loc) · 2.52 KB

Development

In this section we target the developers that want to help with resolving issues, test, add features to the source code.

Set Up

From the react-faceted-token-input folder run:

npm install

Dev Dependencies

You will have the following tools available:

react: you need react to develop a react component. You can find guides and documentation on the react website

classnames: let you conditionally combine classNames together

babel: you can (and should) use ECMAScript 6 to write code for this component and babel let you do exactly that. See babeljs website for more information.

eslint: linting for your Javascript code

react-dom and react-addons-test-utils: utilities for testing react

jest: test framework for react. See the documentation about Jest here

rimraf: tool to remove file and folders, this is used in npm clear

cross-env: let you use NODE_ENV across all OS

webpack: used to run the server

flow: used to typecheck the source code, during development you can add types to the variables. For more information about syntax and usage see the flow documentation here

Available Commands

The react-faceted-token-input comes with some useful scripts to facilitate the developer experience:

Build

Build the project with:

npm run build

Clean

Clean the lib folder to prepare for a rebuild:

npm run clean

Flow

Typecheck the Javascript code using the types declared during development:

npm run flow

Lint

Linting for your Javascript code, by default inside the src and test folders:

npm run lint

Test

Run your test suite:

npm test

For more information about existing tests and further testing head here.

Start

Start the server with the example with:

npm start

By default the server runs on port 3000,to change the default port go inside server.js and on line 20 change the port number:

  app.listen(3000, 'localhost', function(err) { ... }

For more information about the example go here.

Next

We prepared some formatting guidelines to standardize the look of the code