Skip to content
This repository was archived by the owner on Jun 29, 2022. It is now read-only.

Commit f7174eb

Browse files
committed
Extend support to 0.10
1 parent 3637b30 commit f7174eb

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ node_js:
33
- "stable"
44
- "5"
55
- "4"
6+
- "0.12"
7+
- "0.10"

bin/config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
var fs = require('fs')
44
var path = require('path')
55
var existFile = require('exists-file')
6-
7-
var minimistPath = path.join(__dirname, '..', 'node_modules', 'meow', 'node_modules', 'minimist')
8-
var minimist = require(minimistPath)
9-
106
var trimNewlinesPath = path.join(__dirname, '..', 'node_modules', 'meow', 'node_modules', 'trim-newlines')
117
var trimNewlines = require(trimNewlinesPath)
8+
var isDirectory = require('is-directory').sync
129

1310
var FILENAME = 'worker-farm.opts'
1411

15-
function readConfig (filepath) {
12+
function readConfig () {
1613
var yargs = process.argv.slice(2)
1714
if (yargs.length !== 1) return yargs
1815

19-
var filepath = path.resolve(yargs[0], FILENAME)
16+
var filepath = path.resolve(yargs[0])
17+
if (!isDirectory(filepath)) filepath = path.join(filepath, '..')
18+
filepath = path.join(filepath, FILENAME)
19+
2020
if (!existFile(filepath)) return yargs
2121

2222
var config = fs.readFileSync(filepath, 'utf8')

0 commit comments

Comments
 (0)