Remove references to lodash
This commit is contained in:
parent
157d6f09de
commit
aa15a46b61
6 changed files with 15 additions and 8 deletions
0
api/media/routes.js
Normal file
0
api/media/routes.js
Normal file
|
@ -4,6 +4,6 @@ import * as test from './test/routes'
|
|||
|
||||
const router = new Router()
|
||||
|
||||
router.get('/api/test', test.testStatic)
|
||||
router.get('/', test.testStatic)
|
||||
|
||||
export default router
|
||||
|
|
10
config.js
10
config.js
|
@ -1,6 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const _ = require('lodash')
|
||||
const nconf = require('nconf')
|
||||
|
||||
// Helper method for global usage.
|
||||
|
@ -16,7 +15,14 @@ nconf.inTest = () => nconf.get('NODE_ENV') === 'test'
|
|||
// Load package.json for name and such
|
||||
let pckg = require('./package.json')
|
||||
|
||||
pckg = _.pick(pckg, ['name', 'version', 'description', 'author', 'license', 'homepage'])
|
||||
pckg = {
|
||||
name: pckg.name,
|
||||
version: pckg.version,
|
||||
description: pckg.description,
|
||||
author: pckg.author,
|
||||
license: pckg.license,
|
||||
homepage: pckg.homepage,
|
||||
}
|
||||
|
||||
|
||||
// Load overrides as first priority
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
"start": "node index.js",
|
||||
"test": "env NODE_ENV=test mocha --require babel-register --recursive --reporter dot",
|
||||
"docker": "docker run -it --rm --name my-running-script -v \"$PWD\":/usr/src/app -w /usr/src/app node:slim",
|
||||
"docker:test": "npm run docker -- npm install && npm run test",
|
||||
"docker:dev": "npm run docker -- npm install && npm run dev",
|
||||
"docker:prod": "npm run docker -- npm install && npm run start"
|
||||
"docker:test": "npm run docker -- npm install --no-optional && npm run test",
|
||||
"docker:dev": "npm run docker -- npm install --no-optional && npm run dev",
|
||||
"docker:prod": "npm run docker -- npm install --no-optional && npm run start"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -33,6 +33,7 @@
|
|||
"assert-extended": "^1.0.1",
|
||||
"mocha": "^4.0.1",
|
||||
"nodemon": "^1.12.1",
|
||||
"request-json": "^0.6.2"
|
||||
"request-json": "^0.6.2",
|
||||
"sinon": "^4.1.3"
|
||||
}
|
||||
}
|
||||
|
|
0
test/media/routes.test.js
Normal file
0
test/media/routes.test.js
Normal file
|
@ -11,7 +11,7 @@ describe('Server', () => {
|
|||
|
||||
it('should run', () =>
|
||||
assert.isFulfilled(
|
||||
client.getAsync('/api/test')
|
||||
client.getAsync('/')
|
||||
)
|
||||
.then(data => {
|
||||
assert.ok(data)
|
||||
|
|
Loading…
Reference in a new issue