diff --git a/packages/docs/src/app/shared/stackblitz/stackblitz-writer.ts b/packages/docs/src/app/shared/stackblitz/stackblitz-writer.ts index 5f5e8b444..541e05fde 100644 --- a/packages/docs/src/app/shared/stackblitz/stackblitz-writer.ts +++ b/packages/docs/src/app/shared/stackblitz/stackblitz-writer.ts @@ -21,10 +21,15 @@ const DOCS_CONTENT_PATH = 'docs-content/examples-source/'; const TEMPLATE_PATH = 'assets/stackblitz/'; const TEMPLATE_FILES = [ + '.editorconfig', + '.gitignore', 'index.html', + 'tsconfig.json', + 'tsconfig.app.json', + 'tsconfig.spec.json', 'styles.css', 'polyfills.ts', - '.angular-cli.json', + 'angular.json', 'main.ts', 'mosaic-module.ts' ]; @@ -50,6 +55,7 @@ const dependencies = { rxjs: '^6.4.0', 'web-animations-js': '^2.3.1', messageformat: '^2.0.5', + 'tslib': '^1.10.0', 'zone.js': '^0.8.14', moment: '^2.24.0' }; diff --git a/packages/docs/src/assets/stackblitz/.angular-cli.json b/packages/docs/src/assets/stackblitz/.angular-cli.json deleted file mode 100644 index 60fce6cd7..000000000 --- a/packages/docs/src/assets/stackblitz/.angular-cli.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "apps": [{ - "styles": [ - "styles.css" - ] - }] -} diff --git a/packages/docs/src/assets/stackblitz/.editorconfig b/packages/docs/src/assets/stackblitz/.editorconfig new file mode 100644 index 000000000..90a33c0ed --- /dev/null +++ b/packages/docs/src/assets/stackblitz/.editorconfig @@ -0,0 +1,15 @@ + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +# Unix-style newlines with a newline ending every file +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/packages/docs/src/assets/stackblitz/.gitignore b/packages/docs/src/assets/stackblitz/.gitignore new file mode 100644 index 000000000..8a280da5e --- /dev/null +++ b/packages/docs/src/assets/stackblitz/.gitignore @@ -0,0 +1,31 @@ +# firebase artifacts +.firebase + +package-lock.json + +.env + +# folders +node_modules/ +coverage/ +dist/ +tmp/ +temp/ + +# Example module file will be auto-generated. +/packages/mosaic-examples/example-module.ts + +# IDEs +/.idea +/.vscode +/.awcache + +# misc +.DS_Store +Thumbs.db +npm-debug.log +*~ +*.sw[mnpcod] +*.log +*.tmp +*.tmp.* diff --git a/packages/docs/src/assets/stackblitz/angular.json b/packages/docs/src/assets/stackblitz/angular.json new file mode 100644 index 000000000..642e3f6cd --- /dev/null +++ b/packages/docs/src/assets/stackblitz/angular.json @@ -0,0 +1,64 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "mosaic-docs": { + "root": "", + "sourceRoot": "", + "projectType": "application", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "aot": true, + "outputPath": "dist", + "index": "index.html", + "main": "main.ts", + "polyfills": "polyfills.ts", + "tsConfig": "tsconfig.app.json", + "assets": [], + "styles": [ + "styles.css" + ], + "scripts": [] + }, + "configurations": { + "production": { + "fileReplacements": [], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "budgets": [ + { + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "5mb" + } + ] + } + } + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "mosaic-docs:build" + }, + "configurations": { + "production": { + "browserTarget": "mosaic-docs:build:production" + } + } + } + } + } + }, + "defaultProject": "mosaic-docs" +} diff --git a/packages/docs/src/assets/stackblitz/index.html b/packages/docs/src/assets/stackblitz/index.html index 0f260a982..8188f35d6 100644 --- a/packages/docs/src/assets/stackblitz/index.html +++ b/packages/docs/src/assets/stackblitz/index.html @@ -1,3 +1,5 @@ +