Skip to content

Commit

Permalink
added a main file to expose all components without the need for refer…
Browse files Browse the repository at this point in the history
…encing full paths of each to close #6
  • Loading branch information
travi committed May 25, 2016
1 parent 122bfa4 commit 4477088
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 10 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"url": "https://github.com/travi/admin.travi.org-components/issues"
},
"homepage": "https://github.com/travi/admin.travi.org-components#readme",
"main": "lib/main.js",
"devDependencies": {
"@kadira/storybook": "1.20.0",
"@travi/any": "0.1.1",
Expand Down
9 changes: 9 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export {default as createIndex} from './index';
export {default as createPrimaryNav} from './theme/nav/primary-nav';
export {default as createWrap} from './theme/wrap/wrap';
export {default as createNotFound} from './errors/not-found';
export {default as createServerError} from './errors/server-error';
export {default as createResourceList} from './resources/list/list';
export {default as createMaybeList} from './resources/list/maybe-list';
export {default as createResource} from './resources/individual/resource';
export {default as createUser} from './resources/individual/users/user';
2 changes: 1 addition & 1 deletion test/unit/errors/not-found-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import reactDom from 'react-dom/server';
import {assert} from 'chai';
import skinDeep from 'skin-deep';

import createNotFound from '../../../src/errors/not-found';
import {createNotFound} from '../../../src/main';

suite('not found', () => {
const NotFound = createNotFound(React);
Expand Down
4 changes: 2 additions & 2 deletions test/unit/errors/server-error-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import reactDom from 'react-dom/server';
import {assert} from 'chai';
import skinDeep from 'skin-deep';

import createNotFound from '../../../src/errors/server-error';
import {createServerError} from '../../../src/main';

suite('server error', () => {
const ServerError = createNotFound(React);
const ServerError = createServerError(React);

test('that displayName is set', () => {
assert.equal(ServerError.displayName, 'ServerError');
Expand Down
2 changes: 1 addition & 1 deletion test/unit/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import reactDom from 'react-dom/server';
import {assert} from 'chai';
import skinDeep from 'skin-deep';

import createIndex from '../../src/index';
import { createIndex } from '../../src/main';

suite('index', () => {
const Index = createIndex(React);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/resources/individual/resource-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import any from '@travi/any';
import {assert} from 'chai';
import skinDeep from 'skin-deep';

import createResource from '../../../../src/resources/individual/resource';
import {createResource} from '../../../../src/main';
const Resource = createResource(React);

suite('resource component test', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/resources/individual/users/user-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import any from '@travi/any';
import {assert} from 'chai';
import skinDeep from 'skin-deep';

import createUser from '../../../../../src/resources/individual/users/user';
import {createUser} from '../../../../../src/main';
const User = createUser(React);

suite('user component test', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/resources/list/list-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {assert} from 'chai';
import any from '@travi/any';

import styles from '../../../helpers/style-fakes';
import createResourceList from '../../../../src/resources/list/list';
import {createResourceList} from '../../../../src/main';
const ResourceList = createResourceList(React);

function assertSimpleResourceRenders(listItem, resource) {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/resources/list/maybe-list-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import skinDeep from 'skin-deep';
import {assert} from 'chai';
import any from '@travi/any';

import createMaybeList from '../../../../src/resources/list/maybe-list';
import {createMaybeList} from '../../../../src/main';
const MaybeList = createMaybeList(React);

suite('maybe-list component', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/theme/primary-nav-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import cheerio from 'cheerio';
import {assert} from 'chai';

import HistoryWrapper from '../../helpers/history-wrapper';
import createPrimaryNav from '../../../src/theme/nav/primary-nav';
import {createPrimaryNav} from '../../../src/main';

const PrimaryNav = createPrimaryNav(React);

Expand Down
2 changes: 1 addition & 1 deletion test/unit/theme/wrap/wrapper-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import any from '@travi/any';
import {assert} from 'chai';
import skinDeep from 'skin-deep';

import createWrap from '../../../../src/theme/wrap/wrap';
import {createWrap} from '../../../../src/main';

suite('wrapper component', () => {
const Wrap = createWrap(React);
Expand Down

0 comments on commit 4477088

Please sign in to comment.