Skip to content

Commit

Permalink
[core] Improve the playground DX (mui#6514)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Oct 19, 2022
1 parent e195e5a commit 4488896
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/.git
/docs/.next
/docs/export
/docs/pages/playground/
/lerna.json
/packages/grid/x-data-grid/src/lib
build
CHANGELOG.md
dist
node_modules
build
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ __diff_output__
/.nyc_output
/coverage
/docs/.next
/docs/pages/playground*
/docs/pages/playground/
/docs/export
/test/regressions/screenshots
build
Expand Down
4 changes: 3 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
"build": "cross-env NODE_ENV=production next build --profile",
"build:clean": "rimraf .next && yarn build",
"build-sw": "node ./scripts/buildServiceWorker.js",
"dev": "rimraf ./node_modules/.cache/babel-loader && next dev --port 3001",
"dev": "next dev --port 3001",
"deploy": "git push upstream master:docs-v5",
"export": "rimraf docs/export && next export --threads=3 -o export && yarn build-sw",
"icons": "rimraf public/static/icons/* && node ./scripts/buildIcons.js",
"start": "next start",
"create-playground": "cpy --cwd=./scripts/ playground.template.tsx ../pages/playground --rename=index.tsx",
"typescript": "tsc -p tsconfig.json",
"typescript:transpile": "cross-env BABEL_ENV=development babel-node --extensions \".tsx,.ts,.js\" scripts/formattedTSDemos",
"typescript:transpile:dev": "cross-env BABEL_ENV=development babel-node --extensions \".tsx,.ts,.js\" scripts/formattedTSDemos --watch"
Expand Down
Empty file added docs/pages/playground/.gitkeep
Empty file.
17 changes: 0 additions & 17 deletions docs/pages/playground/example.tsx

This file was deleted.

7 changes: 7 additions & 0 deletions docs/scripts/playground.template.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as React from 'react';

export default function Playground() {
return (
<div>A playground for a fast iteration development cycle in isolation outside of git.</div>
);
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"version": "6.0.0-alpha.3",
"private": true,
"scripts": {
"start": "yarn docs:dev",
"start": "yarn && yarn docs:dev",
"benchmark:browser": "yarn workspace benchmark browser",
"docs:dev": "yarn workspace docs dev",
"docs:start": "yarn workspace docs start",
"docs:create-playground": "yarn workspace docs create-playground",
"docs:api": "yarn docs:api:build",
"docs:api:build": "cross-env BABEL_ENV=development babel-node -i \"/node_modules/(?!@mui)/\" -x .ts,.tsx,.js ./docs/scripts/api/buildApi.ts",
"docs:build": "yarn workspace docs build",
Expand Down

0 comments on commit 4488896

Please sign in to comment.