bd-autoload
Advanced tools
Comparing version 2.0.1 to 2.0.2
11
index.js
@@ -1,11 +0,10 @@ | ||
'use strict' | ||
const path = require('path') | ||
const fs = require('fs') | ||
module.exports = function (name = 'apps') { | ||
let dirname = path.dirname(process.mainModule.filename) | ||
let appPath = path.join(dirname, name) | ||
module.exports = (name = 'apps') => { | ||
const dirname = path.dirname(process.mainModule.filename) | ||
const appPath = path.join(dirname, name) | ||
if (fs.existsSync(appPath)) { | ||
let dirs = fs.readdirSync(appPath) | ||
let apps = {} | ||
const dirs = fs.readdirSync(appPath) | ||
const apps = {} | ||
dirs.forEach(value => { | ||
@@ -12,0 +11,0 @@ if (value.indexOf('.') !== 0) { |
{ | ||
"name": "bd-autoload", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "bd autoload helper", | ||
@@ -26,9 +26,6 @@ "main": "index.js", | ||
"devDependencies": { | ||
"eslint": "^4.19.1", | ||
"eslint-config-standard": "^11.0.0", | ||
"eslint-plugin-import": "^2.11.0", | ||
"eslint-plugin-node": "^5.2.1", | ||
"eslint-plugin-promise": "^3.7.0", | ||
"eslint-plugin-standard": "^3.0.1" | ||
"eslint": "^5.5.0", | ||
"eslint-config-blued": "0.0.17", | ||
"eslint-plugin-import": "^2.14.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
3
20
2453
6