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

jlbox

v0.1.6

Published

bootstrap julia projects, provide a watching mechanism to run tests for modified julia files

Downloads

13

Readme

jlbox

Build Status

jlbox uses node.js to provide a mechanism for automatically reloading julia source and test files via gulp.js and a ZMQ socket. The tests are assumed to be using the FactCheck.jl package. jlbox will even restart your julia process if you manage to write code that crashes it!

jlbox will also stub out module/test file pairs.

Dependencies

In julia, ensure you have the following packages installed:

Pkg.add("ZMQ")
Pkg.add("FactCheck")
Pkg.add("Lint")

Install nodejs and ZMQ:

OS X

I use homebrew:

brew install node
brew install zmq

Windows

For windows there were several things I needed to do (if you already have node.js and can build things via node-gyp you can skip these steps):

  1. Install chocolatey
  2. Install node cinst nodejs.install
  3. Install zmq windows client
  4. Satisfy the node-gyp build dependencies. FYI - I wasn't able to complete step 4 on XP (said Windows SDK 7.1 not found, but compiling still worked for me)
  5. Make sure julia binary is in your PATH. When using the prepackaged binary I needed to copy julia-readline.exe as julia.exe (from the /bin folder) and add that location (including the bin dir) to my PATH. Validate that typing julia on the command line opens the julia REPL.

Note: you may need to restart a few times (I did) to complete all the dependencies.

Install jlbox

Use npm to install:

npm install -g gulp
npm install -g jlbox

The -g flag will make the jlbox and gulp binaries available from your command line.

Workflow

> mkdir my_project
> cd my_project
> jlbox init
> jlbox module Sample
> gulp

With your project ready to go, run the gulp command in your project root. This command will start watching files in in src/ and test/ directories. When a source file is modified, it will look in the test/ folder for corresponding file filename_test.jl. When a test file is modified, it will re-run the tests in that file.

In order to avoid redefinition problems, use modules for your code and tests. Please see jlbox.jl and jlbox_test.jl for examples.

For more information, please see my blog post.

Commands

init

Running jlbox init will setup your project for watching julia files. It should be run in your project root. It does a few things:

  • Makes test/ and src/ folders
  • Creates a gulpfile.js and gulp.jl file
  • Creates a package.json file
  • Uses npm to install: gulp, gulp-util, and zmq node packages

module

Running jlbox module Simple will make two files: src/Simple.jl and test/Simple_test.jl. The files will be stubbed out and include a module-based setup for you to begin coding and testing.

Contributing

I'm very open to contributions. This tool has helped me improve my workflow and I'm sure there are plenty of features (e.g. custom templates, etc.) that will make it much better. Feel free to submit a PR/issue with your ideas.