Skip to content

Commit

Permalink
fix(export): added package export
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon-mario committed Mar 4, 2019
1 parent a0d8bb7 commit ce93073
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@js-items/foundation",
"version": "0.0.0-development",
"description": "Provides set of interfaces and tests for concrete implementations of js-items repositories",
"main": "index.js",
"main": "./src/index.ts",
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && tsc",
Expand Down Expand Up @@ -34,6 +34,9 @@
"tslint-config-prettier": "1.18.0",
"typescript": "3.3.3333"
},
"devEngines": {
"node": "8.x || 9.x || 10.x || 11.x"
},
"publishConfig": {
"access": "public"
},
Expand Down
7 changes: 7 additions & 0 deletions src/errors/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import conflictingItemError from "./conflictingItemError";
import itemNotFoundError from "./itemNotFoundError";

export {
conflictingItemError,
itemNotFoundError
};
19 changes: 19 additions & 0 deletions src/functions/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import countItems from "./countItems";
import createItem from "./createItem";
import deleteItem from "./deleteItem";
import deleteItems from "./deleteItems";
import getItem from "./getItem";
import getItems from "./getItems";
import replaceItem from "./replaceItem";
import updateItem from "./updateItem";

export {
countItems,
createItem,
getItems,
getItem,
deleteItem,
deleteItems,
replaceItem,
updateItem
};
15 changes: 15 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as errors from "./errors/index";
import * as facade from "./facade";
import * as functions from "./functions";
import * as interfaces from "./interfaces";
import * as testFacade from "./testFacade";
import * as utils from "./utils";

module.exports = {
...functions,
...errors,
...interfaces,
...utils,
facade,
testFacade
};
19 changes: 19 additions & 0 deletions src/interfaces/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import cursor from "./cursor";
import cursorResult from "./cursorResult";
import filter from "./filter";
import item from "./item";
import options from "./options";
import pagination from "./pagination";
import sort from "./sort";
import sortOrder from "./sortOrder";

export {
cursor,
cursorResult,
filter,
item,
options,
pagination,
sort,
sortOrder
};
13 changes: 13 additions & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import createCursorFromItem from "./createCursorFromItem";
import createCursorFromItems from "./createCursorsFromItems";
import createGetItemsResult from "./createGetItemsResult";
import createPaginationFilter from "./createPaginationFilter";
import xor from './xor';

export {
createCursorFromItem,
createCursorFromItems,
createGetItemsResult,
createPaginationFilter,
xor,
};

0 comments on commit ce93073

Please sign in to comment.