diff options
author | eric <thul.eric@gmail.com> | 2015-04-12 11:35:25 -0400 |
---|---|---|
committer | eric <thul.eric@gmail.com> | 2015-04-12 11:35:25 -0400 |
commit | 7d58cf78c770ef95858f90c6e89bd18653657a82 (patch) | |
tree | ebae7549b1a1b14e11fd5e2ad4dd66d901af81c8 /example | |
parent | 18ced1e0f031df444a5d85d72cd6843d826fef38 (diff) | |
parent | 94a23e744896b4440794de5d6cffedff1a1a2d56 (diff) | |
download | purs-loader-7d58cf78c770ef95858f90c6e89bd18653657a82.tar.gz purs-loader-7d58cf78c770ef95858f90c6e89bd18653657a82.tar.zst purs-loader-7d58cf78c770ef95858f90c6e89bd18653657a82.zip |
Merge pull request #8 from ethul/topic/purescript-rewrite
Topic/purescript rewrite
Diffstat (limited to 'example')
-rw-r--r-- | example/bower.json | 8 | ||||
-rw-r--r-- | example/package.json | 6 | ||||
-rw-r--r-- | example/src/entry.js | 6 | ||||
-rw-r--r-- | example/webpack.config.js | 30 |
4 files changed, 22 insertions, 28 deletions
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 @@ | |||
1 | var test = require('purs?output=output!./Test.purs'); | 1 | var test = require('./Test'); |
2 | 2 | ||
3 | var foo = require('purs?output=output!./Foo.purs'); | 3 | var foo = require('./Foo'); |
4 | 4 | ||
5 | var baz = require('purs?output=output!./Foo/Baz.purs'); | 5 | var baz = require('./Foo/Baz'); |
6 | 6 | ||
7 | console.log(test, foo, baz); | 7 | console.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 @@ | |||
1 | var path = require('path'); | 1 | var path = require('path'); |
2 | 2 | ||
3 | module.exports = { | 3 | var 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 | |||
18 | module.exports = config; | ||