Skip to content

Commit

Permalink
Merge pull request #28 from opentable/readme
Browse files Browse the repository at this point in the history
Updating readme to reflect the latest steps and syntax
  • Loading branch information
acolchado authored Aug 26, 2017
2 parents 3a3b3e7 + 2c6d59c commit 8dcc08d
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ The Spur Framework is a collection of commonly used Node.JS libraries used to cr
## Installing

`Standalone:`
```bash
```shell
$ npm install spur-config --save
```

`With dependency injection:`
```bash
```shell
$ npm install spur-ioc --save
$ npm install spur-common --save
$ npm install spur-config --save
Expand All @@ -49,7 +49,7 @@ Supports active Node versions in the [LTS Schedule](https://github.com/nodejs/LT
#### `src/config/default.js`

```javascript
module.exports = function() {
module.exports = function () {

return this.properties({
environment: 'default',
Expand All @@ -62,7 +62,7 @@ module.exports = function() {
#### `src/config/shared-deployed.js`

```javascript
module.exports = function() {
module.exports = function () {

return this.properties({
shared: {
Expand All @@ -76,7 +76,7 @@ module.exports = function() {
#### `src/config/development.js` (default)

```javascript
module.exports = function() {
module.exports = function () {

this.extends('default');

Expand All @@ -90,7 +90,7 @@ module.exports = function() {
#### `src/config/production.js`

```javascript
module.exports = function() {
module.exports = function () {

// Extend multiple files
this.extends('default', 'shared-deployed');
Expand All @@ -108,12 +108,12 @@ module.exports = function() {
This example shows how to manually load configuration into

```javascript
import spurConfig from 'spur-config';
const spurConfig = require('spur-config');

const configDirectory = path.join(__dirname, "src/config");
const configDirectory = path.join(__dirname, 'src/config');

// load specific environment file
const config = SpurConfig.load(configDirectory, "production");
const config = SpurConfig.load(configDirectory, 'production');

// loads configuration specified in NODE_ENV environment variable
const config = SpurConfig.load(configDirectory);
Expand All @@ -125,11 +125,11 @@ This example loads the configuration into an injector/module and makes it availa

#### `src/injector.js`
```javascript
import spur from 'spur-ioc';
import spurConfig from 'spur-config';
import registerConfig from 'spur-common/registerConfig';
const spur = require('spur-ioc');
const spurConfig = require('spur-config');
const registerConfig = require('spur-common/registerConfig');

module.exports = function() {
module.exports = function () {

const ioc = spur.create('test-application');
const configDirectory = path.join(__dirname, './config');
Expand All @@ -143,7 +143,7 @@ module.exports = function() {
#### `src/services/TestConfig.js`

```javascript
module.exports = function(config) {
module.exports = function (config) {

console.log(config);

Expand Down Expand Up @@ -173,16 +173,13 @@ If your editor does not have ESLint integration, the test commands below will ru

Execute the following the install the dependencies, build and test with the following.

```bash
```shell
$ npm install
$ npm run build
$ npm test
```

View the `package.json`'s `scripts` section for a list of all the other commands.

> Requires Node 4+ for dev tools, but we recommend using Node 6.
# License

[MIT](LICENSE)

0 comments on commit 8dcc08d

Please sign in to comment.