@koba04/react-fs
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

@koba04/react-fs

The GitHub repository will be published soon!!

A React custom renderer for file system APIs.

Install

This package depends on recursive option of fs.rmdirSync, so you have to use Node.js higher that v12.10.0.

npm i @koba04/react-fs

How to use

const React = require('react');
const { ReactFS } = require('@koba04/react-fs');

const targetDir = "test-react-fs-project";
ReactFS.render(
  <>
    <file name="README.md">
      # Title
    </file>
    <directory name="src">
      <file name="index.js">
        console.log("Hello");
      </file>
    </directory>
  </>,
  targetDir
);

TypeScript

If you use @koba04/react-fs with TypeScript, you have to edit typeRoots liek the following.

    "typeRoots": [
      "node_modules/@types",
      "node_modules/@koba04/react-fs/types",
    ]

Package Sidebar

Install

npm i @koba04/react-fs

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

20.4 kB

Total Files

20

Last publish

Collaborators

  • koba04