How to use the smart-fs.smartRead function in smart-fs

To help you get started, we’ve selected a few smart-fs 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 blackflux / js-gardener / test / index.spec.js View on Github external
it('Testing Ok', async ({ dir }) => {
    sfs.smartWrite(path.join(dir, '.roboconfig.json'), {});
    sfs.smartWrite(
      path.join(dir, '.eslintrc.json'),
      sfs.smartRead(path.join(__dirname, '..', '.eslintrc.json'))
    );
    fs.symlinkSync(
      path.join(__dirname, '..', 'node_modules'),
      path.join(dir, 'node_modules')
    );
    sfs.smartWrite(path.join(dir, 'package.json'), {
      name: 'pkg',
      dependencies: {
        '@babel/register': '1.0.0'
      },
      main: 'index.js'
    });
    expect(await gardener({ cwd: dir })).to.equal(undefined);
  });
github blackflux / js-gardener / test / subtasks / eslint.spec.js View on Github external
beforeEach(({ dir }) => {
    sfs.smartWrite(
      path.join(dir, '.eslintrc.json'),
      sfs.smartRead(path.join(__dirname, '..', '..', '.eslintrc.json'))
    );
    fs.symlinkSync(
      path.join(__dirname, '..', '..', 'node_modules'),
      path.join(dir, 'node_modules')
    );
  });

smart-fs

Abstraction Layer for File Management.

MIT
Latest version published 1 year ago

Package Health Score

40 / 100
Full package analysis

Popular smart-fs functions