]> git.immae.eu Git - github/fretlink/purs-loader.git/commitdiff
Adding basic example
authoreric thul <thul.eric@gmail.com>
Wed, 14 Jan 2015 03:03:00 +0000 (22:03 -0500)
committereric thul <thul.eric@gmail.com>
Wed, 14 Jan 2015 03:03:00 +0000 (22:03 -0500)
.gitignore
.npmignore [new file with mode: 0644]
example/README.md [new file with mode: 0644]
example/index.html [new file with mode: 0644]
example/package.json [new file with mode: 0644]
example/src/Test.purs [new file with mode: 0644]
example/src/entry.js [new file with mode: 0644]
example/webpack.config.js [new file with mode: 0644]

index c2658d7d1b31848c3b71960543cb0368e56cd4c7..63d8f4cedda4b3e593d05727b3493ea00a91b072 100644 (file)
@@ -1 +1,4 @@
 node_modules/
+example/node_modules/
+example/dist/
+example/output/
diff --git a/.npmignore b/.npmignore
new file mode 100644 (file)
index 0000000..90c978b
--- /dev/null
@@ -0,0 +1 @@
+example/
diff --git a/example/README.md b/example/README.md
new file mode 100644 (file)
index 0000000..ae798e7
--- /dev/null
@@ -0,0 +1,5 @@
+```bash
+npm install
+npm run-script webpack
+npm run-script run
+```
diff --git a/example/index.html b/example/index.html
new file mode 100644 (file)
index 0000000..8db646e
--- /dev/null
@@ -0,0 +1,18 @@
+<!doctype html>
+<html class="no-js" lang="">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title></title>
+    <meta name="description" content="">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+  </head>
+  <body>
+    <!--[if lt IE 8]>
+        <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>
+    <![endif]-->
+    <!-- Add your site or application content here -->
+    <p>Hello world! This is HTML5 Boilerplate.</p>
+    <script src="dist/app.js"></script>
+  </body>
+</html>
diff --git a/example/package.json b/example/package.json
new file mode 100644 (file)
index 0000000..b2d0d86
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "name": "example",
+  "version": "0.0.0",
+  "private": true,
+  "scripts": {
+    "webpack": "./node_modules/.bin/webpack",
+    "run": "node dist/app.js"
+  },
+  "license": "MIT",
+  "devDependencies": {
+    "purs-loader": "0.0.2",
+    "webpack": "^1.4.15"
+  }
+}
diff --git a/example/src/Test.purs b/example/src/Test.purs
new file mode 100644 (file)
index 0000000..7409c6e
--- /dev/null
@@ -0,0 +1,3 @@
+module Test (test) where
+
+test = "a"
diff --git a/example/src/entry.js b/example/src/entry.js
new file mode 100644 (file)
index 0000000..65119f6
--- /dev/null
@@ -0,0 +1,3 @@
+var test = require('purs?no-prelude&output=output!./Test.purs');
+
+console.log(test);
diff --git a/example/webpack.config.js b/example/webpack.config.js
new file mode 100644 (file)
index 0000000..629138a
--- /dev/null
@@ -0,0 +1,16 @@
+var path = require('path');
+
+module.exports = {
+  entry: './src/entry',
+  output: {
+    path: path.join(__dirname, 'dist'),
+    filename: 'app.js'
+  },
+  resolve: {
+    modulesDirectories: [
+      'node_modules',
+      'web_modules',
+      'output'
+    ]
+  }
+};