WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Nov 28, 2023. It is now read-only.

Commit 9a46bf6

Browse files
committed
Initial commit
0 parents  commit 9a46bf6

26 files changed

+8101
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["next/babel", "@zeit/next-typescript/babel"]
3+
}

.gitignore

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
.env.test
60+
61+
# parcel-bundler cache (https://parceljs.org/)
62+
.cache
63+
64+
# next.js build output
65+
.next
66+
67+
# nuxt.js build output
68+
.nuxt
69+
70+
# vuepress build output
71+
.vuepress/dist
72+
73+
# Serverless directories
74+
.serverless/
75+
76+
# FuseBox cache
77+
.fusebox/
78+
79+
# DynamoDB Local files
80+
.dynamodb/

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM node:8@sha256:7b65413af120ec5328077775022c78101f103258a1876ec2f83890bce416e896
2+
ADD . /playground
3+
WORKDIR /playground
4+
RUN npm install && npm run build
5+
6+
EXPOSE 3000
7+
8+
CMD ["/playground/node_modules/.bin/next", "start", "--host", "0.0.0.0"]

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# @nteract/play
2+
3+
Play is a simple REPL-like interface for executing code online. It allows users to write code snippets and execute their output. Play is powered by [Binder](https://mybinder.org/).
4+
5+
## Installation
6+
7+
To set up this project for development, start by cloning this repository.
8+
9+
```
10+
$ git clone https://github.com/nteract/play.git
11+
```
12+
13+
Install the dependencies for this project.
14+
15+
```
16+
$ yarn
17+
```
18+
19+
Then run the project in development mode.
20+
21+
```
22+
$ yarn dev
23+
```
24+
25+
## Support
26+
27+
If you experience an issue while using this package or have a feature request, please file an issue on the [issue board](https://github.com/nteract/play/issues/new/choose).
28+
29+
## License
30+
31+
[BSD-3-Clause](https://choosealicense.com/licenses/bsd-3-clause/)

app-redux/PLAN.txt

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
file structure:
2+
3+
/play
4+
/pages
5+
index.js
6+
/components
7+
index.js
8+
...
9+
/redux
10+
actionTypes.js
11+
actions.js
12+
reducer.js
13+
epics.js
14+
index.js
15+
16+
17+
state:
18+
19+
{
20+
ui: {
21+
repo: <string>,
22+
gitref: <string>,
23+
source: <string>,
24+
showPanel: <boolean>,
25+
currentServerId: <string>,
26+
currentKernelName: <string>,
27+
platform: <string>
28+
},
29+
entities: {
30+
serversById: {
31+
<ID>: {
32+
server: {
33+
config: {
34+
endpoint: <string>,
35+
token: <string>,
36+
uri: <string>,
37+
crossDomain: <boolean>
38+
},
39+
messages: <array>,
40+
kernelSpecs: {
41+
kernelSpecByKernelName: {
42+
<NAME>: {
43+
name: <NAME>,
44+
resources: <object>,
45+
spec: <object>
46+
}
47+
},
48+
error: <object>,
49+
default: <string>,
50+
loading: <boolean>
51+
}
52+
activeKernelsByName: {
53+
<NAME>: {
54+
kernel: {
55+
name: <NAME>,
56+
id: <string>,
57+
lastActivity: <string>,
58+
channel: <rxjs$Subject>,
59+
outputs: <array>,
60+
status: <string>,
61+
messages: <array>
62+
},
63+
loading: <boolean>,
64+
error: <object>
65+
}
66+
}
67+
},
68+
loading: <boolean>,
69+
error: <object>
70+
}
71+
}
72+
}
73+
}

app-redux/actionTypes.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
const PREFIX = "PLAY";
2+
const FULFILLED = "FULFILLED";
3+
const FAILED = "FAILED";
4+
5+
// UI-Related Action Types.
6+
export const SET_CURRENT_KERNEL_NAME = `${PREFIX}/SET_CURRENT_KERNEL_NAME`;
7+
export const SET_CURRENT_SERVER_ID = `${PREFIX}/SET_CURRENT_SERVER_ID`;
8+
export const SET_PLATFORM = `${PREFIX}/SET_PLATFORM`;
9+
export const SET_SHOW_PANEL = `${PREFIX}/SET_SHOW_PANEL`;
10+
export const SET_SOURCE = `${PREFIX}/SET_SOURCE`;
11+
export const SUBMIT_BINDER_FORM = `${PREFIX}/SUBMIT_BINDER_FORM`;
12+
export const SET_CODE_MIRROR_MODE = `${PREFIX}/SET_CODE_MIRROR_MODE`;
13+
14+
// Server-Related Action Types
15+
export const ACTIVATE_SERVER = `${PREFIX}/ACTIVATE_SERVER`;
16+
export const ACTIVATE_SERVER_FULFILLED = `${PREFIX}/ACTIVATE_SERVER_${FULFILLED}`;
17+
export const ACTIVATE_SERVER_FAILED = `${PREFIX}/ACTIVATE_SERVER_${FAILED}`;
18+
19+
export const KILL_SERVER = `${PREFIX}/KILL_SERVER`;
20+
export const KILL_SERVER_FULFILLED = `${PREFIX}/KILL_SERVER_${FULFILLED}`;
21+
export const KILL_SERVER_FAILED = `${PREFIX}/KILL_SERVER_${FAILED}`;
22+
23+
export const FETCH_KERNEL_SPECS = `${PREFIX}/FETCH_KERNEL_SPECS`;
24+
export const FETCH_KERNEL_SPECS_FULFILLED = `${PREFIX}/FETCH_KERNEL_SPECS_${FULFILLED}`;
25+
export const FETCH_KERNEL_SPECS_FAILED = `${PREFIX}/FETCH_KERNEL_SPECS_${FAILED}`;
26+
27+
export const ADD_SERVER_MESSAGE = `${PREFIX}/ADD_SERVER_MESSAGE`;
28+
29+
// Kernel-Related Action Types
30+
export const ACTIVATE_KERNEL = `${PREFIX}/ACTIVATE_KERNEL`;
31+
export const ACTIVATE_KERNEL_FULFILLED = `${PREFIX}/ACTIVATE_KERNEL_${FULFILLED}`;
32+
export const ACTIVATE_KERNEL_FAILED = `${PREFIX}/ACTIVATE_KERNEL_${FAILED}`;
33+
34+
export const INTERRUPT_KERNEL = `${PREFIX}/INTERRUPT_KERNEL`;
35+
export const INTERRUPT_KERNEL_FULFILLED = `${PREFIX}/INTERRUPT_KERNEL_${FULFILLED}`;
36+
export const INTERRUPT_KERNEL_FAILED = `${PREFIX}/INTERRUPT_KERNEL_${FAILED}`;
37+
38+
export const KILL_KERNEL = `${PREFIX}/KILL_KERNEL`;
39+
export const KILL_KERNEL_FULFILLED = `${PREFIX}/KILL_KERNEL_${FULFILLED}`;
40+
export const KILL_KERNEL_FAILED = `${PREFIX}/KILL_KERNEL_${FAILED}`;
41+
42+
export const ADD_KERNEL_MESSAGE = `${PREFIX}/ADD_KERNEL_MESSAGE`;
43+
export const ADD_KERNEL_OUTPUT = `${PREFIX}/ADD_KERNEL_OUTPUT`;
44+
export const CLEAR_KERNEL_OUTPUTS = `${PREFIX}/CLEAR_KERNEL_OUTPUTS`;
45+
export const RESTART_KERNEL = `${PREFIX}/RESTART_KERNEL`;
46+
export const RUN_SOURCE = `${PREFIX}/RUN_SOURCE`;
47+
export const SET_ACTIVE_KERNEL = `${PREFIX}/SET_ACTIVE_KERNEL`;
48+
export const SET_ACTIVE_KERNEL_LANGUAGE_INFO = `${PREFIX}/SET_ACTIVE_KERNEL_LANGUAGE_INFO`;
49+
export const SET_KERNEL_STATUS = `${PREFIX}/SET_KERNEL_STATUS`;
50+
51+
export const INITIALIZE_FROM_QUERY = `${PREFIX}/INITIALIZE_FROM_QUERY`;

0 commit comments

Comments
 (0)