Skip to content

Commit

Permalink
Initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
JedWatson committed Apr 6, 2018
1 parent d4197da commit 986d77c
Show file tree
Hide file tree
Showing 9 changed files with 505 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 KeystoneJS
Copyright (c) 2018 Jed Watson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 19 additions & 0 deletions package.json
@@ -0,0 +1,19 @@
{
"name": "keystone",
"version": "5.0.0",
"author": "Jed Watson",
"license": "MIT",
"scripts": {
"start": "cd packages/test-project && npm start"
},
"dependencies": {
"express": "^4.16.3",
"react": "^16.3.1",
"react-dom": "^16.3.1"
},
"bolt": {
"workspaces": [
"packages/*"
]
}
}
11 changes: 11 additions & 0 deletions packages/admin-ui/package.json
@@ -0,0 +1,11 @@
{
"name": "@keystone/admin-ui",
"private": true,
"version": "5.0.0",
"author": "Jed Watson",
"license": "MIT",
"dependencies": {
"react": "^16.3.1",
"react-dom": "^16.3.1"
}
}
8 changes: 8 additions & 0 deletions packages/core/package.json
@@ -0,0 +1,8 @@
{
"name": "@keystone/core",
"private": true,
"version": "5.0.0",
"author": "Jed Watson",
"license": "MIT",
"dependencies": {}
}
8 changes: 8 additions & 0 deletions packages/fields/package.json
@@ -0,0 +1,8 @@
{
"name": "@keystone/fields",
"private": true,
"version": "5.0.0",
"author": "Jed Watson",
"license": "MIT",
"dependencies": {}
}
10 changes: 10 additions & 0 deletions packages/server/package.json
@@ -0,0 +1,10 @@
{
"name": "@keystone/server",
"private": true,
"version": "5.0.0",
"author": "Jed Watson",
"license": "MIT",
"dependencies": {
"express": "^4.16.3"
}
}
24 changes: 24 additions & 0 deletions packages/test-project/index.js
@@ -0,0 +1,24 @@
const { AdminUI } = require('@keystone/admin-ui');
const { Keystone } = require('@keystone/core');
const { Name, Email, Password } = require('@keystone/fields');
const { WebServer } = require('@keystone/server');

const keystone = new Keystone();

const User = keystone.createList('User', {
formatName: item => item.fields.name.format(),
fields: {
name: { type: Name },
email: { type: Email },
password: { type: Password },
},
});

const admin = new AdminUI(keystone);

const server = new WebServer({
'cookie secret': 'qwerty',
'admin ui': admin,
});

server.start();
16 changes: 16 additions & 0 deletions packages/test-project/package.json
@@ -0,0 +1,16 @@
{
"name": "@keystone/test-project",
"private": true,
"version": "5.0.0",
"author": "Jed Watson",
"license": "MIT",
"scripts": {
"start": "node index.js"
},
"dependencies": {
"@keystone/admin-ui": "^5.0.0",
"@keystone/core": "^5.0.0",
"@keystone/fields": "^5.0.0",
"@keystone/server": "^5.0.0"
}
}

0 comments on commit 986d77c

Please sign in to comment.