aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoreric thul <thul.eric@gmail.com>2015-04-12 11:08:05 -0400
committereric thul <thul.eric@gmail.com>2015-04-12 11:24:24 -0400
commit464355c740940df632eef951c6c84eb2767b5ab3 (patch)
tree7502e52f50bc36c34ff83dc710c1e0904c90fdc5
parentc194f84cab66fa6e18b78c32f9cdf2bddf8d1e68 (diff)
downloadpurs-loader-464355c740940df632eef951c6c84eb2767b5ab3.tar.gz
purs-loader-464355c740940df632eef951c6c84eb2767b5ab3.tar.zst
purs-loader-464355c740940df632eef951c6c84eb2767b5ab3.zip
Updating example and adding publishing
Resolves #7
-rw-r--r--.gitignore2
-rw-r--r--LICENSE2
-rw-r--r--README.md2
-rw-r--r--example/bower.json8
-rw-r--r--example/package.json6
-rw-r--r--example/src/entry.js6
-rw-r--r--example/webpack.config.js30
-rw-r--r--package.json3
8 files changed, 27 insertions, 32 deletions
diff --git a/.gitignore b/.gitignore
index e58d33a..dd8eead 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,7 @@ index.js
5node_modules/ 5node_modules/
6bower_components/ 6bower_components/
7build/ 7build/
8example/bundle.js
8example/node_modules/ 9example/node_modules/
9example/bower_components/ 10example/bower_components/
10example/dist/
11example/output/ 11example/output/
diff --git a/LICENSE b/LICENSE
index aaed7de..05b0016 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
1Copyright (c) 2014 Eric Thul 1Copyright (c) 2015 Eric Thul
2 2
3Permission is hereby granted, free of charge, to any person obtaining a 3Permission is hereby granted, free of charge, to any person obtaining a
4copy of this software and associated documentation files (the 4copy of this software and associated documentation files (the
diff --git a/README.md b/README.md
index dcbedf2..ee96448 100644
--- a/README.md
+++ b/README.md
@@ -27,4 +27,4 @@ npm install purs-loader --save-dev
27 27
28## Example 28## Example
29 29
30See the [example](https://github.com/ethul/purs-loader/tree/topic/bower-components/example) directory for a complete example. 30See the [example](https://github.com/ethul/purs-loader/tree/master/example) directory for a complete example.
diff --git a/example/bower.json b/example/bower.json
index 8d71688..b4a1c78 100644
--- a/example/bower.json
+++ b/example/bower.json
@@ -1,14 +1,6 @@
1{ 1{
2 "name": "example", 2 "name": "example",
3 "license": "MIT",
4 "private": true, 3 "private": true,
5 "ignore": [
6 "**/.*",
7 "node_modules",
8 "bower_components",
9 "test",
10 "tests"
11 ],
12 "devDependencies": { 4 "devDependencies": {
13 "purescript-maybe": "~0.2.1" 5 "purescript-maybe": "~0.2.1"
14 } 6 }
diff --git a/example/package.json b/example/package.json
index 6b0c04c..915eb27 100644
--- a/example/package.json
+++ b/example/package.json
@@ -4,12 +4,12 @@
4 "private": true, 4 "private": true,
5 "scripts": { 5 "scripts": {
6 "webpack": "./node_modules/.bin/webpack", 6 "webpack": "./node_modules/.bin/webpack",
7 "run": "node dist/app.js", 7 "run": "node bundle.js",
8 "clean": "rm -rf bower_components && rm -rf dist && rm -rf node_modules && rm -rf output" 8 "clean": "rm -rf bower_components && rm -rf bundle.js && rm -rf node_modules && rm -rf output"
9 }, 9 },
10 "license": "MIT", 10 "license": "MIT",
11 "devDependencies": { 11 "devDependencies": {
12 "purs-loader": "file:../", 12 "purs-loader": "file:../",
13 "webpack": "^1.4.15" 13 "webpack": "^1.8.4"
14 } 14 }
15} 15}
diff --git a/example/src/entry.js b/example/src/entry.js
index 160bee4..cc09034 100644
--- a/example/src/entry.js
+++ b/example/src/entry.js
@@ -1,7 +1,7 @@
1var test = require('purs?output=output!./Test.purs'); 1var test = require('./Test');
2 2
3var foo = require('purs?output=output!./Foo.purs'); 3var foo = require('./Foo');
4 4
5var baz = require('purs?output=output!./Foo/Baz.purs'); 5var baz = require('./Foo/Baz');
6 6
7console.log(test, foo, baz); 7console.log(test, foo, baz);
diff --git a/example/webpack.config.js b/example/webpack.config.js
index 629138a..19997f3 100644
--- a/example/webpack.config.js
+++ b/example/webpack.config.js
@@ -1,16 +1,18 @@
1var path = require('path'); 1var path = require('path');
2 2
3module.exports = { 3var config
4 entry: './src/entry', 4 = { entry: './src/entry'
5 output: { 5 , output: { path: __dirname
6 path: path.join(__dirname, 'dist'), 6 , filename: 'bundle.js'
7 filename: 'app.js' 7 }
8 }, 8 , module: { loaders: [ { test: /\.purs$/, loader: 'purs-loader' } ] }
9 resolve: { 9 , resolve: { modulesDirectories: [ 'node_modules',
10 modulesDirectories: [ 10 'output'
11 'node_modules', 11 ]
12 'web_modules', 12 , extensions: ['', '.js', '.purs']
13 'output' 13 }
14 ] 14 , resolveLoader: { root: path.join(__dirname, 'node_modules') }
15 } 15 }
16}; 16 ;
17
18module.exports = config;
diff --git a/package.json b/package.json
index 56c6b39..d7e986f 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,8 @@
12 "build": "npm run-script build:compile && npm run-script build:package", 12 "build": "npm run-script build:compile && npm run-script build:package",
13 "build:compile": "gulp build", 13 "build:compile": "gulp build",
14 "build:package": "./node_modules/.bin/webpack --progress --colors --profile --bail", 14 "build:package": "./node_modules/.bin/webpack --progress --colors --profile --bail",
15 "build:json": "./node_modules/.bin/webpack --progress --colors --profile --bail --json > index.json" 15 "build:json": "./node_modules/.bin/webpack --progress --colors --profile --bail --json > index.json",
16 "prepublish": "npm run-script build"
16 }, 17 },
17 "files": [ 18 "files": [
18 "index.js" 19 "index.js"