"version": "0.0.0",
"private": true,
"scripts": {
- "build": "mkdir -p output && ./node_modules/.bin/webpack --progress --colors",
- "build:watch": "mkdir -p output && ./node_modules/.bin/webpack --progress --colors --watch",
+ "build": "webpack --progress --colors --bail",
+ "build:watch": "webpack --progress --colors --watch",
"run": "node bundle.js",
"clean": "rm -rf bower_components && rm -rf bundle.js && rm -rf node_modules && rm -rf output"
},
"license": "MIT",
"devDependencies": {
"node-libs-browser": "^0.5.2",
+ "purescript-webpack-plugin": "^0.1.0",
"purs-loader": "file:../",
- "webpack": "^1.10.1"
+ "webpack": "^1.12.9"
}
}
-var path = require('path');
+'use strict';
-var srcs = ['src[]=bower_components/purescript-*/src/**/*.purs', 'src[]=src/**/*.purs'];
+var PurescriptWebpackPlugin = require('purescript-webpack-plugin');
-var ffis = ['ffi[]=bower_components/purescript-*/src/**/*.js', 'ffi[]=src/**/*FFI.js'];
+var src = ['bower_components/purescript-*/src/**/*.purs', 'src/**/*.purs'];
-var output = 'output';
+var ffi = ['bower_components/purescript-*/src/**/*.js', 'src/**/*FFI.js'];
var modulesDirectories = [
'node_modules',
- 'bower_components/purescript-prelude/src'
+ 'bower_components'
];
var config
, filename: 'bundle.js'
}
, module: { loaders: [ { test: /\.purs$/
- , loader: 'purs-loader?output=' + output + '&' + srcs.concat(ffis).join('&')
+ , loader: 'purs-loader'
} ] }
- , resolve: { modulesDirectories: modulesDirectories
- , extensions: ['', '.js']
- }
- , resolveLoader: { root: path.join(__dirname, 'node_modules') }
+ , resolve: { modulesDirectories: modulesDirectories }
+ , plugins: [ new PurescriptWebpackPlugin({src: src, ffi: ffi}) ]
}
;