aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoreric thul <thul.eric@gmail.com>2015-01-13 22:03:00 -0500
committereric thul <thul.eric@gmail.com>2015-01-13 22:03:00 -0500
commitf9d1a6b3c9833036e27920171e45bb73f1764fa3 (patch)
treee5db46409894da81ca1f4c39b696c94fd1afab82
parentba586c433f799db1f2b8161e188b1e1e0ae7c079 (diff)
downloadpurs-loader-f9d1a6b3c9833036e27920171e45bb73f1764fa3.tar.gz
purs-loader-f9d1a6b3c9833036e27920171e45bb73f1764fa3.tar.zst
purs-loader-f9d1a6b3c9833036e27920171e45bb73f1764fa3.zip
Adding basic example
-rw-r--r--.gitignore3
-rw-r--r--.npmignore1
-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
8 files changed, 63 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index c2658d7..63d8f4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,4 @@
1node_modules/ 1node_modules/
2example/node_modules/
3example/dist/
4example/output/
diff --git a/.npmignore b/.npmignore
new file mode 100644
index 0000000..90c978b
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1 @@
example/
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};