Getting setup for local development is easy. We use io.js, and nvm for managing multiple node versions locally.
brew install nvm
. Note the setup requires some additions to your shell config.nvm install iojs
(now that you have nvm, you can also install the latest Node version with it: nvm install stable
).use
. We want io.js, so: nvm use iojs
nvm current
nvm
and iojs
, you experience issues with v8flags when running gulp, see here.Once we have our base environment setup to use io.js, then you can configure the actual app:
https://github.com/okfn/opentrials-prototype
https://github.com/{YOUR_USERNAME}/opentrials-prototype.git
npm install
npm run develop
, and visit the app at http://localhost:3000
That's it. Other things you can do:
npm test
npm start
npm run jscs
(according to the Google style guide)We welcome contributions. Please keep the style consistent. Refer to Open Knowledge Coding Standards.
In summary, in this codebase we:
var {name} = require('{name}');
syntax
feature/my-feature
), or some similar pattern of branches from the develop
branchAlso, notice the following conventions:
src/components
(e.g: the ui
package).tests
directory).src/components/ui
.dist
vendor.min.js
has our dependenciesapp.min.js
has our codenpm
, and not bower
. Add dependencies to this list to include them in vendor.min.js
If you are new to some of the tooling we use - don't worry, it is not difficult! Refer to Node Modules, Mocha, Chai, Browserify, Gulp and BrowserSync for further information. These are all key tools to organizing our code and workflow.