Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobrosenberg committed Apr 5, 2020
1 parent 3bdad3c commit 03b42b0
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions lib/services/scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ const { generateFileTree } = require('./flow/generateFileTree')
const { addPath, addId, removeUnderscoredDirs, removeNonSvelteFiles, defineFiles } = require('./flow/misc')
const template = require('./flow/createTemplate')

const {
pipeAsync,
walkAsync,
} = require('../utils/fp')
const { pipeAsync } = require('../utils/fp')


const defaultMeta = {
Expand All @@ -23,15 +20,14 @@ function normalizeOptions({ options }) {
options.extensions = Array.isArray(extensions) ? extensions : extensions.split(',')
}

module.exports = async function scanner(options, metaParser) {
module.exports = async function scanner(options, metaParser) {
return await pipeAsync(
x => {
x.options = options;
x.metaParser = metaParser;
x.defaultMeta = defaultMeta;
x.tree = { meta: { untouched: true }, root: true, dir: [] }
},
// createRoot, // dir => ({ dir, ...root })
normalizeOptions,
generateFileTree, // => dir
removeUnderscoredDirs, // _private => false
Expand All @@ -45,11 +41,3 @@ module.exports = async function scanner(options, metaParser) {
template
)
}







Object.assign(module.exports, { walkAsync })

0 comments on commit 03b42b0

Please sign in to comment.