Skip to content

Commit 81565c1

Browse files
committed
Update build & package files
1 parent f14dc65 commit 81565c1

File tree

7 files changed

+79
-67
lines changed

7 files changed

+79
-67
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.*
22
!/.bowerrc
33
!/.gitignore
4-
/output/
5-
/node_modules/
64
/bower_components/
7-
/dist/
5+
/node_modules/
6+
/output/
7+
/tmp/

Gruntfile.js

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,51 @@ module.exports = function(grunt) {
22

33
"use strict";
44

5-
grunt.initConfig({
6-
5+
grunt.initConfig({
6+
77
libFiles: [
88
"src/**/*.purs",
99
"bower_components/purescript-*/src/**/*.purs"
1010
],
11-
12-
clean: ["output"],
13-
14-
pscMake: {
15-
lib: {
16-
src: ["<%=libFiles%>"]
17-
}
11+
12+
clean: ["output", "tmp"],
13+
14+
pscMake: ["<%=libFiles%>"],
15+
dotPsci: ["<%=libFiles%>"],
16+
pscDocs: {
17+
readme: {
18+
src: "src/**/*.purs",
19+
dest: "README.md"
20+
}
1821
},
1922

2023
psc: {
21-
options: {
22-
modules: ["Main"],
23-
main: "Main"
24-
},
25-
example: {
26-
src: ["<%=libFiles%>", "examples/*.purs"],
27-
dest: "dist/Main.js"
24+
collatzExample: {
25+
options: {
26+
modules: ["Main"],
27+
main: "Main"
28+
},
29+
src: ["<%=libFiles%>", "examples/Collatz.purs"],
30+
dest: "tmp/Collatz.js"
2831
}
2932
},
3033

31-
dotPsci: ["<%=libFiles%>"]
34+
execute: {
35+
collatzExample: {
36+
src: "tmp/Collatz.js"
37+
}
38+
},
39+
40+
jsvalidate: ["output/**/*.js"]
41+
3242
});
3343

3444
grunt.loadNpmTasks("grunt-contrib-clean");
45+
grunt.loadNpmTasks("grunt-execute");
46+
grunt.loadNpmTasks("grunt-jsvalidate");
3547
grunt.loadNpmTasks("grunt-purescript");
36-
37-
grunt.registerTask("make", ["pscMake:lib", "dotPsci", "psc:example"]);
48+
49+
grunt.registerTask("make", ["pscMake", "dotPsci", "pscDocs", "jsvalidate"]);
50+
grunt.registerTask("examples", ["psc", "execute"]);
3851
grunt.registerTask("default", ["clean", "make"]);
3952
};

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014 PureScript
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

LICENSE-MIT

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
# purescript-unfoldable
1+
# Module Documentation
22

3-
Unfoldable Functors
3+
## Module Data.Unfoldable
44

5-
## Building
5+
### Type Classes
66

7-
```
8-
npm install
9-
bower update
10-
grunt
11-
```
7+
class Unfoldable t where
8+
unfoldr :: forall a b. (b -> Maybe (Tuple a b)) -> b -> t a
9+
10+
11+
### Type Class Instances
12+
13+
instance unfoldableArray :: Unfoldable Prim.Array

bower.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
{
22
"name": "purescript-unfoldable",
3+
"homepage": "https://github.com/purescript/purescript-unfoldable",
34
"description": "Unfoldable Functors",
4-
"keywords": ["purescript"],
5+
"keywords": [
6+
"purescript"
7+
],
8+
"license": "MIT",
59
"ignore": [
610
"**/.*",
711
"bower_components",
812
"node_modules",
913
"output",
1014
"tests",
11-
"js",
1215
"tmp",
1316
"bower.json",
1417
"Gruntfile.js",
1518
"package.json"
1619
],
1720
"dependencies": {
18-
"purescript-arrays" : "~0.3.0",
19-
"purescript-tuples" : "*",
20-
"purescript-maybe" : "*"
21+
"purescript-arrays": "^0.3.0",
22+
"purescript-maybe": "^0.2.1",
23+
"purescript-tuples": "^0.2.3"
2124
}
2225
}

package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
{
2-
"name": "purescript-unfoldable",
3-
"version": "0.1.0",
4-
"description": "Unfoldable Functors",
5-
"main": "",
62
"private": true,
7-
"author": "Phil Freeman",
8-
"license": "MIT",
9-
"dependencies": {
10-
"grunt": "~0.4.4",
11-
"grunt-contrib-clean": "~0.5.0",
12-
"grunt-purescript": "~0.5.0"
3+
"devDependencies": {
4+
"grunt": "^0.4.5",
5+
"grunt-contrib-clean": "^0.5.0",
6+
"grunt-execute": "^0.2.2",
7+
"grunt-jsvalidate": "^0.2.2",
8+
"grunt-purescript": "^0.6.0"
139
}
1410
}

0 commit comments

Comments
 (0)