Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
fix: switch Stackblitz back to npm
Browse files Browse the repository at this point in the history
Lately the dependency installs when forking to Stackblitz have been really slow. It seems like switching back to npm speeds them up significantly (from ~5min to ~30s).

Also updates the Angular version which has a much smaller bundle size. Note that just doing this didn't help much for yarn which was getting stuck for a long time after the packages are installed.
  • Loading branch information
crisbeto committed Aug 29, 2024
1 parent ede6fb7 commit 249f472
Show file tree
Hide file tree
Showing 5 changed files with 13,950 additions and 7,271 deletions.
5 changes: 3 additions & 2 deletions src/app/shared/stack-blitz/stack-blitz-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const TEMPLATE_FILES = [
'angular.json',
'karma.conf.js',
'package.json',
'yarn.lock',
'package-lock.json',
'tsconfig.app.json',
'tsconfig.json',
'tsconfig.spec.json',
Expand Down Expand Up @@ -202,7 +202,8 @@ export class StackBlitzWriter {
.replace(/material-docs-example/g, data.selectorName)
.replace(/\${title}/g, data.description);
} else if (fileName === '.stackblitzrc') {
fileContent = fileContent.replace(/\${startCommand}/, isTest ? 'yarn test' : 'yarn start');
fileContent = fileContent.replace(/\${startCommand}/,
isTest ? 'npm run test' : 'npm run start');
} else if (fileName === 'src/main.ts') {
const mainComponentName = data.componentNames[0];

Expand Down
Loading

0 comments on commit 249f472

Please sign in to comment.