Comments (1)
ya I agree, .ojs
right now isn't that great, mostly because it's brand new. There are small things you can do to make it a better experience while developing, like, associating .ojs
files with JavaScript in your editor. For example, in VS Code, I have:
"files.associations": {
"*.ojs": "javascript"
}
Which associates my .ojs
files with VS Code's builtin JavaScript features, like syntax highlighting and autocompletion.
But, .ojs
isn't perfectly JavaScript (see Observable’s not JavaScript), so viewof
, mutable
, and block cells (x = {return 4;}
) will erroneously show syntax errors. Autocompletion is based off static analysis on generic JS libraries and not 100% perfect. And prettier/most formatting libraries won't work.
There are other issues on this repo that are tackling some of these problems (mainly #18 for a Dataflow autocomplete features + language server), and I hope to scope out more work for how syntax highlighting, a .ojs
prettier plugin, and other ways to make .ojs
nicer to work with.
I do like the ideas you bring up here, but there are reasons I want to stick with .ojs
. Other people can definitely build things that compile to .ojs
(for example, a tool that compiles your jsx
example to .ojs
, or a custom mdx
format that compiles to .ojs
). But staying with .ojs
makes the Dataflow compiling process very straightforward, any other format would require pre-processing which would add complexity. Also, I want to make it as easy as possible to copy+paste examples on observablehq.com into Dataflow Observable notebooks, so .ojs
makes that straightforward.
from dataflow.
Related Issues (20)
- Add option for displaying (non-editable) source code below rendered output
- `dataflow library`, point to a directory of notebooks HOT 1
- Secure notebook, import, and fileattachment access
- Bundler plugins for webpack, esbuild, rollup, etc.
- Better way to define custom builtin cells (stdlib)
- More features on the compiler
- Editor-agnostic auto-completion HOT 3
- Reload FileAttachments when FA is added/removed HOT 3
- "Visual Dataflow" for a notebook's cell depedencies
- Add Cell Menus for downloading cell values
- Dataflow Grid System
- Dataflow-specific builtin cell
- Bug in html template literal HOT 1
- Live-reload displays blank page on Windows 10 HOT 3
- Shebang support
- Conflicting GitHub and Observable CSS
- Improper cells margin collapsing
- Truly self-host all dependencies
- RuntimeError: Inputs.form is not a function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dataflow.