aboutsummaryrefslogtreecommitdiffhomepage
path: root/example
diff options
context:
space:
mode:
authoreric thul <thul.eric@gmail.com>2015-01-13 22:03:09 -0500
committereric thul <thul.eric@gmail.com>2015-01-13 22:03:09 -0500
commitebf06d39692b92058df757b2ec0009f0935d4563 (patch)
treee5db46409894da81ca1f4c39b696c94fd1afab82 /example
parentba586c433f799db1f2b8161e188b1e1e0ae7c079 (diff)
parentf9d1a6b3c9833036e27920171e45bb73f1764fa3 (diff)
downloadpurs-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.md5
-rw-r--r--example/index.html18
-rw-r--r--example/package.json14
-rw-r--r--example/src/Test.purs3
-rw-r--r--example/src/entry.js3
-rw-r--r--example/webpack.config.js16
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
2npm install
3npm run-script webpack
4npm 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 @@
1module Test (test) where
2
3test = "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 @@
1var test = require('purs?no-prelude&output=output!./Test.purs');
2
3console.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 @@
1var path = require('path');
2
3module.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};