diff options
author | eric thul <thul.eric@gmail.com> | 2015-01-13 22:03:09 -0500 |
---|---|---|
committer | eric thul <thul.eric@gmail.com> | 2015-01-13 22:03:09 -0500 |
commit | ebf06d39692b92058df757b2ec0009f0935d4563 (patch) | |
tree | e5db46409894da81ca1f4c39b696c94fd1afab82 /example | |
parent | ba586c433f799db1f2b8161e188b1e1e0ae7c079 (diff) | |
parent | f9d1a6b3c9833036e27920171e45bb73f1764fa3 (diff) | |
download | purs-loader-ebf06d39692b92058df757b2ec0009f0935d4563.tar.gz purs-loader-ebf06d39692b92058df757b2ec0009f0935d4563.tar.zst purs-loader-ebf06d39692b92058df757b2ec0009f0935d4563.zip |
Merge branch 'topic/example'
Diffstat (limited to 'example')
-rw-r--r-- | example/README.md | 5 | ||||
-rw-r--r-- | example/index.html | 18 | ||||
-rw-r--r-- | example/package.json | 14 | ||||
-rw-r--r-- | example/src/Test.purs | 3 | ||||
-rw-r--r-- | example/src/entry.js | 3 | ||||
-rw-r--r-- | example/webpack.config.js | 16 |
6 files changed, 59 insertions, 0 deletions
diff --git a/example/README.md b/example/README.md new file mode 100644 index 0000000..ae798e7 --- /dev/null +++ b/example/README.md | |||
@@ -0,0 +1,5 @@ | |||
1 | ```bash | ||
2 | npm install | ||
3 | npm run-script webpack | ||
4 | npm run-script run | ||
5 | ``` | ||
diff --git a/example/index.html b/example/index.html new file mode 100644 index 0000000..8db646e --- /dev/null +++ b/example/index.html | |||
@@ -0,0 +1,18 @@ | |||
1 | <!doctype html> | ||
2 | <html class="no-js" lang=""> | ||
3 | <head> | ||
4 | <meta charset="utf-8"> | ||
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
6 | <title></title> | ||
7 | <meta name="description" content=""> | ||
8 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
9 | </head> | ||
10 | <body> | ||
11 | <!--[if lt IE 8]> | ||
12 | <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> | ||
13 | <![endif]--> | ||
14 | <!-- Add your site or application content here --> | ||
15 | <p>Hello world! This is HTML5 Boilerplate.</p> | ||
16 | <script src="dist/app.js"></script> | ||
17 | </body> | ||
18 | </html> | ||
diff --git a/example/package.json b/example/package.json new file mode 100644 index 0000000..b2d0d86 --- /dev/null +++ b/example/package.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "name": "example", | ||
3 | "version": "0.0.0", | ||
4 | "private": true, | ||
5 | "scripts": { | ||
6 | "webpack": "./node_modules/.bin/webpack", | ||
7 | "run": "node dist/app.js" | ||
8 | }, | ||
9 | "license": "MIT", | ||
10 | "devDependencies": { | ||
11 | "purs-loader": "0.0.2", | ||
12 | "webpack": "^1.4.15" | ||
13 | } | ||
14 | } | ||
diff --git a/example/src/Test.purs b/example/src/Test.purs new file mode 100644 index 0000000..7409c6e --- /dev/null +++ b/example/src/Test.purs | |||
@@ -0,0 +1,3 @@ | |||
1 | module Test (test) where | ||
2 | |||
3 | test = "a" | ||
diff --git a/example/src/entry.js b/example/src/entry.js new file mode 100644 index 0000000..65119f6 --- /dev/null +++ b/example/src/entry.js | |||
@@ -0,0 +1,3 @@ | |||
1 | var test = require('purs?no-prelude&output=output!./Test.purs'); | ||
2 | |||
3 | console.log(test); | ||
diff --git a/example/webpack.config.js b/example/webpack.config.js new file mode 100644 index 0000000..629138a --- /dev/null +++ b/example/webpack.config.js | |||
@@ -0,0 +1,16 @@ | |||
1 | var path = require('path'); | ||
2 | |||
3 | module.exports = { | ||
4 | entry: './src/entry', | ||
5 | output: { | ||
6 | path: path.join(__dirname, 'dist'), | ||
7 | filename: 'app.js' | ||
8 | }, | ||
9 | resolve: { | ||
10 | modulesDirectories: [ | ||
11 | 'node_modules', | ||
12 | 'web_modules', | ||
13 | 'output' | ||
14 | ] | ||
15 | } | ||
16 | }; | ||