Skip to content

A Leiningen plugin that implements tasks useful for working with ClojureScript on the NodeJS platform

License

Notifications You must be signed in to change notification settings

ghaskins/lein-nodecljs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lein-nodecljs

A Leiningen plugin that implements tasks useful for working with ClojureScript on the NodeJS platform.

What about 'lein-npm' and 'lein-cljsbuild'?

They are awesome, and historically this is what I have used too. However, I also found that I was constantly providing boilerplate in my projects to support outputting clojurescript to the nodejs platform. For example:

  • Configuring cljsbuild the same way to :target :nodejs
  • Writing a Makefile to couple "lein npm deps" to "lein cljsbuild once"
  • Manually solving the installation/launch of the program with a hacky script.

This plugin starts afresh with some fairly strong opinions on convenience utilities for working with clojurescript specifically on the nodejs platform. For example, this plugin completely overrides the the 'compile', 'run', and 'install' tasks. It also provides a new task 'pack' which emulates 'npm pack', suitable for manual installation or publishing to npmjs.org.

Usage

Clojars Project

Put lein-nodecljs into the :plugins vector of your project.clj.

  • lein nodedeps - New task that downloads NPM dependencies to :target/nodecljs.
  • lein nodecompile - New task that compiles your program to :target/nodecljs. 'nodedeps' is implicitly invoked.
  • lein run - Override that compiles and then executes your program on the nodejs platform in place.
  • lein install - Override that nodecompiles and then installs your program with 'npm install -g'.
  • lein pack - New task that packages your code with 'npm pack' suitable for manual installation or deployment to npmjs.org.

License

Copyright © 2017 Greg Haskins gregory.haskins@gmail.com

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

A Leiningen plugin that implements tasks useful for working with ClojureScript on the NodeJS platform

Resources

License

Stars

Watchers

Forks

Packages

No packages published