0.0.10 • Published 7 years ago

babel-plugin-isotropy-filesystem v0.0.10

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Isotropy Babel Plugin for FS

This module is a babel plugin that transpiles array operations into corresponding filesystem operations. It uses isotropy-ast-analyzer-filesystem for AST analysis.

This is part of the isotropy framework (www.isotropy.org).

Include the plugin in .babelrc file.

Plugin configuration:

plugins: [
  [
    "transform-to-isotropy-fs",
    {
      projects: [
        {
          dir: "src/fs",
          modules: [
            {
              source: "my-fs",
              locations: [{ name: "docs", path: "/home/docs" }]
            }
          ]
        }
      ]
    }
  ]
]

projects:
dir: Specify the root of the project.
modules:
source: Points to the fs file.
locations:
name: The name used to access the path specified alongside.
path: The path at which the actual filesystem operations will take place.

Example:

import myFs from "./my-fs";

async function getFiles() {
  // return list of files in /home/docs
  return myFs.docs
}
0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago