Skip to content

builtin walkSync for this.output, this.input or fake fs #49

@lifeart

Description

@lifeart

Reading API updates regarding this.input, this.output. I'was checked original broccoli plugin documentation on website and seen such example:

https://github.com/broccolijs/broccolijs.github.io/edit/code/src/content/plugins.md

build() {
        const walkOptions = {
            includeBasePath: true,
            directories: false,
            globs: this.fileMatchers,
        };

        const content = this.inputPaths
            .reduce((output, inputPath) => output + this.joinSeparator +
                walkSync(inputPath, walkOptions)
                    .map(file => fs.readFileSync(file, { encoding: 'UTF-8' }))
                    .join(this.joinSeparator),
            '');

        fs.writeFileSync(`${this.outputPath}/${this.outputFile}`, content);
    }

How we will convert it into new api? without fs usage inside walkSync?

// @SparshithNR @stefanpenner

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions