-
-
Save damienstanton/1517918678269c82ac57 to your computer and use it in GitHub Desktop.
PureScript Scaffolding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| mkdir src; mkdir dist; | |
| npm install grunt grunt-purescript | |
| cat <<EOT>> Gruntfile.coffee | |
| module.exports = (grunt) -> | |
| "use strict" | |
| grunt.initConfig({ | |
| # Source File Location | |
| srcFiles: ["*.purs", "bower_components/**/src/**/*.purs"] | |
| # Compiler Options | |
| psc: { | |
| options: { | |
| # main: "", | |
| # modules: [""] | |
| }, | |
| all: { | |
| src: ["<%=srcFiles%>"], | |
| dest: "dist/main.js" | |
| }, | |
| dotPsci: ["<%=srcFiles%>"] | |
| } | |
| # Document Generator | |
| pscDocs: { | |
| readme: { | |
| src: "src/**/*.purs", | |
| dest: "README.md" | |
| } | |
| } | |
| # Run Compiled JS in Node | |
| execute: { | |
| simple_target: { | |
| src: ["dist/main.js"] | |
| }, | |
| } | |
| }) | |
| grunt.loadNpmTasks("grunt-purescript") | |
| grunt.loadNpmTasks("grunt-execute") | |
| grunt.registerTask("default", ["psc:all"]) | |
| EOT | |
| npm init; bower init; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment