PATH:
usr
/
local
/
lib
/
node_modules
/
ghost-cli
/
node_modules
/
replace-in-file
/
lib
/
helpers
'use strict'; /** * Dependencies */ const glob = require('glob'); /** * Get paths (sync) */ module.exports = function getPathsSync(patterns, config) { //Extract relevant config const {ignore, disableGlobs, glob: globConfig, cwd} = config; //Not using globs? if (disableGlobs) { return patterns; } //Prepare glob config const cfg = Object.assign({ignore}, globConfig, {nodir: true}); //Append CWD configuration if given (#56) //istanbul ignore if if (cwd) { cfg.cwd = cwd; } //Get paths const paths = patterns.map(pattern => glob.sync(pattern, cfg)); const flattened = [].concat.apply([], paths); //Prefix each path with CWD if given (#56) //istanbul ignore if if (cwd) { return flattened.map(path => `${cwd}${path}`); } //Return flattened return flattened; };
[-] success-handler.js
[edit]
[-] replace-sync.js
[edit]
[+]
..
[-] error-handler.js
[edit]
[-] make-replacements.js
[edit]
[-] parse-config.js
[edit]
[-] combine-config.js
[edit]
[-] get-paths-sync.js
[edit]
[-] replace-async.js
[edit]
[-] load-config.js
[edit]
[-] glob-async.js
[edit]
[-] get-paths-async.js
[edit]