diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | LICENSE | 2 | ||||
-rw-r--r-- | README.md | 2 | ||||
-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 | ||||
-rw-r--r-- | package.json | 3 |
8 files changed, 27 insertions, 32 deletions
@@ -5,7 +5,7 @@ index.js | |||
5 | node_modules/ | 5 | node_modules/ |
6 | bower_components/ | 6 | bower_components/ |
7 | build/ | 7 | build/ |
8 | example/bundle.js | ||
8 | example/node_modules/ | 9 | example/node_modules/ |
9 | example/bower_components/ | 10 | example/bower_components/ |
10 | example/dist/ | ||
11 | example/output/ | 11 | example/output/ |
@@ -1,4 +1,4 @@ | |||
1 | Copyright (c) 2014 Eric Thul | 1 | Copyright (c) 2015 Eric Thul |
2 | 2 | ||
3 | Permission is hereby granted, free of charge, to any person obtaining a | 3 | Permission is hereby granted, free of charge, to any person obtaining a |
4 | copy of this software and associated documentation files (the | 4 | copy of this software and associated documentation files (the |
@@ -27,4 +27,4 @@ npm install purs-loader --save-dev | |||
27 | 27 | ||
28 | ## Example | 28 | ## Example |
29 | 29 | ||
30 | See the [example](https://github.com/ethul/purs-loader/tree/topic/bower-components/example) directory for a complete example. | 30 | See 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 @@ | |||
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; | ||
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" |