Skip to content
This repository has been archived by the owner on Jul 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #41 from Financial-Times/make-npm-packagable
Browse files Browse the repository at this point in the history
Make npm packagable
  • Loading branch information
leggsimon authored Nov 29, 2017
2 parents ab2aabc + 6ec1d38 commit 031b394
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 21 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ jspm_packages
# Environment settings
*.env*

.vscode

.eslintrc.js
.editorconfig
.pa11yci.js

package-lock.json
package-lock.json
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ unit-test:
test:
make verify
make unit-test
# make a11y
9 changes: 6 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ machine:
node:
version: 6.11.1

dependencies:
override:
- npm prune && npm install
deployment:
release:
tag: /^v?\d+\.\d+\.\d+(?:-beta\.\d+)?$/
owner: Financial-Times
commands:
- make npm-publish
28 changes: 14 additions & 14 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
'use strict';

require('dotenv').config({silent: true});

const fs = require('fs');
const paths = [
`${__dirname}/lib`
];

paths.forEach(path => {
fs.readdirSync(path).forEach(file => {
if (file.indexOf('.js') > 0) {
module.exports[file.replace(/\.js/, '')] = require(`${path}/${file}`);
}
});
});
module.exports = {
accessLicenceClient: require('./lib/accessLicenceClient'),
acquisitionCtxClient: require('./lib/acquisitionCtxClient'),
clientErrors: require('./lib/clientErrors'),
elasticSearchClient: require('./lib/elasticSearchClient'),
facetsClient: require('./lib/facetsClient'),
huiClient: require('./lib/huiClient'),
kinesisClient: require('./lib/kinesisClient'),
licenceDataClient: require('./lib/licenceDataClient'),
myFTClient: require('./lib/myFTClient'),
sessionClient: require('./lib/sessionClient'),
syncUserFollows: require('./lib/syncUserFollows'),
userProfileClient: require('./lib/userProfileClient'),
};
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kat-client-proxies",
"version": "2.1.10",
"name": "@financial-times/kat-client-proxies",
"version": "0.0.0",
"description": "A library of client proxies for various ft platform apis",
"main": "index.js",
"engines": {
Expand Down Expand Up @@ -37,6 +37,7 @@
"mocha": "^4.0.0",
"moment": "^2.18.1",
"nock": "^9.0.13",
"npm-prepublish": "^1.2.3",
"sinon": "^2.1.0",
"uuid": "^3.0.1"
},
Expand Down

0 comments on commit 031b394

Please sign in to comment.