Skip to content

Files

Latest commit

May 24, 2016
4facc62 · May 24, 2016

History

History

client

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 21, 2016
Apr 26, 2015
Dec 12, 2015
Dec 13, 2015
Mar 30, 2015
May 21, 2016
Nov 21, 2015
Nov 21, 2015
Apr 15, 2016
May 24, 2016
May 24, 2016
Apr 15, 2016
Jan 27, 2016
Mar 27, 2016
Jan 27, 2016
Jan 13, 2016
Apr 4, 2016
Jan 13, 2016

Please see parent directory README.md.

Classes and React

We switched to ES6 Classes from React.createClass(). Thus your React components extend React.Component.

ESLint

The .eslintrc file is based on the AirBnb eslintrc.

It also includes many eslint defaults that the AirBnb eslint does not include.

Running linter:

Soon to be in gulpfile....but gulp-eslint depends on eslint depends on

    "eslint-plugin-react": "^2.0.2",

So don't use npm run gulp lint yet.

For now:

bin/lint

Or (from either top level or within client directory)

npm run lint

Updating Node Dependencies

npm install -g npm-check-updates

Then run this to update the dependencies (starting at the top level).

# Make sure you are in the top directory, then run:
cd client 
rm npm-shrinkwrap.json
npm-check-updates -u
npm install
npm prune
npm shrinkwrap

Then confirm that the hot reload server and the rails server both work fine. You may have to delete node_modules and npm-shrinkwrap.json and then run npm shrinkwrap.

Note: npm prune is required before running npm shrinkwrap to remove dependencies that are no longer needed after doing updates.

Adding Node Modules

Suppose you want to add a dependency to "module_name"....

Before you do so, consider:

  1. Do we really need the module and the extra JS code?
  2. Is the module well maintained?
cd client
npm install --save module_name@version
# or 
# npm install --save_dev module_name@version
rm npm-shrinkwrap.json
npm shrinkwrap