Skip to content

Commit

Permalink
chore(demo): remove all !!raw-loader!-imports (#2174)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov authored and splincode committed Aug 1, 2022
1 parent 5be6bf4 commit 23c0cc5
Show file tree
Hide file tree
Showing 182 changed files with 2,514 additions and 2,687 deletions.
4 changes: 2 additions & 2 deletions projects/addon-doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ npm i @taiga-ui/addon-doc
export class SuperComponent {
// Keys would be used as tabs for code example
readonly example = {
TypeScript: import('!!raw-loader!./examples/1/index.ts'),
HTML: import('!!raw-loader!./examples/1/index.html'),
TypeScript: import('./examples/1/index.ts?raw'),
HTML: import('./examples/1/index.html?raw'),
};

readonly inputVariants = ['input 1', 'input 2'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {ChangeDetectionStrategy, Component} from '@angular/core';
})
export class Example<%= classify(name) %>Component {
<% for(let i =1; i<=samples; i++) {%>readonly example<%=i%> = {
TypeScript: import('!!raw-loader!./examples/<%=i%>/index.ts'),
HTML: import('!!raw-loader!./examples/<%=i%>/index.html'),
TypeScript: import('./examples/<%=i%>/index.ts?raw'),
HTML: import('./examples/<%=i%>/index.html?raw'),
};
<% } %>
readonly exampleImportModule = import('!!raw-loader!./import/import-module.md');
readonly exampleImportModule = import('./import/import-module.md?raw');
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ function getImportArray(
sourceFile,
appComponentPath,
`* as example${index}Html`,
`!!raw-loader!./examples/${index}/index.html`,
`./examples/${index}/index.html?raw`,
true,
),
insertImport(
sourceFile,
appComponentPath,
`* as example${index}Ts`,
`!!raw-loader!./examples/${index}/index.ts`,
`./examples/${index}/index.ts?raw`,
true,
),
);
Expand Down
30 changes: 15 additions & 15 deletions projects/demo/src/modules/animations/animations.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ import {changeDetection} from '@demo/emulate/change-detection';
import {TuiDocExample} from '@taiga-ui/addon-doc';

@Component({
selector: `example-animations`,
templateUrl: `./animations.template.html`,
styleUrls: [`./animations.style.less`],
selector: 'example-animations',
templateUrl: './animations.template.html',
styleUrls: ['./animations.style.less'],
changeDetection,
})
export class ExampleAnimationsComponent {
speed = 1000;
readonly speedTicksLabels: number[] = [0, 600, 1200, 1800, 2400, 3000];

readonly heightCollapseExample: TuiDocExample = {
HTML: import(`!!raw-loader!./examples/height-collapse/index.html`),
TypeScript: import(`!!raw-loader!./examples/height-collapse/index.ts`),
LESS: import(`!!raw-loader!./examples/height-collapse/index.less`),
HTML: import('./examples/height-collapse/index.html?raw'),
TypeScript: import('./examples/height-collapse/index.ts?raw'),
LESS: import('./examples/height-collapse/index.less?raw'),
};

readonly widthCollapseExample: TuiDocExample = {
HTML: import(`!!raw-loader!./examples/width-collapse/index.html`),
TypeScript: import(`!!raw-loader!./examples/width-collapse/index.ts`),
LESS: import(`!!raw-loader!./examples/width-collapse/index.less`),
HTML: import('./examples/width-collapse/index.html?raw'),
TypeScript: import('./examples/width-collapse/index.ts?raw'),
LESS: import('./examples/width-collapse/index.less?raw'),
};

readonly fadeInExample: TuiDocExample = {
HTML: import(`!!raw-loader!./examples/fade-in/index.html`),
TypeScript: import(`!!raw-loader!./examples/fade-in/index.ts`),
LESS: import(`!!raw-loader!./examples/fade-in/index.less`),
HTML: import('./examples/fade-in/index.html?raw'),
TypeScript: import('./examples/fade-in/index.ts?raw'),
LESS: import('./examples/fade-in/index.less?raw'),
};

readonly scaleInExample: TuiDocExample = {
HTML: import(`!!raw-loader!./examples/scale-in/index.html`),
TypeScript: import(`!!raw-loader!./examples/scale-in/index.ts`),
LESS: import(`!!raw-loader!./examples/scale-in/index.less`),
HTML: import('./examples/scale-in/index.html?raw'),
TypeScript: import('./examples/scale-in/index.ts?raw'),
LESS: import('./examples/scale-in/index.less?raw'),
};
}
24 changes: 12 additions & 12 deletions projects/demo/src/modules/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';

@Component({
selector: `home`,
templateUrl: `./home.template.html`,
styleUrls: [`./home.style.less`],
selector: 'home',
templateUrl: './home.template.html',
styleUrls: ['./home.style.less'],
changeDetection,
encapsulation,
})
export class HomeComponent {
readonly angularJsonStyles = import(`!!raw-loader!./examples/angular-json-styles.md`);
readonly appModule = import(`!!raw-loader!./examples/app-module.md`);
readonly appTemplate = import(`!!raw-loader!./examples/app-template.md`);
readonly appModuleOptional = import(`!!raw-loader!./examples/app-module-optional.md`);
readonly assets = import(`!!raw-loader!./examples/assets.md`);
readonly componentsStyles = import(`!!raw-loader!./examples/components-styles.md`);
readonly importLocalLess = import(`!!raw-loader!./examples/import-local-less.md`);
readonly main = import(`!!raw-loader!./examples/main.md`);
readonly addons = import(`!!raw-loader!./examples/addons.md`);
readonly angularJsonStyles = import('./examples/angular-json-styles.md?raw');
readonly appModule = import('./examples/app-module.md?raw');
readonly appTemplate = import('./examples/app-template.md?raw');
readonly appModuleOptional = import('./examples/app-module-optional.md?raw');
readonly assets = import('./examples/assets.md?raw');
readonly componentsStyles = import('./examples/components-styles.md?raw');
readonly importLocalLess = import('./examples/import-local-less.md?raw');
readonly main = import('./examples/main.md?raw');
readonly addons = import('./examples/addons.md?raw');
}
Loading

0 comments on commit 23c0cc5

Please sign in to comment.