Socket
Book a DemoInstallSign in
Socket

@atomist/clj-editors

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atomist/clj-editors

editor functions that use rewrite-clj and other important things from the clojurescript ecosystem

latest
Source
npmnpm
Version
0.8.2
Version published
Maintainers
1
Created
Source

packaging ClojureScript in NPM

We build a node module @atomist/clj-editors here. This allows us to construct clojure editors using rewrite-cljs. A Node.js application, like an Atomist automation client, can now easily package clojure editing functions into a typescript application.

This also has a simple command line to manage the clojure-sdm credentials. Install this module with:

npm install @atomist/clj-editors@0.3.8 -g

then

sdm-vault --help

to manage maps encrypted with goog.crypt.Aes keys.

clj-editors Usage

Add the dependency to your application's package.json file.

{
  "dependencies": {
    ...
    "@atomist/clj-editors": "^0.3.8",
    ...
   },
   ...
}

This module works with npm link so we can co-develop these editors alongside the sdm-pack-clojure. These editors are pretty easy to unit test, and testing from a Node.js repl works quite well!

Development

Compiling

npm run compile

Repl

npm run repl

This will give you a socket repl running on port 7777, so you can connect emacs or intellij and evaluate the cljs forms on the fly. It's a pretty good workflow, and contains clojure.test (although it's in cljs.test here). I haven't gotten it working with nrepl so it's not quite as smooth as working with a Java repl but it can do the main things:

  • evaluate forms by passing them through cljs.repl, whether they are compiled to .js
  • .js expressions are sent to a node.js process running alongside the cljs.repl
  • (deftest) forms work great so you can code and evaluate unit tests using our standard workflow.

Unit Tests

Run cljs.test unit tests using npm:

npm run test

Publish

It's just normal npm publish for the rest.

sdm-vault

This project also has a simple command line to manipulate vault.txt files.

Keywords

editors

FAQs

Package last updated on 30 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts