@skyux/docs-tools 9.0.0-alpha.2 → 9.0.0-alpha.4
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.
|
@@ -302,13 +302,16 @@ class SkyDocsCodeExamplesEditorService {
|
|
|
302
302
|
StackBlitzSDK.openProject(project, options);
|
|
303
303
|
}
|
|
304
304
|
getPayload(codeExample) {
|
|
305
|
-
const angularVersion = '^
|
|
306
|
-
const skyuxVersion = '^
|
|
305
|
+
const angularVersion = '^16.0.0';
|
|
306
|
+
const skyuxVersion = '^9.0.0-alpha.0';
|
|
307
307
|
const defaultDependencies = {
|
|
308
|
+
'@angular-devkit/build-angular': angularVersion,
|
|
308
309
|
'@angular/animations': angularVersion,
|
|
309
310
|
'@angular/cdk': angularVersion,
|
|
311
|
+
'@angular/cli': angularVersion,
|
|
310
312
|
'@angular/common': angularVersion,
|
|
311
313
|
'@angular/compiler': angularVersion,
|
|
314
|
+
'@angular/compiler-cli': angularVersion,
|
|
312
315
|
'@angular/core': angularVersion,
|
|
313
316
|
'@angular/forms': angularVersion,
|
|
314
317
|
'@angular/platform-browser': angularVersion,
|
|
@@ -329,12 +332,11 @@ class SkyDocsCodeExamplesEditorService {
|
|
|
329
332
|
'@skyux/popovers': skyuxVersion,
|
|
330
333
|
'@skyux/router': skyuxVersion,
|
|
331
334
|
'@skyux/theme': skyuxVersion,
|
|
332
|
-
'@types/jasmine': '~4.
|
|
333
|
-
// We must define Dragula deliberately so that StackBlitz runs NGCC against it.
|
|
334
|
-
'ng2-dragula': '2.1.1',
|
|
335
|
+
'@types/jasmine': '~4.3.1',
|
|
335
336
|
rxjs: '^7',
|
|
336
|
-
tslib: '^2.
|
|
337
|
-
|
|
337
|
+
tslib: '^2.5.0',
|
|
338
|
+
typescript: '~5.1.6',
|
|
339
|
+
'zone.js': '~0.13.1',
|
|
338
340
|
};
|
|
339
341
|
const mergedDependencies = Object.assign({}, defaultDependencies, codeExample.packageDependencies);
|
|
340
342
|
// Ensure any @skyux dependencies list the correct version of SKY UX.
|
|
@@ -512,23 +514,65 @@ body {
|
|
|
512
514
|
}`;
|
|
513
515
|
stylesheets.push('src/styles.scss');
|
|
514
516
|
files['angular.json'] = JSON.stringify({
|
|
517
|
+
$schema: './node_modules/@angular/cli/lib/config/schema.json',
|
|
518
|
+
version: 1,
|
|
515
519
|
projects: {
|
|
516
520
|
demo: {
|
|
521
|
+
projectType: 'application',
|
|
522
|
+
root: '',
|
|
523
|
+
sourceRoot: 'src',
|
|
524
|
+
prefix: 'app',
|
|
517
525
|
architect: {
|
|
518
526
|
build: {
|
|
527
|
+
builder: '@angular-devkit/build-angular:browser',
|
|
519
528
|
options: {
|
|
520
529
|
index: 'src/index.html',
|
|
521
530
|
main: 'src/main.ts',
|
|
531
|
+
tsConfig: 'tsconfig.app.json',
|
|
522
532
|
inlineStyleLanguage: 'scss',
|
|
523
533
|
styles: stylesheets,
|
|
524
534
|
},
|
|
535
|
+
configurations: {
|
|
536
|
+
development: {
|
|
537
|
+
buildOptimizer: false,
|
|
538
|
+
optimization: false,
|
|
539
|
+
vendorChunk: true,
|
|
540
|
+
extractLicenses: false,
|
|
541
|
+
sourceMap: true,
|
|
542
|
+
namedChunks: true,
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
defaultConfiguration: 'development',
|
|
546
|
+
},
|
|
547
|
+
serve: {
|
|
548
|
+
builder: '@angular-devkit/build-angular:dev-server',
|
|
549
|
+
configurations: {
|
|
550
|
+
development: {
|
|
551
|
+
browserTarget: 'demo:build:development',
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
defaultConfiguration: 'development',
|
|
525
555
|
},
|
|
526
556
|
},
|
|
527
557
|
},
|
|
528
558
|
},
|
|
529
559
|
}, undefined, 2);
|
|
530
560
|
files['package.json'] = JSON.stringify({
|
|
561
|
+
name: 'skyux-spa-demo',
|
|
531
562
|
dependencies,
|
|
563
|
+
scripts: {
|
|
564
|
+
start: 'ng serve',
|
|
565
|
+
build: 'ng build',
|
|
566
|
+
},
|
|
567
|
+
}, undefined, 2);
|
|
568
|
+
files['tsconfig.app.json'] = JSON.stringify({
|
|
569
|
+
extends: './tsconfig.json',
|
|
570
|
+
compilerOptions: {
|
|
571
|
+
outDir: './out-tsc/app',
|
|
572
|
+
types: [],
|
|
573
|
+
},
|
|
574
|
+
files: ['src/main.ts'],
|
|
575
|
+
include: ['src/**/*.d.ts'],
|
|
532
576
|
}, undefined, 2);
|
|
533
577
|
files['tsconfig.json'] = JSON.stringify({
|
|
534
578
|
compilerOptions: {
|
|
@@ -2664,6 +2708,17 @@ class SkyDocsTypeDocAdapterService {
|
|
|
2664
2708
|
.map((item) => item.text)
|
|
2665
2709
|
.join('')
|
|
2666
2710
|
.trim();
|
|
2711
|
+
if (tag.content[0].kind === 'code') {
|
|
2712
|
+
defaultValue = defaultValue.split('```')[1].trim();
|
|
2713
|
+
const defaultLanguage = defaultValue.split('\n')[0];
|
|
2714
|
+
if (defaultLanguage === 'markup' ||
|
|
2715
|
+
defaultLanguage === 'typescript' ||
|
|
2716
|
+
defaultLanguage === 'ts') {
|
|
2717
|
+
defaultValue = defaultValue
|
|
2718
|
+
.slice(defaultLanguage.length)
|
|
2719
|
+
.trim();
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2667
2722
|
break;
|
|
2668
2723
|
case '@example':
|
|
2669
2724
|
codeExample = tag.content
|
|
@@ -2672,10 +2727,12 @@ class SkyDocsTypeDocAdapterService {
|
|
|
2672
2727
|
.trim()
|
|
2673
2728
|
.split('```')[1]
|
|
2674
2729
|
.trim();
|
|
2675
|
-
const
|
|
2676
|
-
if (
|
|
2677
|
-
|
|
2678
|
-
|
|
2730
|
+
const exampleLanguage = codeExample.split('\n')[0];
|
|
2731
|
+
if (exampleLanguage === 'markup' ||
|
|
2732
|
+
exampleLanguage === 'typescript' ||
|
|
2733
|
+
exampleLanguage === 'ts') {
|
|
2734
|
+
codeExample = codeExample.slice(exampleLanguage.length).trim();
|
|
2735
|
+
codeExampleLanguage = exampleLanguage;
|
|
2679
2736
|
}
|
|
2680
2737
|
break;
|
|
2681
2738
|
case '@param':
|