Skip to content

Commit 0e675d4

Browse files
committedAug 29, 2024
fix: switch Stackblitz back to npm
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.
1 parent c13e559 commit 0e675d4

File tree

5 files changed

+13950
-7271
lines changed

5 files changed

+13950
-7271
lines changed
 

‎material.angular.io/src/app/shared/stack-blitz/stack-blitz-writer.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const TEMPLATE_FILES = [
3636
'angular.json',
3737
'karma.conf.js',
3838
'package.json',
39-
'yarn.lock',
39+
'package-lock.json',
4040
'tsconfig.app.json',
4141
'tsconfig.json',
4242
'tsconfig.spec.json',
@@ -202,7 +202,8 @@ export class StackBlitzWriter {
202202
.replace(/material-docs-example/g, data.selectorName)
203203
.replace(/\${title}/g, data.description);
204204
} else if (fileName === '.stackblitzrc') {
205-
fileContent = fileContent.replace(/\${startCommand}/, isTest ? 'yarn test' : 'yarn start');
205+
fileContent = fileContent.replace(/\${startCommand}/,
206+
isTest ? 'npm run test' : 'npm run start');
206207
} else if (fileName === 'src/main.ts') {
207208
const mainComponentName = data.componentNames[0];
208209

0 commit comments

Comments
 (0)
Please sign in to comment.