In this section we target the developers that want to help with resolving issues, test, add features to the source code.
From the react-faceted-token-input folder run:
npm install
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
The react-faceted-token-input comes with some useful scripts to facilitate the developer experience:
Build the project with:
npm run build
Clean the lib folder to prepare for a rebuild:
npm run clean
Typecheck the Javascript code using the types declared during development:
npm run flow
Linting for your Javascript code, by default inside the src
and test
folders:
npm run lint
Run your test suite:
npm test
For more information about existing tests and further testing head here.
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.
We prepared some formatting guidelines to standardize the look of the code