Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spago parcel build #2

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@
/.purs*
/.psa*

/html/index.js
dist
.cache
.spago
.parcel-cache
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,21 @@ We have implemented local storage in the browser for saving tasks for all UI exa

## Build instructions

### With pulp and bower and browserify

In order to build this application one must have the [PureScript](http://www.purescript.org/) compiler (version 0.11.7) installed, as well as the [npm](https://www.npmjs.com/) and [bower](https://bower.io/) tools for package management.

After installing the prerequisites, simply run

```
make
```

### With spago and parcel

`npm install` will install npm packages and purescript packages.
`npm start` will start a development server with hot reloading (with [editor integration or `spago build --watch`](https://github.com/f-f/purescript-react-basic-todomvc#development))
`npm build-production` will output a bundle in `dist`

More [about the build environment and spago](https://github.com/purescript/spago/blob/master/README.md#why-we-dont-resolve-js-dependencies-when-bundling-and-how-to-do-it)

35 changes: 19 additions & 16 deletions html/index.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>ToDos</title>
<link href="index.css" type="text/css" rel="stylesheet" />
</head>
<body>
<header>
<h1>todos</h1>
</header>
<div id="app"></div>
<footer>
<small>Click on a task to mark it done</small>
<small>Created by <a href="github.com/arthur-xavier">arthur-xavier</a></small>
<small>Inspired by <a href="http://todomvc.com">TodoMVC</a></small>
</footer>
<script src="index.js"></script>
</body>
<head>
<title>ToDos</title>
<link href="index.css" type="text/css" rel="stylesheet" />
</head>
<body>
<header>
<h1>todos</h1>
</header>
<div id="app"></div>
<footer>
<small>Click on a task to mark it done</small>
<small
>Created by
<a href="https://github.com/arthur-xavier">arthur-xavier</a></small
>
<small>Inspired by <a href="http://todomvc.com">TodoMVC</a></small>
</footer>
<script src="index.js"></script>
</body>
</html>
3 changes: 3 additions & 0 deletions html/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
var Main = require("../output/Main");

Main.main();
Loading