Commit c4199c8e authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[example] added

parent 15828e7b
......@@ -2,8 +2,6 @@
## Building
Use `direnv` and build with `nix`:
``` sh
psc-package build
yarn spago build
```
/bower_components/
/node_modules/
/.pulp-cache/
/output/
/generated-docs/
/.psc-package/
/.psc*
/.purs*
/.psa*
/.spago
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Purescript Reactix D3 example</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<script type="text/javascript" src="index.js"></script>
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">
You are using an <strong>outdated</strong> browser. Please
<a href="http://browsehappy.com/">upgrade your browser</a> to improve
your experience.
</p>
<![endif]-->
</body>
</html>
// Generated by purs bundle 0.14.1
var PS = {};
(function(exports) {
"use strict";
exports.log = function (s) {
return function () {
console.log(s);
};
};
})(PS["Effect.Console"] = PS["Effect.Console"] || {});
(function($PS) {
// Generated by purs version 0.14.1
"use strict";
$PS["Effect.Console"] = $PS["Effect.Console"] || {};
var exports = $PS["Effect.Console"];
var $foreign = $PS["Effect.Console"];
exports["log"] = $foreign.log;
})(PS);
(function($PS) {
// Generated by purs version 0.14.1
"use strict";
$PS["Main"] = $PS["Main"] || {};
var exports = $PS["Main"];
var Effect_Console = $PS["Effect.Console"];
var main = Effect_Console.log("\ud83c\udf5d");
exports["main"] = main;
})(PS);
PS["Main"].main();
\ No newline at end of file
{
"name": "purescript-reactix-d3-example",
"version": "0.0.1",
"description": "Purescript Reactix bindings for D3 - example",
"author": "Przemysław Kamiński",
"license": "MPL-2.0",
"devDependencies": {
"@testing-library/react": "^8.0.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-mocha": "^1.3.0",
"mocha": "^7.0.0",
"psc-package": "^4.0.1",
"pulp": "^15.0.0",
"purescript": "^0.14.1",
"spago": "^0.20.3"
}
}
{-
Welcome to your new Dhall package-set!
Below are instructions for how to edit this file for most use
cases, so that you don't need to know Dhall to use it.
## Use Cases
Most will want to do one or both of these options:
1. Override/Patch a package's dependency
2. Add a package not already in the default package set
This file will continue to work whether you use one or both options.
Instructions for each option are explained below.
### Overriding/Patching a package
Purpose:
- Change a package's dependency to a newer/older release than the
default package set's release
- Use your own modified version of some dependency that may
include new API, changed API, removed API by
using your custom git repo of the library rather than
the package set's repo
Syntax:
where `entityName` is one of the following:
- dependencies
- repo
- version
-------------------------------
let upstream = --
in upstream
with packageName.entityName = "new value"
-------------------------------
Example:
-------------------------------
let upstream = --
in upstream
with halogen.version = "master"
with halogen.repo = "https://example.com/path/to/git/repo.git"
with halogen-vdom.version = "v4.0.0"
with halogen-vdom.dependencies = [ "extra-dependency" ] # halogen-vdom.dependencies
-------------------------------
### Additions
Purpose:
- Add packages that aren't already included in the default package set
Syntax:
where `<version>` is:
- a tag (i.e. "v4.0.0")
- a branch (i.e. "master")
- commit hash (i.e. "701f3e44aafb1a6459281714858fadf2c4c2a977")
-------------------------------
let upstream = --
in upstream
with new-package-name =
{ dependencies =
[ "dependency1"
, "dependency2"
]
, repo =
"https://example.com/path/to/git/repo.git"
, version =
"<version>"
}
-------------------------------
Example:
-------------------------------
let upstream = --
in upstream
with benchotron =
{ dependencies =
[ "arrays"
, "exists"
, "profunctor"
, "strings"
, "quickcheck"
, "lcg"
, "transformers"
, "foldable-traversable"
, "exceptions"
, "node-fs"
, "node-buffer"
, "node-readline"
, "datetime"
, "now"
]
, repo =
"https://github.com/hdgarrood/purescript-benchotron.git"
, version =
"v7.0.0"
}
-------------------------------
-}
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.14.1-20210516/packages.dhall sha256:f5e978371d4cdc4b916add9011021509c8d869f4c3f6d0d2694c0e03a85046c8
in upstream
with reactix-d3 = ../spago.dhall as Location
{-
Welcome to a Spago project!
You can edit this file as you like.
Need help? See the following resources:
- Spago documentation: https://github.com/purescript/spago
- Dhall language tour: https://docs.dhall-lang.org/tutorials/Language-Tour.html
When creating a new Spago project, you can use
`spago init --no-comments` or `spago init -C`
to generate this file without the comments in this block.
-}
{ name = "example"
, dependencies = [ "console", "effect", "prelude", "psci-support" ]
, packages = ./packages.dhall
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
}
module Main where
import Prelude
import Effect (Effect)
import Effect.Console (log)
main :: Effect Unit
main = do
log "🍝"
module Test.Main where
import Prelude
import Effect (Effect)
import Effect.Class.Console (log)
main :: Effect Unit
main = do
log "🍝"
log "You should add some tests."
This source diff could not be displayed because it is too large. You can view the blob instead.
{-
Welcome to your new Dhall package-set!
Below are instructions for how to edit this file for most use
cases, so that you don't need to know Dhall to use it.
## Use Cases
Most will want to do one or both of these options:
1. Override/Patch a package's dependency
2. Add a package not already in the default package set
This file will continue to work whether you use one or both options.
Instructions for each option are explained below.
### Overriding/Patching a package
Purpose:
- Change a package's dependency to a newer/older release than the
default package set's release
- Use your own modified version of some dependency that may
include new API, changed API, removed API by
using your custom git repo of the library rather than
the package set's repo
Syntax:
where `entityName` is one of the following:
- dependencies
- repo
- version
-------------------------------
let upstream = --
in upstream
with packageName.entityName = "new value"
-------------------------------
Example:
-------------------------------
let upstream = --
in upstream
with halogen.version = "master"
with halogen.repo = "https://example.com/path/to/git/repo.git"
with halogen-vdom.version = "v4.0.0"
with halogen-vdom.dependencies = [ "extra-dependency" ] # halogen-vdom.dependencies
-------------------------------
### Additions
Purpose:
- Add packages that aren't already included in the default package set
Syntax:
where `<version>` is:
- a tag (i.e. "v4.0.0")
- a branch (i.e. "master")
- commit hash (i.e. "701f3e44aafb1a6459281714858fadf2c4c2a977")
-------------------------------
let upstream = --
in upstream
with new-package-name =
{ dependencies =
[ "dependency1"
, "dependency2"
]
, repo =
"https://example.com/path/to/git/repo.git"
, version =
"<version>"
}
-------------------------------
Example:
-------------------------------
let upstream = --
in upstream
with benchotron =
{ dependencies =
[ "arrays"
, "exists"
, "profunctor"
, "strings"
, "quickcheck"
, "lcg"
, "transformers"
, "foldable-traversable"
, "exceptions"
, "node-fs"
, "node-buffer"
, "node-readline"
, "datetime"
, "now"
]
, repo =
"https://github.com/hdgarrood/purescript-benchotron.git"
, version =
"v7.0.0"
}
-------------------------------
-}
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.14.1-20210516/packages.dhall sha256:f5e978371d4cdc4b916add9011021509c8d869f4c3f6d0d2694c0e03a85046c8
let additions =
{ dom-simple =
{ dependencies =
[ "console"
, "effect"
, "functions"
, "nullable"
, "prelude"
, "spec"
, "spec-mocha"
, "unsafe-coerce"
]
, repo = "https://github.com/poorscript/purescript-dom-simple"
, version = "v0.2.7"
}
, ffi-simple =
{ dependencies =
[ "prelude"
, "effect"
, "maybe"
, "functions"
, "nullable"
, "unsafe-coerce"
]
, repo = "https://github.com/poorscript/purescript-ffi-simple"
, version = "v0.2.10"
}
, inflection =
{ dependencies = [ "functions" ]
, repo = "https://github.com/athanclark/purescript-inflection"
, version = "v1.0.0"
}
, spec-mocha =
{ dependencies =
[ "console", "foldable-traversable", "exceptions", "spec" ]
, repo = "https://github.com/purescript-spec/purescript-spec-mocha"
, version = "v4.0.0"
}
, reactix =
{ dependencies =
[ "aff"
, "dom-simple"
, "effect"
, "ffi-simple"
, "functions"
, "newtype"
, "nullable"
, "prelude"
, "psci-support"
, "refs"
, "spec"
, "spec-mocha"
, "unsafe-coerce"
]
, repo = "https://github.com/poorscript/purescript-reactix/"
, version = "v0.4.11"
}
}
in upstream // additions
{
"name": "purescript-reactix-d3",
"set": "psc-0.14.1-20210516",
"source": "https://github.com/purescript/package-sets.git",
"depends": [
"effect",
"prelude"
]
}
{-
Welcome to a Spago project!
You can edit this file as you like.
Need help? See the following resources:
- Spago documentation: https://github.com/purescript/spago
- Dhall language tour: https://docs.dhall-lang.org/tutorials/Language-Tour.html
When creating a new Spago project, you can use
`spago init --no-comments` or `spago init -C`
to generate this file without the comments in this block.
-}
{ name = "purescript-reactix-d3"
, dependencies = [ "console", "effect", "prelude", "psci-support", "reactix" ]
, packages = ./packages.dhall
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
}
......@@ -3,5 +3,6 @@ module Graphics.D3.Reactix.Base
) where
import Effect (Effect)
import Reactix as R
foreign import data D3 :: Effect
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment