@uppy/examples: fix workspace dependencies for StackBlitz environment (#5910)

- Add .stackblitzrc configuration file for StackBlitz environment setup
for
- Add prepare-stackblitz.js script to replace `workspace:*` dependencies
with "latest"
- Configure StackBlitz to run preparation script before installing
dependencies
- Change CSS import paths in examples from `@uppy/react/css/style.css`
to `@uppy/react/dist/styles.css` temporarily (will need to revert after
we release 5.0)
This commit is contained in:
Prakash 2025-08-22 00:09:32 +05:30 committed by GitHub
parent e9d432bdfb
commit f80dbb1561
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,7 @@
{
"installDependencies": false,
"startCommand": "node -e \"const fs=require('fs'); const p='package.json'; const j=JSON.parse(fs.readFileSync(p,'utf8')); ['dependencies','devDependencies','peerDependencies'].forEach(k=>{ if(j[k]) for(const n in j[k]) if(typeof j[k][n]==='string' && j[k][n].startsWith('workspace:')) j[k][n]='latest'; }); fs.writeFileSync(p, JSON.stringify(j,null,2));\" && npm install @uppy/drag-drop @uppy/file-input @uppy/progress-bar && npm install && npm run dev",
"env": {
"NODE_ENV": "development"
}
}

View file

@ -0,0 +1,7 @@
{
"installDependencies": false,
"startCommand": "node -e \"const fs=require('fs'); const p='package.json'; const j=JSON.parse(fs.readFileSync(p,'utf8')); ['dependencies','devDependencies','peerDependencies'].forEach(k=>{ if(j[k]) for(const n in j[k]) if(typeof j[k][n]==='string' && j[k][n].startsWith('workspace:')) j[k][n]='latest'; }); fs.writeFileSync(p, JSON.stringify(j,null,2));\" && npm install @uppy/drag-drop @uppy/file-input @uppy/progress-bar && npm install && npm run dev",
"env": {
"NODE_ENV": "development"
}
}

View file

@ -0,0 +1,7 @@
{
"installDependencies": false,
"startCommand": "node -e \"const fs=require('fs'); const p='package.json'; const j=JSON.parse(fs.readFileSync(p,'utf8')); ['dependencies','devDependencies','peerDependencies'].forEach(k=>{ if(j[k]) for(const n in j[k]) if(typeof j[k][n]==='string' && j[k][n].startsWith('workspace:')) j[k][n]='latest'; }); fs.writeFileSync(p, JSON.stringify(j,null,2));\" && npm install @uppy/drag-drop @uppy/file-input @uppy/progress-bar && npm install && npm run dev",
"env": {
"NODE_ENV": "development"
}
}