Skip to content

Commit f769c7c

Browse files
committed
Add NPM package.json with build scripts and update instructions. epost#25
1 parent 9819b17 commit f769c7c

File tree

2 files changed

+51
-14
lines changed

2 files changed

+51
-14
lines changed

README.org

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,36 +13,36 @@ PureScript bindings for the [[https://www.npmjs.org/package/pg][pg library]] ([[
1313

1414
* Installation
1515

16-
I'll assume you have [[http://www.purescript.org/][PureScript]] and [[http://www.postgresql.org/][PostgreSQL]] installed. You'll also need [[https://github.com/bodil/pulp][purescript-pulp]] and [[https://www.npmjs.org/package/pg][pg]]:
16+
Clone the project and install its dependencies:
1717

1818
#+begin_src bash
19-
npm install pg
20-
npm install -g pulp
19+
git clone https://github.com/epost/purescript-node-postgres
20+
cd purescript-node-postgres
21+
npm install
2122
#+end_src
2223

23-
Clone the project:
24+
* Building
25+
26+
Build:
2427

2528
#+begin_src bash
26-
git clone https://github.com/epost/purescript-node-postgres
27-
cd purescript-node-postgres
29+
npm run build
2830
#+end_src
2931

30-
Create a Postgres database and run the tests:
32+
* Testing
33+
34+
Assuming you have [[http://www.postgresql.org/][PostgreSQL]] installed, create a database with some test data:
3135

3236
#+begin_src bash
3337
psql --command="create database test"
3438
psql --command="create user testuser"
35-
cat schema.sql | psql --username=testuser test
39+
psql --username=testuser test -f schema.sql
3640
#+end_src
3741

38-
* Building and running
39-
40-
Let's run some tests:
42+
Then run the tests:
4143

4244
#+begin_src bash
43-
bower install
44-
npm install
45-
pulp test
45+
npm run test
4646
#+end_src
4747

4848
* Documentation

package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "purescript-node-postgres",
3+
"version": "5.0.0",
4+
"description": "PureScript bindings for the pg PostgreSQL library",
5+
"main": "index.js",
6+
"directories": {
7+
"test": "test"
8+
},
9+
"scripts": {
10+
"postinstall": "PATH=node_modules/.bin:$PATH bower install",
11+
"build": "PATH=node_modules/.bin:$PATH pulp build",
12+
"test": "PATH=node_modules/.bin:$PATH pulp test"
13+
},
14+
"repository": {
15+
"type": "git",
16+
"url": "git+https://github.com/epost/purescript-node-postgres.git"
17+
},
18+
"keywords": [
19+
"postgres",
20+
"database",
21+
"sql"
22+
],
23+
"author": "Erik Post",
24+
"license": "MIT",
25+
"bugs": {
26+
"url": "https://github.com/epost/purescript-node-postgres/issues"
27+
},
28+
"homepage": "https://github.com/epost/purescript-node-postgres#readme",
29+
"dependencies": {
30+
"pg": "^7.10.0"
31+
},
32+
"devDependencies": {
33+
"bower": "^1.8.8",
34+
"pulp": "^12.4.2",
35+
"purescript": "^0.12.5"
36+
}
37+
}

0 commit comments

Comments
 (0)