1.0.3 • Published 3 years ago

@atomist/tree-path v1.0.3

Weekly downloads
270
License
SEE LICENSE IN LI...
Repository
github
Last release
3 years ago

@atomist/tree-path

npm version

Node module @atomist/tree-path-ts defining trees and path expressions. These capabilities were created for use in Atomist code transformations, including those used to transform seed projects into new projects.

XPath-like path expressions can be executed against any implementation of the simple TreeNode interface. This is typically used to expose ASTS: for example, those resulting from ANTLR grammars, microgrammars or a standalone parser such as the TypeScript compiler's parser. The ability to skip levels in navigating path expressions (e.g., via //) is invaluable in ignoring irrelevant levels of language ASTs, which tend to be noisy.

For example, find all variable names in a TypeScript file (using TypeScript AST integration in automation-client:

const variableNames = evaluateScalarValue(
	sourceFile,
	"//VariableDeclaration/Identifier");

Concepts

For more information, please read Tree and path expression overview.

Support

General support questions should be discussed in the #support channel in the Atomist community Slack workspace.

If you find a problem, please create an issue.

Development

You will need to install node to build and test this project.

Build and test

Use the following package scripts to build, test, and perform other development tasks.

CommandReason
npm installinstall project dependencies
npm run buildcompile, test, lint, and generate docs
npm startstart the Atomist API client
npm run autostartrun the client, refreshing when files change
npm run lintrun TSLint against the TypeScript
npm run compilegenerate types from GraphQL and compile TypeScript
npm testrun tests
npm run autotestrun tests every time a file changes
npm run cleanremove files generated during the build

Release

Releases are managed by the Atomist SDM. Press the release button in the Atomist dashboard or Slack.


Created by Atomist. Need Help? Join our Slack workspace.

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0-RC.2

5 years ago

1.0.0-RC.1

6 years ago

1.0.0-M.4

6 years ago

1.0.0

6 years ago

1.0.0-M.1

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago