How to use the unionfs.Union function in unionfs

To help you get started, we’ve selected a few unionfs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PolymerLabs / html-modules-toolkit / src / html-module-transform / webpack-plugin.ts View on Github external
import * as fs from 'fs';
import {Volume} from 'memfs';
import {dirname, join} from 'path';
import {Union} from 'unionfs';
import {promisify} from 'util';
import {compilation, Compiler} from 'webpack';

import {htmlModuleToJsModuleMap} from '../html-module-transform.js';

const readFile = promisify(fs.readFile);
const realpath = promisify(fs.realpath);
const ufs = new Union();
const vfs = new Volume();

ufs.use(fs).use(vfs);

const pluginName = 'HTML Modules Transform';

export interface HtmlModulesPluginOptions {
  htmlModuleTest?: (options: WebpackModuleFactoryOptions) => boolean;
}

export interface WebpackModuleFactoryOptions {
  contextInfo: {
    // The absolute path to the source file of the importing module:
    issuer: string
  };
  // The root directory of the compilation (I think.....)
github teambit / bit / components / core / capsule / capsule.ts View on Github external
private static buildFs(memFs: Volume, containerFs: ContainerFS): Volume {
    const fs = new Union();
    fs.use(memFs).use(containerFs);

    return fs;
  }
github futureaus / servue / lib / renderer.js View on Github external
constructor() {
        /**
         * File System Setup
         */
        let mfs = new MFS()
        let ufs = new Union()

        this.mfs = mfs
        this.ufs = ufs
            .use(mfs)
            .use(fs)

        this.cache = {}

        this.mode = 'development'

        this.template = (content, context, bundle) => (`
        
            
                ${ context.head ? context.head : '' }
                ${ context.renderResourceHints() }
                ${ context.renderStyles() }
github teambit / bit / components / core / capsule / dist / capsule.js View on Github external
Capsule.buildFs = function (memFs, containerFs) {
        var fs = new unionfs_1.Union();
        fs
            .use(memFs)
            .use(containerFs);
        return fs;
    };
    Capsule.create = function (containerFactory, volume, initialState, console) {

unionfs

Use multiple `fs` modules in a union.

Unlicense
Latest version published 8 months ago

Package Health Score

76 / 100
Full package analysis

Popular unionfs functions