Skip to content

Commit 2bad32e

Browse files
committed
hello codemirror
1 parent 22b5bb7 commit 2bad32e

18 files changed

+16750
-11075
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
package-lock.json

README.org

Lines changed: 141 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,147 @@
11
#+TITLE: Workshop
22
#+AUTHOR: Jasper Travers
3-
4-
** TODO Supporting Sources
5-
(To fill with links to source material once edited)
3+
** Design
4+
Communication, computation, work.
5+
(todo: edit design docs; insert here)
66

77
** Dependencies
88
- https://www.stopify.org/
99
- https://codemirror.net/
10+
- https://prosemirror.net/
11+
- https://rollupjs.org/guide/en/
12+
13+
* Notes
14+
** Developtment/Build
15+
How this is made. How this is built.
16+
17+
*** Development log
18+
#+BEGIN_SRC sh
19+
npm init
20+
21+
npm install @stopify/stopify
22+
npm install @codemirror/next # this will change on v1.0.0 release
23+
24+
npm install prosemirror-model
25+
npm install prosemirror-state
26+
npm install prosemirror-view
27+
npm install prosemirror-transform
28+
# going to need a few more prosmirror modules; yes these can be space separated
29+
30+
npm install rollup --global
31+
32+
mkdir src public
33+
touch src/main.js
34+
touch rollup.config.js
35+
36+
npm install rollup --save-dev # being thorough about building
37+
# building: npm run build
38+
39+
Need a bundler: either rollup, parcel, webpack, snowpack
40+
41+
# to catch up with rollup-starter-app
42+
npm install serve --save-dev
43+
npm install @rollup/plugin-commonjs --save-dev
44+
npm install @rollup/plugin-node-resolve --save-dev
45+
npm install rollup-plugin-terser --save-dev
46+
npm install npm-run-all --save-dev
47+
48+
npm install webpack --save-dev # trying to tame warnings
49+
50+
npm install --save-dev @rollup/plugin-json
51+
npm install --save-dev rollup-plugin-node-polyfills
52+
#+END_SRC
53+
54+
Babel Issues:
55+
#+BEGIN_SRC sh
56+
npm install @rollup/plugin-babel --save-dev
57+
npm install @babel/core --save-dev
58+
npm install ajv --save-dev
59+
60+
npm install babel-loader @babel/core --save-dev
61+
62+
#+END_SRC
63+
64+
I'm going to give up on importing stopify and will instead include the bundle. Uninstalling myriad npm packages I used to try to fix the problem.
65+
66+
#+BEGIN_SRC
67+
npm uninstall babel-loader @babel/core @rollup/plugin-babel ajv
68+
#+END_SRC
69+
70+
Copying bundle into place and including in ~public/index.html~, I suppose I could very well remove ~@stopify/stopify~ but I'll leave it for now for followup investigation.
71+
72+
~npm run build~ script set in ~package.json~
73+
74+
backspace on empty editor throws "RangeError"
75+
76+
~view.state.doc.toString()~
77+
to get string in editor for stopify
78+
79+
80+
*** Links
81+
- https://git-scm.com/book/
82+
- https://rollupjs.org/guide/en/
83+
- https://github.com/rollup/rollup-starter-app
84+
- https://rollupjs.org/guide/en/#quick-start
85+
86+
** Base
87+
The "thing" this all sits on. Where the components go.
88+
89+
*** Links
90+
91+
** Codemirror
92+
Code editor.
93+
94+
*** Links
95+
- https://codemirror.net/6/docs/guide/
96+
- https://github.com/codemirror/codemirror.next/
97+
98+
** Execution Control
99+
Towards a live sandbox.
100+
101+
*** Links
102+
- https://www.stopify.org/
103+
- https://stopify.readthedocs.io/en/latest/quickstart.html
104+
105+
** Prosemirror
106+
Content editor.
107+
108+
*** Links
109+
- https://prosemirror.net/docs/guide/
110+
111+
** Console
112+
debug/repl style output; printing from code
113+
114+
*** Links
115+
- https://eloquentjavascript.net/code/
116+
- https://github.com/marijnh/Eloquent-JavaScript/tree/master/html/js
117+
118+
** Canvas/SVG
119+
creative coding output
120+
121+
*** Links
122+
- http://bucephalus.org/text/CanvasHandbook/CanvasHandbook.html
123+
124+
** Explorations
125+
Tech to check out; capabilities to explore
126+
127+
- git; this repo
128+
129+
*** Links
130+
- https://github.com/yjs/yjs
131+
- https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API
132+
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
133+
- https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps
134+
135+
** Inspirations
136+
Yes, again...
137+
As always, incomplete.
138+
139+
*** Links
140+
- https://github.com/hundredrabbits/Ronin
141+
- https://github.com/damelang/nile
142+
- http://worrydream.com/refs/Sutherland-Sketchpad.pdf
143+
- https://paper.dropbox.com/doc/Stamper-An-Artboard-Oriented-Programming-Environment--A4V0v1SHSKMwJb74PRF4eBnPAg-QXtfMXshBFBNCu6iCtx2J
144+
- https://makespace.fun/
145+
146+
* Footer
147+
Note: Github does not render ~.org~ files correctly. This file is edited and read in emacs with org mode.

index.html renamed to alt/index.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,11 @@
99
<meta name="keywords" content="">
1010

1111
<!-- includes -->
12-
<script src="scripts/codemirror.js"></script>
13-
<link rel="stylesheet" href="links/codemirror.css">
14-
<script src="scripts/js-mode-codemirror.js"></script>
15-
12+
<script type="text/javascript" src="index.js"></script>
1613
<script type="text/javascript" src="scripts/stopify-full.bundle.js"></script>
1714
<script type="text/javascript" src="scripts/main.js"> </script>
1815

19-
<link rel="stylesheet" href="links/main.css">
20-
16+
<!-- <link rel="stylesheet" href="styles/main.css"> -->
2117
</head>
2218

2319
<body>

scripts/main.js renamed to alt/scripts/main.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ window.addEventListener("load", onLoad);
22

33
function onLoad() {
44
value =
5-
`/* this is this
6-
dependencies:
7-
https://codemirror.net/
8-
https://www.stopify.org/
9-
*/
5+
`/* this is this */
106
117
//allows re-running
128
if (main) {

alt/styles/main.css

Whitespace-only changes.

0 commit comments

Comments
 (0)