Skip to content

Commit

Permalink
chore: updated ts paths
Browse files Browse the repository at this point in the history
  • Loading branch information
pimenovoleg committed Jun 24, 2019
1 parent ef81da5 commit fc86734
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 54 deletions.
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"outputPath": "dist",
"index": "packages/docs/src/index.html",
"main": "packages/docs/src/main.ts",
"tsConfig": "packages/docs/src/tsconfig.json",
"tsConfig": "packages/docs/tsconfig.json",
"assets": [
{
"glob": "**/*",
Expand Down Expand Up @@ -74,7 +74,7 @@
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"packages/docs/src/tsconfig.json"
"packages/docs/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
Expand Down
6 changes: 6 additions & 0 deletions packages/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

1. build:mosaic-examples
2. build:mosaic
3. build:docs

and run serve - docs:start
5 changes: 4 additions & 1 deletion packages/docs/src/app/docs.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule } from '@angular/router';
import { ExampleModule } from '@ptsecurity/mosaic-examples';

import { MainLayoutComponent } from './components/main-layout/main-layout.component';
import { MainLayoutModule } from './components/main-layout/main-layout.module';
Expand All @@ -18,6 +19,7 @@ import {
} from './containers/component-viwer/component-viewer.component';
import { ComponentViewerModule } from './containers/component-viwer/component-viewer.module';
import { DocsComponent } from './docs.component';
import { DocumentationItems } from './shared/documentation-items/documentation-items';


@NgModule({
Expand All @@ -26,6 +28,7 @@ import { DocsComponent } from './docs.component';
BrowserAnimationsModule,
FormsModule,
HttpClientModule,
ExampleModule,

RouterModule.forRoot([
{ path: '', component: HomepageComponent, pathMatch: 'full' },
Expand Down Expand Up @@ -68,7 +71,7 @@ import { DocsComponent } from './docs.component';
],
declarations: [DocsComponent],
providers: [

DocumentationItems,
{
provide: LocationStrategy,
useClass: PathLocationStrategy
Expand Down
39 changes: 0 additions & 39 deletions packages/docs/src/tsconfig.json

This file was deleted.

37 changes: 37 additions & 0 deletions packages/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2017",
"dom"
],

"module": "es2015",
"moduleResolution": "node",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"importHelpers": true,
"target": "es2015",
"baseUrl": ".",
"paths": {
"@ptsecurity/cdk/*": ["../../dist/packages/cdk/*"],
"@ptsecurity/cdk": ["../../dist/packages/cdk"],

"@ptsecurity/mosaic/*": ["../../dist/packages/mosaic/*"],

"@ptsecurity/mosaic-moment-adapter/*": ["../../dist/packages/mosaic-moment-adapter/*"],
"@ptsecurity/mosaic-moment-adapter": ["../../dist/packages/mosaic-moment-adapter"],

"@ptsecurity/mosaic-examples/*": ["../../dist/releases/mosaic-examples/*"],
"@ptsecurity/mosaic-examples": ["../../dist/packages/mosaic-examples"]
}
},
"exclude": [
"assets"
],
"include": ["./**/*.ts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { Component } from '@angular/core';
*/
@Component({
selector: 'button-basic-example',
templateUrl: 'button-basic-example.html',
styleUrls: ['button-basic-example.css']
templateUrl: 'button-overview-example.html',
styleUrls: ['button-overview-example.css']
})
export class ButtonBasicExample {
export class ButtonOverviewExample {
}
15 changes: 8 additions & 7 deletions packages/mosaic-examples/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"module": "es2015",
"moduleResolution": "node",
"outDir": "../../dist/packages/mosaic-examples",
"rootDir": ".",
"rootDirs": [
".",
"../../dist/packages/mosaic-examples"
],
"sourceMap": true,
"inlineSources": true,
"target": "es2015",
Expand All @@ -29,15 +32,13 @@
"@ptsecurity/mosaic/*": [
"../../dist/packages/mosaic/*"
],
"@ptsecurity/mosaic": [
"../../dist/packages/mosaic/public-api"
],
// "@ptsecurity/mosaic": [
// "../../dist/packages/mosaic/public-api"
// ],
"@ptsecurity/cdk/*": [
"../../dist/packages/cdk/*"
],
"@ptsecurity/mosaic-moment-adapter": [
"../../dist/packages/mosaic-moment-adapter"
]
"@ptsecurity/mosaic-moment-adapter/*": ["../../dist/packages/mosaic-moment-adapter/*"]
}
},
"files": [
Expand Down
13 changes: 12 additions & 1 deletion tools/gulp/gulpfile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { task, series } from 'gulp';

import { createPackageBuildTasks } from '../packages';

import { cdkPackage, examplesPackage, mosaicPackage, momentAdapterPackage } from './packages';
import { cdkPackage, examplesPackage, mosaicPackage, momentAdapterPackage, allBuildPackages } from './packages';

/* tslint:disable:no-import-side-effect ordered-imports */
// THIS ORDER OF IMPORTS AND CALLS IS IMPORTANT
Expand All @@ -23,4 +25,13 @@ import './tasks/docs';
import './tasks/payload';
import './tasks/changelog';
import './tasks/validate-licenses';


/* tslint:enable:no-import-side-effect */


/** Task that builds all available release packages. */
task('all-build-release-packages', series(
...allBuildPackages.map((buildPackage) => `${buildPackage.name}:build-release`)
));

7 changes: 7 additions & 0 deletions tools/gulp/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ mosaicPackage.sourceDir = join(buildConfig.packagesDir, 'mosaic');

cdkPackage.copySecondaryEntryPointStylesToRoot = true;
cdkPackage.hasSchematics = true;

export const allBuildPackages = [
cdkPackage,
momentAdapterPackage,
mosaicPackage,
examplesPackage
];
1 change: 0 additions & 1 deletion tools/gulp/tasks/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ task('copy-stackblitz-examples', () => {
});

task('docs', series(
'clean',
'markdown-docs-mosaic',
'build-highlighted-examples',
'build-examples-module',
Expand Down

0 comments on commit fc86734

Please sign in to comment.