mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Clean up beefy usage
Now properly uses brfs transform so it can reload on state object changes.
This commit is contained in:
parent
9a46988ea8
commit
d1545245c2
@ -2,28 +2,18 @@ const beefy = require('beefy')
|
||||
const http = require('http')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const states = require('./states')
|
||||
|
||||
const statesPath = path.join(__dirname, 'states.js')
|
||||
const statesJson = JSON.stringify(states)
|
||||
fs.writeFileSync(statesPath, statesJson)
|
||||
|
||||
const port = 8124
|
||||
|
||||
const handler = beefy({
|
||||
entries: ['mocker.js']
|
||||
entries: {'mocker.js': 'bundle.js'}
|
||||
, cwd: __dirname
|
||||
, live: true
|
||||
, open: true
|
||||
, quiet: false
|
||||
, bundlerFlags: ['-t', 'brfs']
|
||||
})
|
||||
|
||||
console.dir(handler)
|
||||
|
||||
http.createServer(handler).listen(port)
|
||||
console.log(`Now listening on port ${port}`)
|
||||
|
||||
function on404(req, resp) {
|
||||
resp.writeHead(404, {})
|
||||
resp.end('sorry folks!')
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
"start": "gulp dev",
|
||||
"test": "mocha --require test/helper.js --compilers js:babel-register --recursive",
|
||||
"watch": "mocha watch --compilers js:babel-register --recursive",
|
||||
"ui": "cd development && node genStates.js && beefy mocker.js:bundle.js --live --open"
|
||||
"ui": "cd development && beefy mocker.js:bundle.js --live --open"
|
||||
},
|
||||
"browserify": {
|
||||
"transform": [
|
||||
@ -24,8 +24,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"async": "^1.5.2",
|
||||
"babel-preset-es2015": "^6.9.0",
|
||||
"babel-register": "^6.9.0",
|
||||
"browserify-derequire": "^0.9.4",
|
||||
"clone": "^1.0.2",
|
||||
"copy-to-clipboard": "^2.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user