Skip to content

Commit

Permalink
Update docs etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
garyb committed Jan 30, 2015
1 parent 899c6a5 commit 1cabc29
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 6 deletions.
12 changes: 9 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ module.exports = function(grunt) {

pscMake: ["<%=libFiles%>"],
dotPsci: ["<%=libFiles%>"],
pscDocs: {
readme: {
src: "src/**/*.purs",
dest: "docs/Module.md"
}
},

psc: {
exampleTest: {
Expand All @@ -21,7 +27,7 @@ module.exports = function(grunt) {
dest: "tmp/Test.js"
}
},

copy: [
{
expand: true,
Expand All @@ -40,10 +46,10 @@ module.exports = function(grunt) {

grunt.loadNpmTasks("grunt-contrib-copy");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-execute")
grunt.loadNpmTasks("grunt-execute");
grunt.loadNpmTasks("grunt-purescript");

grunt.registerTask("make", ["pscMake", "dotPsci"]);
grunt.registerTask("make", ["pscMake", "dotPsci", "pscDocs"]);
grunt.registerTask("test", ["psc", "copy", "execute"]);
grunt.registerTask("default", ["clean", "make", "test"]);
};
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# purescript-virtual-dom

[virtual-dom](https://github.com/Matt-Esch/virtual-dom) bindings for PureScript
[virtual-dom](https://github.com/Matt-Esch/virtual-dom) bindings for PureScript.

This library is only aiming to provide basic `virtual-dom` functionality, with the intention that user-friendly libraries will be built on top of it to provide stronger typing, a `VTree` DSL, etc.

- [Module documentation](docs/Module.md)
9 changes: 7 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
"name": "purescript-virtual-dom",
"description": "virtual-dom bindings for PureScript",
"keywords": [
"purescript"
"purescript",
"virtual-dom"
],
"authors": [
"Gary Burgess <gary.burgess@gmail.com>",
"Daniel Austin <dan@fluffynukeit.com>"
],
"ignore": [
"**/.*",
Expand All @@ -17,6 +22,6 @@
],
"dependencies": {
"purescript-dom": "~0.1.1",
"purescript-maybe":"*"
"purescript-maybe":"~0.2.1"
}
}
73 changes: 73 additions & 0 deletions docs/Module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Module Documentation

## Module VirtualDOM

### Types

PatchObject represents an Array<VPatch>, where each VPatch is a patch
operation. See virtual-dom/docs.jsig for details.

data PatchObject :: *


### Type Class Instances


instance showPatchObject :: Show PatchObject


### Values


createElement :: VTree -> Node


diff :: VTree -> VTree -> PatchObject


patch :: forall e. PatchObject -> Node -> Eff (dom :: DOM | e) Node


## Module VirtualDOM.VTree

### Types


type TagName = String


data VHook :: *


data VTree :: *


### Type Class Instances


instance showVHook :: Show VHook


instance showVTree :: Show VTree


### Values

Render a VTree using custom logic function. The logic can examine the
previous VTree before returning the new (or same) one. The result of the
render function must be a vnode, vtext, or widget. This constraint is not
enforced by the types.

thunk :: (Maybe VTree -> VTree) -> VTree


vhook :: forall props. { | props } -> VHook


vnode :: forall props. TagName -> { | props } -> [VTree] -> VTree


vtext :: String -> VTree


widget :: forall props. { | props } -> VTree

0 comments on commit 1cabc29

Please sign in to comment.