Home
Softono
stack-editor

stack-editor

Open source Cirru
97
Stars
1
Forks
0
Issues
7
Watchers
9 months
Last Commit

About stack-editor

Stack Editor is a deprecated syntax tree editor for Clojure and ClojureScript, now superseded by Calcit Editor. It provides a browser-based client application for editing code through structural manipulation rather than plain text. The tool uses stack.cirru as its snapshot file format, which stores code as vectors in a human-readable Cirru EDN structure. It connects to a server via HTTP and loads substantial code in the browser to enable deeper code analysis. The editor offers features like file navigation, workspace editing, and dependency tree visualization. It can be installed globally through npm and launched with a stack.cirru snapshot file containing package and root definitions. The CLI supports configurable port, host, file extension, output directory, and operation mode options including watch and compile modes. While functional for learning and research purposes, it is no longer actively maintained and lacks the refinements of its successor.

Platforms

Web Self-hosted

Languages

Cirru

Stack Editor

A syntax tree editor for Clojure(Script).

Different from Calcit Editor

Current status of Stack Editor is mainly for learning and research. If you want to use in you project, use Calcit Editor instead!. Calcit Editor has more details and refinements.

  • Stack Editor uses stack.cirru as snapshot file, which is mostly vectors in Cirru EDN and human-readalbe.
  • Stack Editor connects server via HTTP, which is a bit harder to be consistent.
  • Stack Editor has more code loaded in browser, that makes it available for more analysis.
  • Stack Editor has not been actively maintained in the years, fewer features...

Usage

npm install -g stack-editor

Create stack.cirru(witn an entry app.main/main!) as snapshot file:

{} (:package |app)
  :root $ {} (:ns |main) (:def |main!)
  :files $ {}

Run editor:

stack-editor stack.cirru

Files Workspace Dependency tree

Options

For the UI, it's served at http://repo.cirru.org/stack-editor/?host=localhost&port=7010 with options:

  • port, defaults to 7010, server port
  • host, defaults to "localhost", server domain

The CLI support options:

op=watch port=7010 extension=.cljs out=src/ stack-editor stack.cirru
  • port, defaults to 7010, server port corresponding to the UI part
  • extension, defaults to ".cljs", file extension of the generated files
  • out, defaults src/ output folder
  • op, defaults to watch, or you may use op=compile to force compiling

License

MIT