Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Jun 6, 2024
1 parent a35e415 commit 5eba3e7
Show file tree
Hide file tree
Showing 22 changed files with 25 additions and 775 deletions.
11 changes: 5 additions & 6 deletions projects/demo/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"build": {
"executor": "@nx/angular:webpack-browser",
"options": {
"allowedCommonJsDependencies": ["@tinkoff/ng-dompurify", "dompurify", "showdown", "text-mask-core"],
"customWebpackConfig": {
"path": "projects/demo/webpack.config.ts"
},
Expand Down Expand Up @@ -104,11 +103,11 @@
"executor": "@angular-builders/custom-webpack:server",
"options": {
"customWebpackConfig": {
"path": "projects/demo/webpack.server.config.ts"
"path": "projects/demo/server/webpack.server.config.ts"
},
"outputPath": "dist/demo/server",
"main": "projects/demo/server.ts",
"tsConfig": "projects/demo/tsconfig.server.json",
"main": "projects/demo/server/server.ts",
"tsConfig": "projects/demo/server/tsconfig.server.json",
"sourceMap": true,
"optimization": false
},
Expand All @@ -125,7 +124,7 @@
"generate-routes-file": {
"executor": "nx:run-commands",
"options": {
"command": "ts-node ./projects/demo/generate-routes.ts"
"command": "ts-node ./projects/demo/server/generate-routes.ts"
}
},
"prerender": {
Expand All @@ -134,7 +133,7 @@
"options": {
"browserTarget": "editor-demo:build:production,ssr",
"serverTarget": "editor-demo:server:production",
"routesFile": "projects/demo/routes.txt",
"routesFile": "projects/demo/server/routes.txt",
"guessRoutes": false
},
"configurations": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {readFileSync, writeFileSync} from 'node:fs';
import {join} from 'node:path';

import {TuiDemoPath} from './src/app/constants';
import {TuiDemoPath} from '../src/app/shared/routes';

const EXCEPTIONS: string[] = [TuiDemoPath.Stackblitz];

Expand Down
4 changes: 2 additions & 2 deletions projects/demo/server.ts → projects/demo/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {provideLocation, provideUserAgent} from '@ng-web-apis/universal';
import {ngExpressEngine} from '@nguniversal/express-engine';
import express from 'express';

import bootstrap from './src/main.server';
import bootstrap from '../src/main.server';

declare const __non_webpack_require__: NodeRequire;
const mainModule = __non_webpack_require__.main;
Expand Down Expand Up @@ -45,6 +45,6 @@ if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
);
}

export * from './src/main.server';
export * from '../src/main.server';

export default bootstrap;
8 changes: 8 additions & 0 deletions projects/demo/server/tsconfig.server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../../tsconfig.json",
"files": ["../src/main.server.ts", "server/server.ts", "./src/polyfills.ts"],
"include": ["src/**/*.d.ts"],
"angularCompilerOptions": {
"compilationMode": "full"
}
}
3 changes: 3 additions & 0 deletions projects/demo/server/webpack.server.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {makeWebpackConfig} from '../webpack.config';

export default makeWebpackConfig({server: true});
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '@taiga-ui/core/styles/taiga-ui-local.less';

:host {
font: var(--tui-font-text-m);
color: var(--tui-text-01);
Expand Down
2 changes: 1 addition & 1 deletion projects/demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import pkg from '@tbank/tui-editor/package.json';
selector: 'app',
imports: [RouterLink, TuiRootComponent, TuiLinkDirective, TuiAddonDoc, TuiPreview],
templateUrl: './app.component.html',
styleUrls: ['./app.style.less'],
styleUrls: ['./app.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppComponent implements OnInit {
Expand Down
2 changes: 1 addition & 1 deletion projects/demo/src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {NG_EVENT_PLUGINS} from '@tinkoff/ng-event-plugins';

import {DEMO_PAGES} from './app.pages';
import {routes} from './app.routes';
import {TUI_LOGO_CONTENT} from './modules/logo/logo.component';
import {TUI_LOGO_CONTENT} from './shared/logo';

export const appConfig: ApplicationConfig = {
providers: [
Expand Down
8 changes: 1 addition & 7 deletions projects/demo/src/app/app.pages.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {TuiDocPages} from '@taiga-ui/addon-doc';

import {TuiDemoPath} from './constants';
import {TuiDemoPath} from './shared/routes';

export const DEMO_PAGES: TuiDocPages = [
{
Expand All @@ -17,12 +17,6 @@ export const DEMO_PAGES: TuiDocPages = [
route: TuiDemoPath.Stackblitz,
target: '_blank',
},
{
section: 'Documentation',
title: 'Changelog',
route: TuiDemoPath.Changelog,
keywords: 'release, change, changelog, archive, history',
},
{
section: 'Documentation',
title: 'Contenteditable',
Expand Down
7 changes: 1 addition & 6 deletions projects/demo/src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {Routes} from '@angular/router';
import {tuiProvideRoutePageTab as route} from '@taiga-ui/addon-doc';

import {TuiDemoPath} from './constants/demo-path';
import {TuiDemoPath} from './shared/routes';

export const routes: Routes = [
route({
Expand Down Expand Up @@ -154,11 +154,6 @@ export const routes: Routes = [
loadComponent: async () => import('./pages/toolbar/floating'),
title: 'Editor — Toolbar',
}),
route({
path: TuiDemoPath.Changelog,
loadComponent: async () => import('./pages/changelog'),
title: 'Changelog',
}),
{
path: '**',
redirectTo: TuiDemoPath.StarterKit,
Expand Down
1 change: 0 additions & 1 deletion projects/demo/src/app/constants/index.ts

This file was deleted.

6 changes: 0 additions & 6 deletions projects/demo/src/app/pages/changelog/index.html

This file was deleted.

60 changes: 0 additions & 60 deletions projects/demo/src/app/pages/changelog/index.less

This file was deleted.

21 changes: 0 additions & 21 deletions projects/demo/src/app/pages/changelog/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';
standalone: true,
selector: 'logo',
imports: [TuiSvgComponent, RouterLink, TuiLinkDirective],
templateUrl: './logo.template.html',
styleUrls: ['./logo.style.less'],
templateUrl: './index.html',
styleUrls: ['./index.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TuiLogo {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export const TuiDemoPath = {
Anchors: 'anchors',
Appearance: 'appearance',
Mention: 'mention',
Changelog: 'changelog',
ColorPicker: 'color-picker',
Checkbox: 'checkbox',
AngularContenteditableAccessor: 'angular-contenteditable-accessor',
Expand Down
8 changes: 0 additions & 8 deletions projects/demo/tsconfig.server.json

This file was deleted.

3 changes: 0 additions & 3 deletions projects/demo/webpack.server.config.ts

This file was deleted.

Loading

0 comments on commit 5eba3e7

Please sign in to comment.