git ssb

0+

ev / microbay



forked from Dominic / patchbay

Commit 8435ae7885131874152a7f03cd5055903c5b0906

only load .js files

Dominic Tarr committed on 8/1/2016, 11:54:50 PM
Parent: 7e6b652a5696469876bec17b9d29a4e649627d76

Files changed

build.jschanged
modules/index.jschanged
build.jsView
@@ -3,9 +3,9 @@
33 'module.exports = {\n'
44 +
55 require('fs').readdirSync(require('path').join(__dirname, 'modules'))
66 .filter(function (file) {
7- return file !== '_index.js'
7+ return file !== '_index.js' && /\.js$/.test(file)
88 })
99 .map(function (file) {
1010 return ' '+JSON.stringify(file) + ": require('./"+file+"')"
1111 }).join(',\n')
modules/index.jsView
@@ -1,8 +1,8 @@
11 var fs = require('fs')
22
33 fs.readdirSync(__dirname).forEach(function (e) {
4- if(e !== '_index.js')
4+ if(e !== '_index.js' && /\js$/.test(e))
55 exports[e] = require('./'+e)
66 })
77
88

Built with git-ssb-web