npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-cljs

v0.1.1

Published

[![Build Status](https://travis-ci.org/also/node-cljs.png?branch=master)](https://travis-ci.org/also/node-cljs)

Downloads

10

Readme

node-cljs

Build Status

Run compiled ClojureScript code with node.js. Skip :target :nodejs and (set! *main-cli-fn* ...) and call any exported function from the command line.

Install

npm install -g node-cljs

Usage

usage: node-cljs :output-to [-m namespace.main_fn [arg...]]
       node-cljs :output-dir :output-to [-a] [-r namespace]... [-m namespace.main_fn [arg...]]

Namespaces and functions need to use the munged form, that is, cemerick.cljs.test.run_all_tests, not cemerick.cljs.test.run-all-tests.

Unless one of the namespaces you'll load has a side effect (why would you do this?!), specify the function to call with -m.

Unoptimized

When compiled with :optimizations :none, the first argument points to :output-dir (the directory containing goog/base.js) and the second is :output-to.

The -r option will load a namspace, and the -a option will load all namespaces. This is useful when the main function you are calling depends on other namespaces without requiring them, like cemerick.cljs.test.run-all-tests. If you compile with optimization, all your tests will be included in the :output-to file, but without optimization they will need to be explicitly required.

Optimized

For all other :optimization levels, you only need to specify the single file :output-to.

Examples

Given this lein-cljsbuild configuration:

# require all namespaces and run all tests for an unoptimized build
node-cljs target/cljs/unoptimized target/cljs/unoptimized.js -a -m cemerick.cljs.node.run_all_tests

# run cemerick.cljs.test.basic with a build optimized with :advanced
node-cljs target/cljs/advanced.js -m cemerick.cljs.node.run_tests cemerick.cljs.test.basic

# require cemerick.cljs.test.fixtures and run all tests for an unoptimized build
node-cljs target/cljs/unoptimized target/cljs/unoptimized.js -r cemerick.cljs.test.fixtures -m cemerick.cljs.node.run_all_tests