slamdata/mandragora-bucket

Name: mandragora-bucket

Owner: SlamData, Inc.

Description: Gulp goodness for PureScript.

Created: 2015-03-03 22:47:39.0

Updated: 2015-05-04 16:57:58.0

Pushed: 2015-05-25 07:58:10.0

Homepage: null

Size: 366

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

mandragora-bucket

Build Status

Dependencies
The purpose

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

It can
How to use it
default directory structure

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

ths: {
bower: [
  'bower_components/purescript-*/src/**/*.purs',
  'bower_components/purescript-*/purescript-*/src/**/*.purs'
],
src: ['src/**/*.purs'],
test: ['test/**/*.purs'],
docs: {
  dest: 'MODULES.md'
}

pDir: 'dist'

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
mandragora = require("mandragora-bucket"),
gulp = require("gulp");

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


se mandragora.config as default

ragora(gulp);

r provide config as second argument

ragora(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:

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


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

suffix will be foo-bar

Notes

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.