From d52d2be268a017d68571fddfdd24a7e6a7cef286 Mon Sep 17 00:00:00 2001 From: "John A. De Goes" Date: Tue, 14 Oct 2014 12:40:43 -0600 Subject: [PATCH] fix error in ffi function, also add jsvalidate so it won't build if there are any ffi errors --- Gruntfile.js | 16 ++++++++++++++-- package.json | 7 ++++--- src/Data/String.purs | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index ed5a3d2..3c41546 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,13 +18,25 @@ module.exports = function(grunt) { src: "src/**/*.purs", dest: "README.md" } + }, + jsvalidate: { + options:{ + globals: {}, + esprimaOptions: {}, + verbose: false + }, + targetName:{ + files:{ + src: ['output/Data.String/*.js'] + } + } } - }); + grunt.loadNpmTasks('grunt-jsvalidate'); grunt.loadNpmTasks("grunt-contrib-clean"); grunt.loadNpmTasks("grunt-purescript"); - grunt.registerTask("make", ["pscMake", "dotPsci", "docgen"]); + grunt.registerTask("make", ["pscMake", "dotPsci", "docgen", "jsvalidate"]); grunt.registerTask("default", ["make"]); }; diff --git a/package.json b/package.json index fa4a87c..c2867b1 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,9 @@ { "private": true, "dependencies": { - "grunt": "~0.4.4", - "grunt-purescript": "~0.5.1", - "grunt-contrib-clean": "~0.5.0" + "grunt": "~0.4.4", + "grunt-purescript": "~0.5.1", + "grunt-contrib-clean": "~0.5.0", + "grunt-jsvalidate": "~0.2.2" } } diff --git a/src/Data/String.purs b/src/Data/String.purs index cce7714..595cfcd 100644 --- a/src/Data/String.purs +++ b/src/Data/String.purs @@ -47,7 +47,7 @@ module Data.String foreign import fromCharArray "function fromCharArray(a) {\ \ return a.join(''); \ - \" :: [Char] -> String + \}" :: [Char] -> String foreign import indexOf "function indexOf(x) {\