Socket
Socket
Sign inDemoInstall

@storm-software/workspace-tools

Package Overview
Dependencies
Maintainers
1
Versions
756
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storm-software/workspace-tools

⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.


Version published
Weekly downloads
3.3K
increased by113.92%
Maintainers
1
Weekly downloads
 
Created
Source

Website | Contact | Repository | Documentation | Report a Bug | Request a Feature | Request Documentation | Ask a Question

This package is part of the ⚡Storm-Ops monorepo. The Storm-Ops packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications.

💻 Visit stormsoftware.org to stay up to date with this developer


Version  Nx NextJs Commitizen friendly Semantic-Release documented with docusaurus GitHub Workflow Status (with event)

[!IMPORTANT] This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.


Storm Workspace Tools

A package containing tools for managing a Storm workspace. It includes various Nx generators and executors for common development tasks.

This library was generated with Nx.

Installing

Using pnpm:

pnpm add -D @storm-software/workspace-tools
Using npm
npm install -D @storm-software/workspace-tools
Using yarn
yarn add -D @storm-software/workspace-tools

Executors

The following executors are available in this package to invoke common tasks for the workspace's projects:

Tsup Builder

Run a build on the project using ESBuild with a patched tsup configuration

Example

This executor can be used by executing the following in a command line utility:

nx run my-project:tsup

Please note: The tsup executor should be included in the desired projects's project.json file.All required options must be included in the options property of the json.

Options

The following executor options are available:

OptionTypeDescriptionDefault
entrystringThe path to the entry file, relative to project."{sourceRoot}/index.ts"
outputPathstringThe output path of the generated files."dist/{projectRoot}"
tsConfig *stringThe path to the `tsconfig.json` file."tsconfig.json"
additionalEntryPointsstring[]List of additional entry points.[]
externalstring[]Mark one or more module as external. Can use * wildcards, such as *.png.
bundlebooleanWhether to bundle the main entry point and additional entry points. Set to false to keep individual output files.true
watchbooleanEnable re-building when files change.
assetsarrayList of static assets.[]
cleanbooleanRemove previous output before build.true
includeSrcbooleanShould the source files be added to the distribution folder in an `src` directory.
metafilebooleanShould a meta file be created for the build packagetrue
emitOnAllbooleanShould each file contained in the package be emitted individually.
generatePackageJsonbooleanShould a package.json file be generated in the output folder or should the existing one be copied in.true
splittingbooleanShould the build process preform *code-splitting*?true
treeshakebooleanShould the build process *tree-shake* to remove unused code?true
formatstring[]The output format for the generated JavaScript files. There are currently three possible values that can be configured: iife, cjs, and esm.[]
debugbooleanShould output be unminified with source mappings.
platform *"browser" | "neutral" | "node" | "worker"Platform target for outputs."neutral"
banner *stringA short heading added to the top of each typescript file added in the output folder's `src` directory."This code was developed by Storm Software (https://stormsoftware.org) and is licensed under the Apache License 2.0."
minifybooleanShould the build process minify the output files?
verbosebooleanShould write extra log outputs with details from the executor.
skipNativeModulesPluginbooleanShould we skip adding the Native Node Modules ESBuild plugin.
useJsxModulebooleanShould the build process use the `jsx` module for JSX support?
shimsbooleanShould the build process add shims for node.js modules that are not available in the browser?
defineobjectDefine global constants that can be used in the source code. The value will be converted into a stringified JSON.
envobjectDefine environment variables that can be used in the source code. The value will be converted into a stringified JSON.
apiReportbooleanShould API Extractor generate an API Report file.true
docModelbooleanShould API Extractor generate an Doc Model markdown file.true
tsdocMetadatabooleanShould API Extractor generate an TSDoc Metadata file.true
optionsobjectAdditional options to pass to tsup. See https://paka.dev/npm/tsup@7.2.0/api#d35d54aca71eb26e.
pluginsobject[]List of ESBuild plugins to use during processing[]

Please note: Option names followed by * above are required, and must be provided to run the executor.

Neutral TypeScript Builder

Runs a neutral platform TypeScript build

Example

This executor can be used by executing the following in a command line utility:

nx run my-project:tsup-neutral

Please note: The tsup-neutral executor should be included in the desired projects's project.json file.

Node TypeScript Builder

Runs a node platform TypeScript build

Example

This executor can be used by executing the following in a command line utility:

nx run my-project:tsup-node

Please note: The tsup-node executor should be included in the desired projects's project.json file.

Options

The following executor options are available:

OptionTypeDescriptionDefault
transportsstring[][]

Browser TypeScript Builder

Runs a browser platform TypeScript build

Example

This executor can be used by executing the following in a command line utility:

nx run my-project:tsup-browser

Please note: The tsup-browser executor should be included in the desired projects's project.json file.

Typia Generate Executor

Run the Typia generator to create runtime type validators

Example

This executor can be used by executing the following in a command line utility:

nx run my-project:typia

Please note: The typia executor should be included in the desired projects's project.json file.All required options must be included in the options property of the json.

Options

The following executor options are available:

OptionTypeDescriptionDefault
entryPath *stringThe path of the typescript files using `typia`."{sourceRoot}"
outputPath *stringThe output path of the generated files."{sourceRoot}/generated/typia"
tsConfig *stringThe path to the `tsconfig.json` file."{projectRoot}/tsconfig.json"
cleanbooleanRemove previous output before build.true

Please note: Option names followed by * above are required, and must be provided to run the executor.

Npm Publish executor

Publish a package to the NPM registry

Example

This executor can be used by executing the following in a command line utility:

nx run my-project:npm-publish

Please note: The npm-publish executor should be included in the desired projects's project.json file.

Options

The following executor options are available:

OptionTypeDescriptionDefault
packageRootstringThe root directory of the directory (containing a manifest file at its root) to publish. Defaults to the project root.
registrystringThe registry to publish the package to.
tagstringThe distribution tag to apply to the published package.
dryRunbooleanWhether to run the command without actually publishing the package to the registry.

Generators

The following generators are available with this package to assist in workspace management:

Init Storm Workspace Plugin

Init Storm Workspace Plugin.

Options

The following executor options are available:

OptionTypeDescriptionDefault
skipFormatbooleanSkip formatting files.

Workspace Preset

Create a Storm workspace with all of the required files and recommended packages installed.

Examples

This generator can be used by executing the following examples in a command line utility:

Generate a storm workspace with:

nx g @storm-software/workspace-tools:preset --name 'example-repo'

Generate a storm workspace with:

nx g @storm-software/workspace-tools:preset --name 'example-repo' --namespace 'example'

Generate a storm workspace with:

nx g @storm-software/workspace-tools:preset --name 'example-repo' --namespace 'example' --organization 'example-org' --description 'An example workspace'

Options

The following executor options are available:

OptionTypeDescriptionDefault
name *stringThe name of the workspace root.
organization *stringThe organization that owns the workspace."storm-software"
namespacestringThe npm scope used for the workspace. Defaults to the organization name.
includeApps *booleanShould a separate apps folder be created for this workspace (if Yes: apps and libs folders will be added, if No: packages folders will be added)?
descriptionstringThe description of the workspace to use in the package.json and README.md files.
repositoryUrlstringThe URL of the workspace in GitHub. Defaults to https://github.com/{organization}/{name}
nxCloudbooleanShould distributed caching with Nx Cloud be enabled for the workspace?
mode *"light" | "dark"Which client mode should be used for the Nx Task Runner?"dark"
packageManager"npm" | "yarn" | "pnpm"What package manager is used for the workspace?"pnpm"

Please note: Option names followed by * above are required, and must be provided to run the executor.

Add Node Library

Create a new NodeJs TypeScript library package in the Storm workspace

Options

The following executor options are available:

OptionTypeDescriptionDefault
name *stringA name for the library.
descriptionstringThe library used by Storm Software for building TypeScript applications.
directory *stringA directory where the lib is placed.
projectNameAndRootFormat *"as-provided" | "derived"Whether to generate the project name and root directory as provided (as-provided) or generate them composing their values and taking the configured layout into account (derived).
tagsstringAdd tags to the library (used for linting).
strictbooleanWhether to enable tsconfig strict mode or not.true
publishable *booleanGenerate a publishable library.
importPath *stringThe library name used to import it, like @storm-software/my-awesome-lib. Required for publishable library.
buildable *booleanGenerate a buildable library.true
setParserOptionsProjectbooleanWhether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons.
rootProjectbooleanIs the current project the root project in the workspace.

Please note: Option names followed by * above are required, and must be provided to run the executor.

Configuration Schema Creator

Create a StormConfig JSON schema based on the workspace's project configurations

Options

The following executor options are available:

OptionTypeDescriptionDefault
outputFile *stringThe file path where the schema json will be written (relative to the workspace root)"{workspaceRoot}/storm.schema.json"

Please note: Option names followed by * above are required, and must be provided to run the executor.

Add Neutral Library

Create a new Neutral TypeScript library package in the Storm workspaces

Options

The following executor options are available:

OptionTypeDescriptionDefault
name *stringA name for the library.
descriptionstringThe library used by Storm Software for building TypeScript applications.
directory *stringA directory where the lib is placed.
projectNameAndRootFormat *"as-provided" | "derived"Whether to generate the project name and root directory as provided (as-provided) or generate them composing their values and taking the configured layout into account (derived).
tagsstringAdd tags to the library (used for linting).
strictbooleanWhether to enable tsconfig strict mode or not.true
publishable *booleanGenerate a publishable library.
importPath *stringThe library name used to import it, like @storm-software/my-awesome-lib. Required for publishable library.
buildable *booleanGenerate a buildable library.true
setParserOptionsProjectbooleanWhether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons.
rootProjectbooleanIs the current project the root project in the workspace.

Please note: Option names followed by * above are required, and must be provided to run the executor.

Add browser Library

Create a new browser TypeScript library package in the Storm workspace

Options

The following executor options are available:

OptionTypeDescriptionDefault
name *stringA name for the library.
descriptionstringThe library used by Storm Software for building TypeScript applications.
directory *stringA directory where the lib is placed.
projectNameAndRootFormat *"as-provided" | "derived"Whether to generate the project name and root directory as provided (as-provided) or generate them composing their values and taking the configured layout into account (derived).
tagsstringAdd tags to the library (used for linting).
strictbooleanWhether to enable tsconfig strict mode or not.true
publishable *booleanGenerate a publishable library.
importPath *stringThe library name used to import it, like @storm-software/my-awesome-lib. Required for publishable library.
buildable *booleanGenerate a buildable library.true
setParserOptionsProjectbooleanWhether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons.
rootProjectbooleanIs the current project the root project in the workspace.

Please note: Option names followed by * above are required, and must be provided to run the executor.

design-tokens

Generate design tokens code using a Token Studio export

Storm Release Version Generator

The release version generator used in Storm Workspaces

Options

The following executor options are available:

OptionTypeDescriptionDefault
projects *object[]The ProjectGraphProjectNodes being versioned in the current execution.
projectGraph *objectProjectGraph instance
specifierstringExact version or semver keyword to apply to the selected release group. Overrides specifierSource.
releaseGroup *objectThe resolved release group configuration, including name, relevant to all projects in the current execution.
specifierSource"prompt" | "conventional-commits"Which approach to use to determine the semver specifier used to bump the version of the project."conventional-commits"
preidstringThe optional prerelease identifier to apply to the version, in the case that specifier has been set to prerelease.
packageRootstringThe root directory of the directory (containing a manifest file at its root) to publish. Defaults to the project root
currentVersionResolver"registry" | "disk" | "git-tag"Which approach to use to determine the current version of the project."disk"
currentVersionResolverMetadataobjectAdditional metadata to pass to the current version resolver.[object Object]

Please note: Option names followed by * above are required, and must be provided to run the executor.

Building

Run nx build workspace-tools to build the library.

Running unit tests

Run nx test workspace-tools to execute the unit tests via Jest.

Storm Workspaces

Storm workspaces are built using Nx, a set of extensible dev tools for monorepos, which helps you develop like Google, Facebook, and Microsoft. Building on top of Nx, the Open System provides a set of tools and patterns that help you scale your monorepo to many teams while keeping the codebase maintainable.

Roadmap

See the open issues for a list of proposed features (and known issues).

Support

Reach out to the maintainer at one of the following places:

License

This project is licensed under the Apache License 2.0. Feel free to edit and distribute this template as you like.

See LICENSE for more information.

Changelog

This project adheres to Semantic Versioning. Every release, along with the migration instructions, is documented in the CHANGELOG file

Contributing

First off, thanks for taking the time to contribute! Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please try to create bug reports that are:

  • Reproducible. Include steps to reproduce the problem.
  • Specific. Include as much detail as possible: which version, what environment, etc.
  • Unique. Do not duplicate existing opened issues.
  • Scoped to a Single Bug. One bug per report.

Please adhere to this project's code of conduct.

You can use markdownlint-cli to check for common markdown style inconsistency.

Contributors

Thanks goes to these wonderful people (emoji key):

Patrick Sullivan
Patrick Sullivan

🎨 💻 🔧 📖 ⚠️
Tyler Benning
Tyler Benning

🎨
Stormie
Stormie

🚧
Add your contributions

This project follows the all-contributors specification. Contributions of any kind welcome!




Fingerprint: 1BD2 7192 7770 2549 F4C9 F238 E6AD C420 DA5C 4C2D

💻 Visit patsullivan.org to stay up to date with this developer



Keywords

FAQs

Package last updated on 24 Feb 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc