git ssb

16+

Dominic / patchbay



Commit 7f9e188759b790087ad7ee3b6c49554a603e8fad

build with browelectrify instead of standard browserify

Dominic Tarr committed on 8/4/2016, 1:58:38 AM
Parent: 9abd057463439027a5ac4f40d5f7e5f0316deb6c

Files changed

build.jschanged
index.jschanged
package.jsonchanged
build.jsView
@@ -1,9 +1,17 @@
1 +var fs = require('fs')
2 +var path = require('path')
13
2-console.log(
4 +fs.writeFileSync(
5 + path.join(__dirname, 'style.css.json'),
6 + JSON.stringify(fs.readFileSync(path.join(__dirname, 'style.css'), 'utf8'))
7 +)
8 +
9 +
10 +fs.writeFileSync(path.join(__dirname, 'modules', '_index.js'),
311 'module.exports = {\n'
412 +
5- require('fs').readdirSync(require('path').join(__dirname, 'modules'))
13 + fs.readdirSync(path.join(__dirname, 'modules'))
614 .filter(function (file) {
715 return file !== '_index.js' && /\.js$/.test(file)
816 })
917 .map(function (file) {
@@ -11,5 +19,4 @@
1119 }).join(',\n')
1220 +
1321 '\n}'
1422 )
15-
index.jsView
@@ -25,10 +25,9 @@
2525 console.log(require('depject/graph')(modules))
2626 process.exit(0)
2727 }
2828
29-document.head.appendChild(
30- h('style', fs.readFileSync('./style.css', 'utf8')
31-))
29 +document.head.appendChild(h('style', require('./style.css.json')))
3230
3331 document.body.appendChild(modules['app.js'].app())
3432
33 +
package.jsonView
@@ -38,22 +38,22 @@
3838 "ssb-keys": "^6.0.0",
3939 "ssb-markdown": "^3.0.0",
4040 "ssb-mentions": "^0.1.0",
4141 "ssb-sort": "0.0.0",
42- "suggest-box": "^2.0.0",
42 + "suggest-box": "^2.2.1",
4343 "text-node-searcher": "^1.1.0"
4444 },
4545 "devDependencies": {
46- "brfs": "^1.4.3",
47- "indexhtmlify": "^1.2.1"
46 + "browselectrify": "^1.0.1"
4847 },
4948 "browser": {
5049 "./modules/index.js": "./modules/_index.js"
5150 },
5251 "scripts": {
53- "build": "node build.js > modules/_index.js && mkdir -p build && browserify -t brfs index.js > build/bundle.js && indexhtmlify < build/bundle.js > build/index.html",
52 + "build": "node build.js > modules/_index.js && mkdir -p build && browselectrify index.js > build/bundle.js",
5453 "graph": "node index.js | dot -Tsvg > graph.svg",
5554 "test": "set -e; for t in test/*.js; do node $t; done"
5655 },
5756 "author": "Dominic Tarr <dominic.tarr@gmail.com> (http://dominictarr.com)",
5857 "license": "MIT"
5958 }
59 +

Built with git-ssb-web