Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Working tests, demo (at least its buildable) and build
Browse files Browse the repository at this point in the history
  • Loading branch information
mdvorak committed Dec 29, 2017
1 parent 2c5bd7a commit be32c44
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 42 deletions.
5 changes: 1 addition & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
singleRun: false,
detectBrowsers: {
usePhantomJS: true
}
singleRun: false
});
};
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config=proxy.conf.json",
"build": "ng build --target=production --env=prod --sourcemaps",
"prebuild": "ng lint",
"build": "ng-packagr",
"buildapp": "ng build --target=production --env=prod --sourcemaps",
"pretest": "ng-packagr",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
Expand Down
22 changes: 1 addition & 21 deletions src/lib/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
export { ResourceRouterModule, ResourceRouterOptions, RESOURCE_ROUTER_CONFIGURATION } from './src/resource-router-module';
export { ViewData } from './src/view-data';
export { ViewDataLoader, HttpClientViewDataLoader } from './src/view-data-loader';
export { ViewDef, Data, StatusType } from './src/view-definition';
export { LocationInfo, parseUrl } from './src/utils/parse-url';
export { ApiUrl, BaseApiUrl, BrowserApiUrl } from './src/api-url';
export { ApiMapper } from './src/api-mapper';
export { SingleApiMapper, APP_API_PREFIX } from './src/single-api-mapper';
export { ApiLocation } from './src/api-location';
export { ResourceViewRegistry, RESOURCE_VIEWS, TYPE_QUALITY_EVALUATOR } from './src/resource-view-registry';
export { ResourceOutletComponent } from './src/directives/resource-outlet';
export { ResourceDataDirective } from './src/directives/resource-data';
export { ResourceViewDirective } from './src/directives/resource-view';
export { TypeQualityEvaluator, simpleTypeQualityEvaluator, statusQualityEvaluator } from './src/quality-evaluator';
export { NavigationHandler, supportsNavigation } from './src/navigation-handler';
export { normalizeMediaType } from './src/utils/normalize-media-type';
export * from './src/system-media-types';
export { ViewTypeStrategy, HeaderViewTypeStrategy } from './src/view-type-strategy';
export { escapeRegExpPattern, wildcardToRegex } from './src/utils/wildcard-to-regex';
export { ResourceLinkDirective } from './src/directives/resource-link';
export { ResourceLinkWithHrefDirective } from './src/directives/resource-link-with-href';
export * from './src/index';
2 changes: 1 addition & 1 deletion src/lib/src/api-url.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MockApiUrl } from '../testing/src/mock-api-url';
import { MockApiUrl } from 'angular-resource-router/testing';
import { ApiUrl } from './api-url';

describe(ApiUrl.name, () => {
Expand Down
21 changes: 21 additions & 0 deletions src/lib/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export { ResourceRouterModule, ResourceRouterOptions, RESOURCE_ROUTER_CONFIGURATION } from './resource-router-module';
export { ViewData } from './view-data';
export { ViewDataLoader, HttpClientViewDataLoader } from './view-data-loader';
export { ViewDef, Data, StatusType } from './view-definition';
export { LocationInfo, parseUrl } from './utils/parse-url';
export { ApiUrl, BaseApiUrl, BrowserApiUrl } from './api-url';
export { ApiMapper } from './api-mapper';
export { SingleApiMapper, APP_API_PREFIX } from './single-api-mapper';
export { ApiLocation } from './api-location';
export { ResourceViewRegistry, RESOURCE_VIEWS, TYPE_QUALITY_EVALUATOR } from './resource-view-registry';
export { ResourceOutletComponent } from './directives/resource-outlet';
export { ResourceDataDirective } from './directives/resource-data';
export { ResourceViewDirective } from './directives/resource-view';
export { TypeQualityEvaluator, simpleTypeQualityEvaluator, statusQualityEvaluator } from './quality-evaluator';
export { NavigationHandler, supportsNavigation } from './navigation-handler';
export { normalizeMediaType } from './utils/normalize-media-type';
export * from './system-media-types';
export { ViewTypeStrategy, HeaderViewTypeStrategy } from './view-type-strategy';
export { escapeRegExpPattern, wildcardToRegex } from './utils/wildcard-to-regex';
export { ResourceLinkDirective } from './directives/resource-link';
export { ResourceLinkWithHrefDirective } from './directives/resource-link-with-href';
2 changes: 1 addition & 1 deletion src/lib/src/single-api-mapper.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MockApiUrl } from '../testing/src/mock-api-url';
import { MockApiUrl } from 'angular-resource-router/testing';
import { SingleApiMapper } from './single-api-mapper';

describe(SingleApiMapper.name, () => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/testing/public_api.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './src/mock-api-url';
export * from './src/index';
1 change: 1 addition & 0 deletions src/lib/testing/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { MockApiUrl } from './mock-api-url';
10 changes: 3 additions & 7 deletions src/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
"outDir": "../out-tsc/app",
"baseUrl": ".",
"module": "es2015",
"types": [],
"paths": {
"angular-resource-router": [
"../dist/angular-resource-router"
]
}
"types": []
},
"exclude": [
"test.ts",
"**/*.spec.ts"
"**/*.spec.ts",
"lib/testing/**"
]
}
7 changes: 1 addition & 6 deletions src/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
"types": [
"jasmine",
"node"
],
"paths": {
"angular-resource-router": [
"../dist/angular-resource-router"
]
}
]
},
"files": [
"test.ts"
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"paths": {
"angular-resource-router": [
"dist/angular-resource-router"
],
"angular-resource-router/testing": [
"dist/angular-resource-router/testing"
]
}
}
Expand Down

0 comments on commit be32c44

Please sign in to comment.