Skip to content

Commit

Permalink
Fix publishing flow
Browse files Browse the repository at this point in the history
  • Loading branch information
konowrockis committed Sep 14, 2020
1 parent 8731584 commit 8e9d14f
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion __tests__/routing.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createRouting, segment, number } from 'index';
import { createRouting, number, segment } from '../src/index';

describe('routing', () => {
it('should create routing', () => {
Expand Down
7 changes: 7 additions & 0 deletions __tests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": ".."
},
"include": ["**/*"]
}
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"test": "jest",
"build": "rollup -c"
},
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/leancodepl/ts-routes.git"
Expand Down
4 changes: 2 additions & 2 deletions src/RouteDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import PathPattern, {
PathOptionalParams,
PathOptionalQuery,
PathRequiredParams,
PathRequiredQuery,
} from 'PathPattern';
PathRequiredQuery
} from './PathPattern';

export default interface RouteDescription<
TRequiredParams extends string = string,
Expand Down
2 changes: 1 addition & 1 deletion src/createRouting.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { compile } from "path-to-regexp";
import { stringify } from "query-string";
import RouteDescription, { RouteChildren, RouteOptionalParams, RouteOptionalQuery, RouteRequiredParams, RouteRequiredQuery } from "RouteDescription";
import RouteDescription, { RouteChildren, RouteOptionalParams, RouteOptionalQuery, RouteRequiredParams, RouteRequiredQuery } from "./RouteDescription";

type PathPatternArgs<
TRequiredParams extends string,
Expand Down
16 changes: 8 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { default as createRouting } from "createRouting";
export { default as PathPattern } from "PathPattern";
export { default as RouteDescription } from "RouteDescription";
export { default as segment, SegmentOptionalParam, SegmentOptionalQuery, SegmentRequiredParam, SegmentRequiredQuery } from "segment";
export { default as arg } from "segments/arg";
export { default as number } from "segments/number";
export { default as query } from "segments/query";
export { default as uuid } from "segments/uuid";
export { default as createRouting } from "./createRouting";
export { default as PathPattern } from "./PathPattern";
export { default as RouteDescription } from "./RouteDescription";
export { default as segment, SegmentOptionalParam, SegmentOptionalQuery, SegmentRequiredParam, SegmentRequiredQuery } from "./segment";
export { default as arg } from "./segments/arg";
export { default as number } from "./segments/number";
export { default as query } from "./segments/query";
export { default as uuid } from "./segments/uuid";

2 changes: 1 addition & 1 deletion src/segment.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PathPattern from "PathPattern";
import PathPattern from "./PathPattern";

export type SegmentRequiredParam<TParam extends string> = {
name: TParam;
Expand Down
2 changes: 1 addition & 1 deletion src/segments/arg.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SegmentOptionalParam, SegmentRequiredParam } from "segment";
import { SegmentOptionalParam, SegmentRequiredParam } from "../segment";

export default function arg<TParam extends string, TOptional extends boolean = false>(
name: TParam,
Expand Down
2 changes: 1 addition & 1 deletion src/segments/query.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SegmentOptionalQuery, SegmentRequiredQuery } from "segment";
import { SegmentOptionalQuery, SegmentRequiredQuery } from "../segment";

type GetKeysAssignableTo<TValue, T> = { [K in keyof T]: T[K] extends TValue ? K : never }[keyof T];

Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"compilerOptions": {
"lib": ["esnext"],
"target": "ES2019",
"target": "ESNext",
"module": "esNext",
"moduleResolution": "node",
"sourceMap": true,
"declaration": true,
"strict": true,
"baseUrl": "src",
"rootDir": "src",
"esModuleInterop": true
},
"include": ["src/**/*", "__tests__/**/*"],
"include": ["src/**/*"],
"exclude": ["node_modules"]
}

0 comments on commit 8e9d14f

Please sign in to comment.