0.1.11 • Published 12 months ago

@modular-rocks/workspace v0.1.11

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
12 months ago

A Workspace for working with virtual codebases

Installation

npm install @modular-rocks/workspace

or

yarn add @modular-rocks/workspace

Usage

A Workspace can contain multiple Codebases, a Codebase will contain FileContainers. It is designed to be highly configurable, allowing you to extend the Workspace, Codebase or FileContainer classes, allowing you to build anything you want on top.

Each Workspace and Codebase accepts an Options argument containing configuration options.

OptionDescriptionTypeExample
pipelineArray of functionsFunction[]functionA, functionB
filesArray of arrays consisting of pathname and codepathname:string, code:string['/path', 'hello world']
srcsource of the projectstring'/path/to/project'
extensionsArray of extensions to filter the files bystring[]'ts', 'js'
ignoredFilesArray of files to filter the files bystring[]'.d.ts'
ignoredImportsArray of import statementsstring[]'$GlobalVariable'
packageContentsJSON Object like in package.jsonObject'$GlobalVariable'
const opts: Options = {
  pipeline,
  files,
  src: '/',
  extensions: [],
  ignoredFiles: [],
  ignoredImports: [],
  packageContents: {}
}

A FileContainer accepts 3 arguments: pathname:string, code:string, codebase:Codebase.

The pipeline is described in detail in the readme of the pipeline folder.

Framework specific versions

Examples

Examples coming soon...

License

Apache 2.0

0.1.10

12 months ago

0.1.11

12 months ago

0.1.8

1 year ago

0.1.9

12 months ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago