Files
Riccardo 87f172d217 Decoupled note ID from note slug (#208)
* decoupled ID from note slug

* added vscode debug configuration to work with vscode-jest extension

* made things prettier

* Add a test for parsing empty frontmatter

* Use astPositionToVsCodePosition util function

* fixed a TODOs around URIs and added tests

* added tests around notes querying

* removing unused imports

* Fix typo

* implemented PR feedback

* fixed lint warnings and renamed method for consistency

* removed unnecessary checks and fix compilation error in tests

Co-authored-by: Ankit Tiwari <ankitt255@gmail.com>
2020-08-05 18:37:35 +02:00
..
2020-07-04 22:18:59 +01:00
2020-07-04 22:18:59 +01:00
2020-07-04 22:18:59 +01:00
2020-07-25 18:28:52 +01:00

foam-cli

Foam CLI

oclif Version Downloads/week License

Usage

$ npm install -g foam-cli
$ foam COMMAND
running command...
$ foam (-v|--version|version)
foam-cli/0.3.0 darwin-x64 node-v12.18.0
$ foam --help [COMMAND]
USAGE
  $ foam COMMAND
...

Commands

foam help [COMMAND]

display help for foam

USAGE
  $ foam help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

foam janitor [WORKSPACEPATH]

Updates link references and heading across all the markdown files in the given workspaces

USAGE
  $ foam janitor [WORKSPACEPATH]

OPTIONS
  -h, --help                show CLI help
  -w, --without-extensions  generate link reference definitions without extensions (for legacy support)

EXAMPLE
  $ foam-cli janitor path-to-foam-workspace

See code: src/commands/janitor.ts

foam migrate [WORKSPACEPATH]

Updates file names, link references and heading across all the markdown files in the given workspaces

USAGE
  $ foam migrate [WORKSPACEPATH]

OPTIONS
  -h, --help                show CLI help
  -w, --without-extensions  generate link reference definitions without extensions (for legacy support)

EXAMPLE
  $ foam-cli migrate path-to-foam-workspace
  Successfully generated link references and heading!

See code: src/commands/migrate.ts

Development

  • Run yarn somewhere in workspace (ideally root, see yarn workspace docs
    • This will automatically symlink all package directories so you're using the local copy
  • In packages/foam-core, run yarn start to rebuild the library on every change
  • In packages/foam-cli, make changes and run with yarn run cli. This should use latest workspace manager changes.