@skyux/docs-tools 8.0.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -303,13 +303,16 @@ class SkyDocsCodeExamplesEditorService {
|
|
|
303
303
|
StackBlitzSDK.openProject(project, options);
|
|
304
304
|
}
|
|
305
305
|
getPayload(codeExample) {
|
|
306
|
-
const angularVersion = '^
|
|
307
|
-
const skyuxVersion = '^
|
|
306
|
+
const angularVersion = '^15.0.0';
|
|
307
|
+
const skyuxVersion = '^8.0.0';
|
|
308
308
|
const defaultDependencies = {
|
|
309
|
+
'@angular-devkit/build-angular': angularVersion,
|
|
309
310
|
'@angular/animations': angularVersion,
|
|
310
311
|
'@angular/cdk': angularVersion,
|
|
312
|
+
'@angular/cli': angularVersion,
|
|
311
313
|
'@angular/common': angularVersion,
|
|
312
314
|
'@angular/compiler': angularVersion,
|
|
315
|
+
'@angular/compiler-cli': angularVersion,
|
|
313
316
|
'@angular/core': angularVersion,
|
|
314
317
|
'@angular/forms': angularVersion,
|
|
315
318
|
'@angular/platform-browser': angularVersion,
|
|
@@ -326,6 +329,7 @@ class SkyDocsCodeExamplesEditorService {
|
|
|
326
329
|
'@skyux/indicators': skyuxVersion,
|
|
327
330
|
'@skyux/layout': skyuxVersion,
|
|
328
331
|
'@skyux/modals': skyuxVersion,
|
|
332
|
+
'@skyux/packages': skyuxVersion,
|
|
329
333
|
'@skyux/popovers': skyuxVersion,
|
|
330
334
|
'@skyux/router': skyuxVersion,
|
|
331
335
|
'@skyux/theme': skyuxVersion,
|
|
@@ -334,7 +338,8 @@ class SkyDocsCodeExamplesEditorService {
|
|
|
334
338
|
'ng2-dragula': '2.1.1',
|
|
335
339
|
rxjs: '^7',
|
|
336
340
|
tslib: '^2.3.0',
|
|
337
|
-
|
|
341
|
+
typescript: '~4.9.4',
|
|
342
|
+
'zone.js': '~0.12.0',
|
|
338
343
|
};
|
|
339
344
|
const mergedDependencies = Object.assign({}, defaultDependencies, codeExample.packageDependencies);
|
|
340
345
|
// Ensure any @skyux dependencies list the correct version of SKY UX.
|
|
@@ -354,7 +359,7 @@ class SkyDocsCodeExamplesEditorService {
|
|
|
354
359
|
files,
|
|
355
360
|
title: 'SKY UX Demo',
|
|
356
361
|
description: 'SKY UX Demo',
|
|
357
|
-
template: '
|
|
362
|
+
template: 'node',
|
|
358
363
|
dependencies: mergedDependencies,
|
|
359
364
|
settings: {
|
|
360
365
|
compile: {
|
|
@@ -464,87 +469,146 @@ export class AppComponent {
|
|
|
464
469
|
})
|
|
465
470
|
export class AppModule { }
|
|
466
471
|
`;
|
|
467
|
-
files[`${srcPath}index.html`] =
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
<
|
|
473
|
-
<
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
472
|
+
files[`${srcPath}index.html`] = `<!doctype html>
|
|
473
|
+
<html lang="en">
|
|
474
|
+
<head>
|
|
475
|
+
<meta charset="utf-8">
|
|
476
|
+
<title>Sky UX Demo</title>
|
|
477
|
+
<base href="/">
|
|
478
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
479
|
+
<!--
|
|
480
|
+
The CSS links are needed for the StackBlitz demo only.
|
|
481
|
+
This is a workaround for a known bug that prevents external imports in CSS.
|
|
482
|
+
https://github.com/stackblitz/core/issues/133
|
|
483
|
+
-->
|
|
484
|
+
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
|
|
485
|
+
<link rel="stylesheet" type="text/css" href="https://sky.blackbaudcdn.net/static/skyux-icons/6.0.0/assets/css/skyux-icons.min.css" />
|
|
486
|
+
</head>
|
|
487
|
+
<body>
|
|
488
|
+
<sky-demo-app>
|
|
489
|
+
Loading...
|
|
490
|
+
</sky-demo-app>
|
|
491
|
+
</body>
|
|
492
|
+
</html>
|
|
493
|
+
`;
|
|
478
494
|
files[`${srcPath}main.ts`] = `${banner}
|
|
479
|
-
import '
|
|
480
|
-
|
|
481
|
-
import {
|
|
482
|
-
platformBrowserDynamic
|
|
483
|
-
} from '@angular/platform-browser-dynamic';
|
|
495
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
484
496
|
|
|
485
|
-
import {
|
|
486
|
-
AppModule
|
|
487
|
-
} from './app/app.module';
|
|
497
|
+
import { AppModule } from './app/app.module';
|
|
488
498
|
|
|
489
|
-
platformBrowserDynamic()
|
|
490
|
-
.
|
|
491
|
-
.catch((err) => console.error(err));
|
|
492
|
-
|
|
493
|
-
`;
|
|
494
|
-
files[`${srcPath}polyfills.ts`] = `${banner}
|
|
495
|
-
import 'zone.js';
|
|
499
|
+
platformBrowserDynamic().bootstrapModule(AppModule)
|
|
500
|
+
.catch(err => console.error(err));
|
|
496
501
|
`;
|
|
497
|
-
files[`${srcPath}styles.scss`] = `@import '
|
|
498
|
-
@import '
|
|
502
|
+
files[`${srcPath}styles.scss`] = `@import '@skyux/theme/css/sky';
|
|
503
|
+
@import '@skyux/theme/css/themes/modern/styles';
|
|
499
504
|
|
|
500
505
|
body {
|
|
501
506
|
background-color: #fff;
|
|
502
507
|
margin: 15px;
|
|
503
508
|
}`;
|
|
504
509
|
stylesheets.push('src/styles.scss');
|
|
505
|
-
files['angular.json'] =
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
510
|
+
files['angular.json'] = JSON.stringify({
|
|
511
|
+
$schema: './node_modules/@angular/cli/lib/config/schema.json',
|
|
512
|
+
version: 1,
|
|
513
|
+
projects: {
|
|
514
|
+
demo: {
|
|
515
|
+
projectType: 'application',
|
|
516
|
+
root: '',
|
|
517
|
+
sourceRoot: 'src',
|
|
518
|
+
prefix: 'app',
|
|
519
|
+
architect: {
|
|
520
|
+
build: {
|
|
521
|
+
builder: '@angular-devkit/build-angular:browser',
|
|
522
|
+
options: {
|
|
523
|
+
outputPath: 'dist/demo',
|
|
524
|
+
index: 'src/index.html',
|
|
525
|
+
main: 'src/main.ts',
|
|
526
|
+
polyfills: ['zone.js', '@skyux/packages/polyfills'],
|
|
527
|
+
tsConfig: 'tsconfig.app.json',
|
|
528
|
+
inlineStyleLanguage: 'scss',
|
|
529
|
+
assets: [],
|
|
530
|
+
styles: stylesheets,
|
|
531
|
+
scripts: [],
|
|
532
|
+
},
|
|
533
|
+
configurations: {
|
|
534
|
+
development: {
|
|
535
|
+
buildOptimizer: false,
|
|
536
|
+
optimization: false,
|
|
537
|
+
vendorChunk: true,
|
|
538
|
+
extractLicenses: false,
|
|
539
|
+
sourceMap: true,
|
|
540
|
+
namedChunks: true,
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
defaultConfiguration: 'development',
|
|
544
|
+
},
|
|
545
|
+
serve: {
|
|
546
|
+
builder: '@angular-devkit/build-angular:dev-server',
|
|
547
|
+
configurations: {
|
|
548
|
+
development: {
|
|
549
|
+
browserTarget: 'demo:build:development',
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
defaultConfiguration: 'development',
|
|
553
|
+
},
|
|
554
|
+
'extract-i18n': {
|
|
555
|
+
builder: '@angular-devkit/build-angular:extract-i18n',
|
|
556
|
+
options: {
|
|
557
|
+
browserTarget: 'demo:build',
|
|
558
|
+
},
|
|
559
|
+
},
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
}, undefined, 2);
|
|
519
564
|
files['package.json'] = JSON.stringify({
|
|
565
|
+
name: 'skyux-spa-demo',
|
|
520
566
|
dependencies,
|
|
567
|
+
scripts: {
|
|
568
|
+
start: 'ng serve',
|
|
569
|
+
build: 'ng build',
|
|
570
|
+
},
|
|
571
|
+
}, undefined, 2);
|
|
572
|
+
files['tsconfig.app.json'] = JSON.stringify({
|
|
573
|
+
extends: './tsconfig.json',
|
|
574
|
+
compilerOptions: {
|
|
575
|
+
outDir: './out-tsc/app',
|
|
576
|
+
types: [],
|
|
577
|
+
},
|
|
578
|
+
files: ['src/main.ts'],
|
|
579
|
+
include: ['src/**/*.d.ts'],
|
|
580
|
+
}, undefined, 2);
|
|
581
|
+
files['tsconfig.json'] = JSON.stringify({
|
|
582
|
+
compileOnSave: false,
|
|
583
|
+
compilerOptions: {
|
|
584
|
+
baseUrl: './',
|
|
585
|
+
outDir: './dist/out-tsc',
|
|
586
|
+
forceConsistentCasingInFileNames: true,
|
|
587
|
+
strict: true,
|
|
588
|
+
noImplicitOverride: true,
|
|
589
|
+
noPropertyAccessFromIndexSignature: true,
|
|
590
|
+
noImplicitReturns: true,
|
|
591
|
+
noFallthroughCasesInSwitch: true,
|
|
592
|
+
sourceMap: true,
|
|
593
|
+
declaration: false,
|
|
594
|
+
downlevelIteration: true,
|
|
595
|
+
experimentalDecorators: true,
|
|
596
|
+
moduleResolution: 'node',
|
|
597
|
+
importHelpers: true,
|
|
598
|
+
typeRoots: ['node_modules/@types'],
|
|
599
|
+
target: 'ES2022',
|
|
600
|
+
module: 'ES2022',
|
|
601
|
+
useDefineForClassFields: false,
|
|
602
|
+
lib: ['ES2022', 'dom'],
|
|
603
|
+
},
|
|
604
|
+
angularCompilerOptions: {
|
|
605
|
+
fullTemplateTypeCheck: true,
|
|
606
|
+
enableI18nLegacyMessageIdFormat: false,
|
|
607
|
+
strictInjectionParameters: true,
|
|
608
|
+
strictInputAccessModifiers: true,
|
|
609
|
+
strictTemplates: true,
|
|
610
|
+
},
|
|
521
611
|
}, undefined, 2);
|
|
522
|
-
files['tsconfig.json'] = `{
|
|
523
|
-
"compilerOptions": {
|
|
524
|
-
"strict": true,
|
|
525
|
-
"forceConsistentCasingInFileNames": true,
|
|
526
|
-
"noImplicitReturns": true,
|
|
527
|
-
"noFallthroughCasesInSwitch": true,
|
|
528
|
-
"target": "es2017",
|
|
529
|
-
"module": "es2020",
|
|
530
|
-
"moduleResolution": "node",
|
|
531
|
-
"emitDecoratorMetadata": true,
|
|
532
|
-
"experimentalDecorators": true,
|
|
533
|
-
"importHelpers": true,
|
|
534
|
-
"typeRoots": ["node_modules/@types"],
|
|
535
|
-
"lib": [
|
|
536
|
-
"es2020",
|
|
537
|
-
"dom"
|
|
538
|
-
]
|
|
539
|
-
},
|
|
540
|
-
"angularCompilerOptions": {
|
|
541
|
-
"fullTemplateTypeCheck": true,
|
|
542
|
-
"strictInjectionParameters": true,
|
|
543
|
-
"strictInputAccessModifiers": true,
|
|
544
|
-
"strictTemplates": true,
|
|
545
|
-
"enableIvy": true
|
|
546
|
-
}
|
|
547
|
-
}`;
|
|
548
612
|
return files;
|
|
549
613
|
}
|
|
550
614
|
getModuleName(contents) {
|