Skip to content

Commit 2b60a99

Browse files
author
pemrouz
committed
chore: build dist
1 parent 169da22 commit 2b60a99

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

dist/index.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,19 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
4242
// Loads resources from the /resources folder
4343
// -------------------------------------------
4444
function resdir(ripple) {
45-
var prefix = arguments.length <= 1 || arguments[1] === undefined ? '.' : arguments[1];
45+
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
46+
_ref$dir = _ref.dir,
47+
dir = _ref$dir === undefined ? '.' : _ref$dir;
4648

4749
log('creating');
48-
if (_is2.default.obj(prefix)) prefix = prefix.dir || '.';
4950

50-
var argv = require('minimist')(process.argv.slice(2));(argv.r || argv.resdirs || '').split(',').concat(prefix).map(function (path) {
51+
var argv = require('minimist')(process.argv.slice(2));(argv.r || argv.resdirs || '').split(',').concat(dir).filter(Boolean).map(function (path) {
5152
return (0, _path.resolve)(path);
52-
}).map(function (prefix) {
53-
(0, _glob.sync)(prefix + '/resources/**/!(test).{js,css}').filter((0, _not2.default)((0, _includes2.default)('/_'))).map(function (path) {
54-
return (0, _path.resolve)(prefix, path);
53+
}).map(function (dir) {
54+
(0, _glob.sync)(dir + '/resources/**/!(test).{js,css}').filter((0, _not2.default)((0, _includes2.default)('/_'))).map(function (path) {
55+
return (0, _path.resolve)(dir, path);
5556
}).map(function (path) {
56-
var absolute = (0, _path.resolve)(prefix, path);
57+
var absolute = (0, _path.resolve)(dir, path);
5758
register(ripple)(absolute);
5859
if (process.env.NODE_ENV != 'production') watch(ripple)(absolute);
5960
});

0 commit comments

Comments
 (0)