Skip to content

Commit

Permalink
Move some examples to a staging area (keystonejs#5808)
Browse files Browse the repository at this point in the history
* Move some examples to a staging area

* Fix import

* Fix tests
  • Loading branch information
timleslie authored May 27, 2021
1 parent 7bda87e commit 9b22ae9
Show file tree
Hide file tree
Showing 89 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/components/DocumentEditorDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from '@keystone-next/fields-document/component-blocks';
import { Global, jsx } from '@keystone-ui/core';

import { componentBlocks as componentBlocksInExampleProject } from '../../examples/basic/admin/fieldViews/Content';
import { componentBlocks as componentBlocksInExampleProject } from '../../examples-staging/basic/admin/fieldViews/Content';
import { initialContent } from '../lib/initialDocumentDemoContent';
import { Code } from './Code';

Expand Down
9 changes: 9 additions & 0 deletions examples-staging/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Examples - Staging Area

Hello, you have found the staging area for our examples. 👋

This is where we keep example projects which are still work-in-progress.
Feel free to take a look around, there might be something useful for you in here.
We careful though, these projects might not be working right now, or they might not demonstrate best practices.

If you want to see completed, tested, and documented examples, head on over to our curated [examples](../examples) directory.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"engines": {
"node": "^12.20 || >= 14.13"
},
"repository": "https://github.com/keystonejs/keystone/tree/master/examples/auth"
"repository": "https://github.com/keystonejs/keystone/tree/master/examples-staging/auth"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
"engines": {
"node": "^12.20 || >= 14.13"
},
"repository": "https://github.com/keystonejs/keystone/tree/master/examples/basic"
"repository": "https://github.com/keystonejs/keystone/tree/master/examples-staging/basic"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
"engines": {
"node": "^12.20 || >= 14.13"
},
"repository": "https://github.com/keystonejs/keystone/tree/master/examples/ecommerce"
"repository": "https://github.com/keystonejs/keystone/tree/master/examples-staging/ecommerce"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"engines": {
"node": "^12.20 || >= 14.13"
},
"repository": "https://github.com/keystonejs/keystone/tree/master/examples/embedded-nextjs"
"repository": "https://github.com/keystonejs/keystone/tree/master/examples-staging/embedded-nextjs"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"@keystone-next/keystone": "^18.0.0",
"apollo-server-micro": "^2.24.1"
},
"repository": "https://github.com/keystonejs/keystone/tree/master/examples/graphql-api-endpoint"
"repository": "https://github.com/keystonejs/keystone/tree/master/examples-staging/graphql-api-endpoint"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
"engines": {
"node": "^12.20 || >= 14.13"
},
"repository": "https://github.com/keystonejs/keystone/tree/master/examples/roles"
"repository": "https://github.com/keystonejs/keystone/tree/master/examples-staging/roles"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"engines": {
"node": "^12.20 || >= 14.13"
},
"repository": "https://github.com/keystonejs/keystone/tree/master/examples/sandbox"
"repository": "https://github.com/keystonejs/keystone/tree/master/examples-staging/sandbox"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"npm-tag": "manypkg npm-tag",
"update": "manypkg upgrade",
"no-cypress-install": "cross-env CYPRESS_INSTALL_BINARY=0 yarn",
"postinstall-examples": "for d in `find examples -type d -maxdepth 1 -mindepth 1`; do cd $d; yarn keystone-next postinstall --fix; cd ../..; done",
"lint:examples": "for d in `find examples -type d -maxdepth 1 -mindepth 1`; do cd $d; echo $d; SKIP_PROMPTS=1 yarn keystone-next postinstall; if [ $? -ne 0 ]; then exit 1; fi; cd ../..; done"
"postinstall-examples": "for d in `find examples -type d -maxdepth 1 -mindepth 1`; do cd $d; yarn keystone-next postinstall --fix; cd ../..; done; for d in `find examples-staging -type d -maxdepth 1 -mindepth 1`; do cd $d; yarn keystone-next postinstall --fix; cd ../..; done",
"lint:examples": "for d in `find examples -type d -maxdepth 1 -mindepth 1`; do cd $d; echo $d; SKIP_PROMPTS=1 yarn keystone-next postinstall; if [ $? -ne 0 ]; then exit 1; fi; cd ../..; done; for d in `find examples-staging -type d -maxdepth 1 -mindepth 1`; do cd $d; echo $d; SKIP_PROMPTS=1 yarn keystone-next postinstall; if [ $? -ne 0 ]; then exit 1; fi; cd ../..; done"
},
"dependencies": {
"@babel/core": "^7.14.3",
Expand Down Expand Up @@ -109,6 +109,7 @@
"tests/examples-smoke-tests",
"projects/*",
"examples/*",
"examples-staging/*",
"packages-next/*",
"design-system/packages/*",
"design-system/website",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples-smoke-tests/auth.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Browser, Page } from 'playwright';
import { exampleProjectTests, initFirstItemTest } from './utils';

exampleProjectTests('auth', browserType => {
exampleProjectTests('../examples-staging/auth', browserType => {
let browser: Browser = undefined as any;
let page: Page = undefined as any;
beforeAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/examples-smoke-tests/basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Browser, Page } from 'playwright';
import fetch from 'node-fetch';
import { exampleProjectTests, initFirstItemTest } from './utils';

exampleProjectTests('basic', browserType => {
exampleProjectTests('../examples-staging/basic', browserType => {
let browser: Browser = undefined as any;
let page: Page = undefined as any;
beforeAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/examples-smoke-tests/roles.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Browser, Page } from 'playwright';
import { exampleProjectTests, initFirstItemTest } from './utils';

exampleProjectTests('roles', browserType => {
exampleProjectTests('../examples-staging/roles', browserType => {
let browser: Browser = undefined as any;
let page: Page = undefined as any;
beforeAll(async () => {
Expand Down

0 comments on commit 9b22ae9

Please sign in to comment.