@skypager/features-file-manager
an observable state machine for a projects files
Last updated 4 months ago by soederpop .
MIT · Original npm · Tarball · package.json
$ cnpm install @skypager/features-file-manager 
SYNC missed versions from official npm registry.

Skypager File Manager Feature

The File Manager provides an interface for browsing / searching / manipulating the file contents inside of a project.

Under the hood it uses git ls-files to find all of the files in the project.

File Manager API Docs

Package Manager

In addition to the file manager, a package manager feature is used to work with all of the package.json manifests that may be found inside a project.

This is especially useful for monorepos and yarn workspaces.

Package Manager API Docs

Module Manager

In addition to the file manager and package manager, the module manager feature is used to work with all of the package.json that can be found in the project's node_modules hierarchy.

Module Manager API Docs

Servers

This feature provides two servers which are implementations of the Skypager Server Helper

  • File Manager API - provides a REST API for browsing the project's files.
  • Package Manager API - provides a REST API for browsing the project's package.json manifests

Feature API

import runtime from '@skypager/node'

async function main() {
  // start the file manager
  await runtime.fileManager.startAsync()
  // list all the file ids
  console.log(runtime.fileManager.fileIds)
  // list all the directory ids
  console.log(runtime.fileManager.directoryIds)
  // find a file
  const file = runtime.fileManager.file('package.json')
  console.log(file)

  // find all files matching a route pattern
  const components = runtime.fileManager.matchRoute('src/components/:componentName*.js')

  // calculate the md5 hash of all package.json files
  await runtime.fileManager.hashFiles({
    include: [/package.json$/]
  })

  const hash = runtime.file('package.json').hash
  console.log('hash', hash)
}

main()

Current Tags

  • 0.3.2                                ...           beta (9 months ago)
  • 1.3.0                                ...           latest (4 months ago)
  • 1.0.1-alpha.1                                ...           next (6 months ago)

43 Versions

  • 1.3.0                                ...           4 months ago
  • 1.1.4                                ...           5 months ago
  • 1.1.1                                ...           6 months ago
  • 1.1.0                                ...           6 months ago
  • 1.0.1                                ...           6 months ago
  • 1.0.0                                ...           6 months ago
  • 1.0.1-alpha.1                                ...           6 months ago
  • 1.0.1-alpha.0                                ...           6 months ago
  • 0.4.10                                ...           7 months ago
  • 0.4.7                                ...           7 months ago
  • 0.4.6                                ...           7 months ago
  • 0.4.5                                ...           7 months ago
  • 0.4.2                                ...           7 months ago
  • 0.4.1                                ...           7 months ago
  • 0.4.0                                ...           8 months ago
  • 0.3.2                                ...           9 months ago
  • 0.3.1                                ...           9 months ago
  • 0.3.0                                ...           9 months ago
  • 0.2.8                                ...           9 months ago
  • 0.2.7                                ...           9 months ago
  • 0.2.6                                ...           9 months ago
  • 0.2.2                                ...           9 months ago
  • 0.2.1                                ...           9 months ago
  • 0.1.29                                ...           9 months ago
  • 0.1.26                                ...           10 months ago
  • 0.1.25                                ...           10 months ago
  • 0.1.23                                ...           10 months ago
  • 0.1.21                                ...           10 months ago
  • 0.1.20                                ...           a year ago
  • 0.1.18                                ...           a year ago
  • 0.1.11                                ...           a year ago
  • 0.1.10                                ...           a year ago
  • 0.1.2                                ...           a year ago
  • 0.1.0                                ...           a year ago
  • 0.0.22                                ...           a year ago
  • 0.0.21                                ...           a year ago
  • 0.0.20                                ...           a year ago
  • 0.0.18                                ...           a year ago
  • 0.0.17                                ...           a year ago
  • 0.0.12                                ...           a year ago
  • 0.0.10                                ...           a year ago
  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 4
Dependencies (8)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |