Skip to content

Commit

Permalink
doc(example): review
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricduffournet committed Feb 20, 2022
1 parent 9e5383c commit ae86582
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@
<app-root></app-root>
</body>
</html>

<!--
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at https://github.com/ngrx/platform
-->

25 changes: 0 additions & 25 deletions projects/ngrx.io/tools/stackblitz-builder/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ class StackblitzBuilder {
}

build() {
this._checkForOutdatedConfig();

// When testing it sometimes helps to look a just one example directory like so:
// const stackblitzPaths = path.join(this.basePath, '**/testing/*stackblitz.json');
const stackblitzPaths = path.join(this.basePath, '**/*stackblitz.json');
const fileNames = globby.sync(stackblitzPaths, {
ignore: ['**/node_modules/**'],
});
fileNames.forEach((configFileName) => {
try {
// console.log('***' + configFileName);
this._buildStackblitzFrom(configFileName);
} catch (e) {
console.log(e);
Expand Down Expand Up @@ -93,26 +89,6 @@ class StackblitzBuilder {
}
}

_checkForOutdatedConfig() {
// Ensure that nobody is trying to use the old config filenames (i.e. `plnkr.json`).
const plunkerPaths = path.join(this.basePath, '**/*plnkr.json');
const fileNames = globby.sync(plunkerPaths, {
ignore: ['**/node_modules/**'],
});

if (fileNames.length) {
const readmePath = path.join(__dirname, 'README.md');
const errorMessage =
"One or more examples are still trying to use 'plnkr.json' files for configuring " +
"live examples. This is not supported any more. 'stackblitz.json' should be used " +
'instead.\n' +
`(Slight modifications may be required. See '${readmePath}' for more info.\n\n` +
fileNames.map((name) => `- ${name}`).join('\n');

throw Error(errorMessage);
}
}

_getPrimaryFile(config) {
if (config.file) {
if (!this._existsSync(path.join(config.basePath, config.file))) {
Expand Down Expand Up @@ -204,7 +180,6 @@ class StackblitzBuilder {
} else if (extn == '.html') {
content = content + this.copyrights.html;
}
// const escapedValue = escapeHtml(content);

let relativeFileName = path.relative(config.basePath, fileName);

Expand Down

0 comments on commit ae86582

Please sign in to comment.