From 150b2ece1d731eb20f6af3c22765a7c0dc0b146d Mon Sep 17 00:00:00 2001 From: iRealNirmal Date: Sat, 8 May 2021 14:21:21 +0530 Subject: [PATCH] build(docs-infra): fixed i18n broken stackblitz example (#42001) This commit fixes the broken stackblitz example of i18n. Closes #41838. PR Close #42001 --- aio/content/examples/i18n/stackblitz.json | 3 ++- aio/content/examples/testing/specs.stackblitz.json | 3 ++- aio/content/examples/testing/stackblitz.json | 3 ++- aio/tools/stackblitz-builder/builder.js | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/aio/content/examples/i18n/stackblitz.json b/aio/content/examples/i18n/stackblitz.json index 8326f3902b8b2..d00974aa1d855 100644 --- a/aio/content/examples/i18n/stackblitz.json +++ b/aio/content/examples/i18n/stackblitz.json @@ -8,5 +8,6 @@ "**/*.xlf" ], "file": "src/app/app.component.ts", - "tags": ["Angular", "i18n", "internationalization"] + "tags": ["Angular", "i18n", "internationalization"], + "devDependencies": ["@angular/compiler-cli", "typescript"] } diff --git a/aio/content/examples/testing/specs.stackblitz.json b/aio/content/examples/testing/specs.stackblitz.json index adba3c62bf962..33ccc830478d2 100644 --- a/aio/content/examples/testing/specs.stackblitz.json +++ b/aio/content/examples/testing/specs.stackblitz.json @@ -19,5 +19,6 @@ "src/**/*.spec.ts" ], "main": "src/index-specs.html", - "tags": ["testing"] + "tags": ["testing"], + "devDependencies": ["jasmine-core", "jasmine-marbles"] } diff --git a/aio/content/examples/testing/stackblitz.json b/aio/content/examples/testing/stackblitz.json index 5575ff8511050..3264b6dd99495 100644 --- a/aio/content/examples/testing/stackblitz.json +++ b/aio/content/examples/testing/stackblitz.json @@ -14,5 +14,6 @@ "!src/**/*.spec.ts" ], - "tags": ["testing"] + "tags": ["testing"], + "devDependencies": ["jasmine-core", "jasmine-marbles"] } diff --git a/aio/tools/stackblitz-builder/builder.js b/aio/tools/stackblitz-builder/builder.js index d24a559ce87f0..78d937807fe06 100644 --- a/aio/tools/stackblitz-builder/builder.js +++ b/aio/tools/stackblitz-builder/builder.js @@ -48,7 +48,7 @@ class StackblitzBuilder { // Add unit test packages from devDependencies for unit test examples const devDependencies = packageJson.devDependencies; - ['jasmine-core', 'jasmine-marbles'].forEach(dep => exampleDependencies[dep] = devDependencies[dep]); + (config.devDependencies || []).forEach(dep => exampleDependencies[dep] = devDependencies[dep]); postData.dependencies = JSON.stringify(exampleDependencies); }