Git Product home page Git Product logo

pulp's Introduction

Pulp

A build tool for PureScript.

Jarvis Cocker dancing

Installation

$ cabal install purescript
$ npm install -g pulp

Project Structure

The structure of a pulp project should look like this:

  root
  - bower.json
  - src/
  - test/

Put your .purs source files in the src directory, and any tests you might have in the test directory.

Also, create a bower.json file (see http://bower.io/#defining-a-package). pulp expects to find this file in the root of your project. You can invoke pulp from a subdirectory; if there is no bower.json to be found in the current directory, pulp will look through parent directories until it finds it.

Commands

pulp supports the following commands:

  • pulp install will install dependencies as given in the bower.json file. It essentially just invokes bower install.
  • pulp build invokes the PureScript compiler. Currently, it just compiles all .purs files in your src and dependencies into the target directory, which defaults to output.
  • pulp test runs your test suite: it expects a Test.Main package in the test directory, containing a main function, which is required and run using Node. It's expected that failing tests will cause the program to terminate with an error. Test.QuickCheck works well for this purpose.
  • pulp run will first run pulp build, then launch the compiled project code in a Node process. The entry point will be the main function in the module specified with the --main option, or, by default, the module Main.
  • pulp browserify also runs pulp build, then runs the project code through Browserify. The entry point is decided in the same way as with pulp run. You can specify an output file using --to; the default is to output the bundle to stdout, which is convenient for doing things like pulp browserify | uglifyjs -c.

Watch and restart

You can launch any of the above commands with the --watch or -w option, which will cause pulp to run indefinitely, watching your src and test folders for changes, and re-running the command whenever something changes.

License

Copyright 2014 Bodil Stokke

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

See the LICENSE file for further details.

pulp's People

Contributors

bodil avatar matthewpflueger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.