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 🙏

© 2026 – Pkg Stats / Ryan Hefner

mandragora-bucket

v0.3.2

Published

Bunch of gulp tasks for purescript projects

Readme

mandragora-bucket

Build Status

Dependencies

  • nodejs > 0.12
  • globally installed gulp

The purpose

mandragora-bucket provides bunch of gulp tasks that covers almost all needs of purescript project.

It can

  • build projects via psc or psc-make
  • bundle psc-maked or psced projects with browserify
  • test projects with karma and check coverage with istanbul
  • manage projects that have multiple entry points.
  • watch psc-make and karma builds
  • produce docs

How to use it

default directory structure

root
  - src/  -- Source code
  - test/ -- Tests code
  - dist/ -- temporary directory
    - node_modules -- symlinks to project node_modules/ and psc-maked src
    - entry-foo.js -- browserify entry one
    - entry-bar.js -- browserify entry two
    - test-main.js -- browserify test entry
  - bower_components/ 
  - node_modules/ 
  - MODULES.md -- generated docs
  - bower.json
  - package.json 

default config

{
  paths: {
    bower: [
      'bower_components/purescript-*/src/**/*.purs',
      'bower_components/purescript-*/purescript-*/src/**/*.purs'
    ],
    src: ['src/**/*.purs'],
    test: ['test/**/*.purs'],
    docs: {
      dest: 'MODULES.md'
    }
  },
  tmpDir: 'dist'
}
  • It takes paths.bower and paths.src to compile and watch in main tasks.
  • It takes paths.bower, paths.src and paths.test for test tasks.
  • gulp docs emits documentation to paths.docs.dest
  • Temporary directory is tmpDir

minimal user config

{
    entries: {
        "Main": {
            "name": "build",
            "dir": "public"
        }
    }
}

Merging this config with default will add tasks that compile module Main, bundle results (for psc-make) and put it to public directory.

multiple entries config

{
    "Entries.File": {
        "name": "file",
        "dir": "public"
    },
    "Entries.Notebook": {
        "name": "notebook",
        "dir": "public"
    }
}

This config will add tasks for both Entries.File and Entries.Notebook.

using it in gulpfile

var mandragora = require("mandragora-bucket"),
    gulp = require("gulp");

mandragora.config.entries = {
    "Entry": {
        "name": "result",
        "dir": "out"
    }
};

// use mandragora.config as default

mandragora(gulp);

// or provide config as second argument

mandragora(gulp, {
    paths: {
        bower: ["bower_components/purescript-*/src/**/*.purs"],
        src: ["my/src"],
        test: ["my/test"],
        docs: {dest: "OTHER.md"},
    },
    tmpDir: "tmp",
    entries: {
        "Main": {
            name: "result",
            dir: "out"
        }
    }
});

Produced tasks

Call to mandragora.define(gulp) or mandragor.define(gulp, config) will produce following tasks:

  • gulp bundle-test -- psc-make Test.Main entry and cover all file from src with istanbul
  • gulp karma -- run tests in karma
  • gulp cover -- run tests in karma and send statictics to coveralls
  • gulp watch-test -- watch test and project sources, recompile it by gulp bundle-test

For each of entry in config.entries i.e.

{
    "Foo.Bar": {
        "name": "baz",
        "dir": "out"
    }
}

suffix will be foo-bar

  • gulp make -- run psc-make
  • gulp entries -- make entry files for browserify
  • gulp psci -- produce .psci_modules for sources
  • gulp docs -- emit docs
  • gulp prod-suffix -- run psc
  • gulp bundle-suffix -- bundle this entry
  • gulp bundle-prod-suffix -- bundle psc result with it npm dependencies
  • gulp deploy-suffix -- compile via psc-make, bundle it, move to entry.dir as entry.name + ".js"
  • gulp deploy-prod-suffix -- compile via psc, bundle it, move to entry.dir as entry.name + ".js"
  • gulp watch-suffix -- run gulp deploy-suffix on source change
  • gulp bundle-prod -- compile all entries by psc and then bundle it

Notes

  • Tasks for testing will cause exception if there is no Test.Main module.
  • gulp deploy-prod should run after gulp bundle-prod and move all its results to target directories. It doesn't.