Skip to content

Commit

Permalink
Use Clojure CLI for example project
Browse files Browse the repository at this point in the history
  • Loading branch information
athos committed Nov 1, 2019
1 parent 7233f63 commit b8dcef8
Show file tree
Hide file tree
Showing 6 changed files with 367 additions and 18 deletions.
1 change: 1 addition & 0 deletions examples/puppeteer-example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/target
/classes
/checkouts
/.cpcache
pom.xml
pom.xml.asc
*.jar
Expand Down
24 changes: 21 additions & 3 deletions examples/puppeteer-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,27 @@

An example project to demonstrate how to use [Puppeteer](https://github.com/GoogleChrome/puppeteer) through `kitchen-async`.

## Requirements

- [Clojure CLI](https://clojure.org/guides/deps_and_cli)
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)

## Setup

```
$ npm install
```

## Usage

```clj
$ lein cljsbuild once
$ node target/main.js
### Starting REPL

```
$ clj -Acljs
```

### Running example code

```
$ clj -Amain
```
6 changes: 6 additions & 0 deletions examples/puppeteer-example/deps.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{:paths ["src"]
:deps {org.clojure/clojurescript {:mvn/version "1.10.520"}
kitchen-async {:mvn/version "0.1.0-SNAPSHOT"}}
:aliases {:cljs {:main-opts ["-m" "cljs.main" "-re" "node"]}
:main {:main-opts ["-m" "cljs.main" "-re" "node"
"-m" "puppeteer-example.main"]}}}
315 changes: 315 additions & 0 deletions examples/puppeteer-example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions examples/puppeteer-example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"puppeteer": "^2.0.0"
}
}
Loading

0 comments on commit b8dcef8

Please sign in to comment.