Socket
Book a DemoInstallSign in
Socket

@push-based/user-flow-nx-plugin

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@push-based/user-flow-nx-plugin

Run generators, executors and helper code to seamlessly integrate user flow into your Nx workspace.

latest
npmnpm
Version
0.1.4
Version published
Maintainers
0
Created
Source

Nx plugin to execute lighthouse user flows

Run generators, executors and helper code to seamlessly integrate user flow into your Nx workspace.

Quick Start

  • Add @push-based/user-flow-nx-plugin to your project. It will unlock generators, executors and migrations for a seamless DX:
npm install --save-dev @push-based/user-flow-nx-plugin
nx generate @push-based/user-flow-nx-plugin:init
  • Add a target to your project and configure it.
 nx generate @push-based/user-flow-nx-plugin:target

optionally provide a different target name

   nx generate @push-based/user-flow-nx-plugin:target --targetName=xyz

2.1 To test out the result before changing your code add --dry-run to the options

Init user flows in your Nx workspace

You can easily use the generators to setup user flows in the workspace.

run: nx generate @push-based/user-flow-nx-plugin:init

This should add the necessary dependencies your package.json.

>  NX  Generating @push-based/user-flow-nx-plugin:install

Adding packages
UPDATE nx.json
UPDATE package.json

In your workspace package.json you will find the packages added. You can find the details about the executor options under Executor Options.

In your nx.json you will find the generator defaults. You can set the workspace base configurations.

Now you can go and setup user-flows under a target or generate tests over the CLI.

Add a target to execute user flows in a project

You have to add a target over the generator to be able to execute user-flows.

run:
nx generate @push-based/user-flow-nx-plugin:target

This should add the new target to your project.json.

>  NX  Generating @push-based/user-flow-nx-plugin:target [target-name-here]

? What project would you like to add your target to? …
project-name

Adding target user-flow to project project-name
UPDATE packages/project-name/project.json

In your workspace project.json you will find the target added. Now you can go and execute the target over the CLI.

Execute user flows as Nx target

To execute user flows you need to have a target set up as pre-condition.

npx user-flow [project-name]

This should add the new target to your project.json.

> nx run user-flow-gh-integration:user-flow

 >  NX   Successfully ran target user-flow for project [project-name]

You will find the artefacts in your configured outpath, by default dist/user-flow.

Executor Options

OptionTypeDefaultDescription
--help, -hbooleanundefinedShow help
--targetName,stringuser-flowThe target name for user-flow execution
--projectName,stringuser-flowThe project name to add the user-flow target
--cliMode,stringDEFAULTCLI mode for execution of user-flows SANDBOX. This is useful when you debug or write tests.
--ouputPathbooleanundefinedAlias for --outPath.

Other available options are listed under collect command options.

FAQs

Package last updated on 26 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.