### Install Nx React Plugin Source: https://github.com/alexxander/jq-tools/blob/main/README.md Installs the Nx plugin for React development, enabling the generation of React applications and libraries within the Nx workspace. ```bash npm install --save-dev @nrwl/react ``` -------------------------------- ### Install Nx Express Plugin Source: https://github.com/alexxander/jq-tools/blob/main/README.md Installs the Nx plugin for Express.js development, allowing for the generation of Express applications and libraries. ```bash npm install --save-dev @nrwl/express ``` -------------------------------- ### Install Nx Web Plugin Source: https://github.com/alexxander/jq-tools/blob/main/README.md Installs the Nx plugin for web development, suitable for projects without a specific framework frontend. It allows for the generation of web applications and libraries. ```bash npm install --save-dev @nrwl/web ``` -------------------------------- ### Install Nx Nest Plugin Source: https://github.com/alexxander/jq-tools/blob/main/README.md Installs the Nx plugin for NestJS development, enabling the creation of NestJS applications and libraries. ```bash npm install --save-dev @nrwl/nest ``` -------------------------------- ### Install @jq-tools/jq with Yarn Source: https://github.com/alexxander/jq-tools/blob/main/packages/jq/README.md Installs the @jq-tools/jq library using Yarn. This command adds the package to your project's dependencies. ```bash yarn add -E @jq-tools/jq ``` -------------------------------- ### Run Development Server Source: https://github.com/alexxander/jq-tools/blob/main/README.md Starts the development server for a specified application (e.g., 'my-app'). The server typically runs on localhost:4200 and enables hot reloading. ```bash nx serve my-app ``` -------------------------------- ### Install Nx Node Plugin Source: https://github.com/alexxander/jq-tools/blob/main/README.md Installs the Nx plugin for Node.js development, facilitating the generation of Node.js applications and libraries. ```bash npm install --save-dev @nrwl/node ``` -------------------------------- ### Install Nx Angular Plugin Source: https://github.com/alexxander/jq-tools/blob/main/README.md Installs the Nx plugin for Angular development, providing capabilities to generate Angular applications and libraries within the Nx workspace. ```bash npm install --save-dev @nrwl/angular ``` -------------------------------- ### Execute jq filter from command line Source: https://github.com/alexxander/jq-tools/blob/main/packages/jq/README.md Illustrates running a jq filter directly from the command line using `yarn jq`. This example adds 5 to the input value '5'. ```bash echo '5' | yarn jq '.+5' ``` -------------------------------- ### Generate code from jq AST Source: https://github.com/alexxander/jq-tools/blob/main/packages/jq/README.md Shows the `print` function, which generates jq code from a given Abstract Syntax Tree (AST). The example generates code for a simple identity filter. ```typescript import { print } from '@jq-tools/jq'; print({ expr: { expr: { type: 'identity' }, type: 'iterator' }, type: 'root', }); ``` -------------------------------- ### Format jq code Source: https://github.com/alexxander/jq-tools/blob/main/packages/jq/README.md Demonstrates the `format` function, which takes a string of jq code and returns a formatted version. The example formats a jq query that transforms an array of objects, extracting first and last names. ```typescript import { format } from '@jq-tools/jq'; format(`[.[] | { "firstName" : .firstName , lastName: .surname }] `); ``` -------------------------------- ### Parse jq code into AST Source: https://github.com/alexxander/jq-tools/blob/main/packages/jq/README.md Demonstrates the `parse` function, which converts a jq code string into its Abstract Syntax Tree (AST) representation. The example parses a jq query that accesses array elements, performs arithmetic operations, and constructs an object with string interpolation. ```typescript import { parse } from '@jq-tools/jq'; parse('.[].a | {"a": 5 + ., "--\(. * 2)--": . + 4}'); ``` -------------------------------- ### Apply jq filter using template tag Source: https://github.com/alexxander/jq-tools/blob/main/packages/jq/README.md Demonstrates using the `jq` template tag to parse jq code and create a transformation function. This function takes an array or iterator as input and returns an iterator with the transformed data. The example doubles each number in an input array. ```typescript import { jq } from '@jq-tools/jq'; const transform = jq`.[] | . * 2`; Array.from(transform([1, 2, 3])); ``` -------------------------------- ### Evaluate jq AST with input data Source: https://github.com/alexxander/jq-tools/blob/main/packages/jq/README.md Shows how to use the `evaluate` function to execute a jq Abstract Syntax Tree (AST) against input data. The `parse` function is used first to convert jq code into an AST. The example applies a filter to double each element in an array. ```typescript import { evaluate, parse } from '@jq-tools/jq'; Array.from(evaluate(parse(`.[] | . * 2`), [1, 2, 3])); ``` -------------------------------- ### Build Project Source: https://github.com/alexxander/jq-tools/blob/main/README.md Builds a specified project (e.g., 'my-app') for deployment. The build artifacts are stored in the 'dist/' directory. A --prod flag can be used for production builds. ```bash nx build my-app ``` -------------------------------- ### Run Unit Tests Source: https://github.com/alexxander/jq-tools/blob/main/README.md Executes unit tests for a specified application (e.g., 'my-app') using Jest. It also provides a command to run tests affected by recent changes. ```bash nx test my-app ``` ```bash nx affected:test ``` -------------------------------- ### Generate React Component Source: https://github.com/alexxander/jq-tools/blob/main/README.md Scaffolds a new component for a specified project (e.g., 'my-app') using the Nx CLI and the @nrwl/react plugin. ```bash nx g @nrwl/react:component my-component --project=my-app ``` -------------------------------- ### Generate React Library Source: https://github.com/alexxander/jq-tools/blob/main/README.md Generates a new shareable library for React projects within the Nx workspace. Libraries can be imported from a specified path. ```bash nx g @nrwl/react:lib my-lib ``` -------------------------------- ### Run End-to-End Tests Source: https://github.com/alexxander/jq-tools/blob/main/README.md Executes end-to-end tests for a specified application (e.g., 'my-app') using Cypress. It also offers a command to run end-to-end tests affected by changes. ```bash nx e2e my-app ``` ```bash nx affected:e2e ``` -------------------------------- ### Generate React Application Source: https://github.com/alexxander/jq-tools/blob/main/README.md Generates a new React application within the Nx workspace using the Nx CLI. This command leverages the @nrwl/react plugin. ```bash nx g @nrwl/react:app my-app ``` -------------------------------- ### Visualize Project Dependencies Source: https://github.com/alexxander/jq-tools/blob/main/README.md Generates a visual representation of the project dependencies within the workspace, aiding in understanding the project structure. ```bash nx graph ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.