Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@storm-software/workspace-tools
Advanced tools
⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.
[!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.
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.
Using pnpm:
pnpm add -D @storm-software/workspace-tools
npm install -D @storm-software/workspace-tools
yarn add -D @storm-software/workspace-tools
The following executors are available in this package to invoke common tasks for the workspace's projects:
Run a build on the project using ESBuild with a patched tsup configuration
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.
The following executor options are available:
Option | Type | Description | Default |
---|---|---|---|
entry | string | The path to the entry file, relative to project. | "{sourceRoot}/index.ts" |
outputPath | string | The output path of the generated files. | "dist/{projectRoot}" |
tsConfig * | string | The path to the `tsconfig.json` file. | "tsconfig.json" |
additionalEntryPoints | string[] | List of additional entry points. | [] |
external | string[] | Mark one or more module as external. Can use * wildcards, such as *.png. | |
bundle | boolean | Whether to bundle the main entry point and additional entry points. Set to false to keep individual output files. | true |
watch | boolean | Enable re-building when files change. | |
assets | array | List of static assets. | [] |
clean | boolean | Remove previous output before build. | true |
includeSrc | boolean | Should the source files be added to the distribution folder in an `src` directory. | |
metafile | boolean | Should a meta file be created for the build package | true |
emitOnAll | boolean | Should each file contained in the package be emitted individually. | |
generatePackageJson | boolean | Should a package.json file be generated in the output folder or should the existing one be copied in. | true |
splitting | boolean | Should the build process preform *code-splitting*? | true |
treeshake | boolean | Should the build process *tree-shake* to remove unused code? | true |
format | string[] | The output format for the generated JavaScript files. There are currently three possible values that can be configured: iife, cjs, and esm. | [] |
debug | boolean | Should output be unminified with source mappings. | |
platform * | "browser" | "neutral" | "node" | "worker" | Platform target for outputs. | "neutral" |
banner * | string | A 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." |
minify | boolean | Should the build process minify the output files? | |
verbose | boolean | Should write extra log outputs with details from the executor. | |
skipNativeModulesPlugin | boolean | Should we skip adding the Native Node Modules ESBuild plugin. | |
shims | boolean | Should the build process add shims for node.js modules that are not available in the browser? | |
define | object | Define global constants that can be used in the source code. The value will be converted into a stringified JSON. | |
env | object | Define environment variables that can be used in the source code. The value will be converted into a stringified JSON. | |
apiReport | boolean | Should API Extractor generate an API Report file. | true |
docModel | boolean | Should API Extractor generate an Doc Model markdown file. | true |
tsdocMetadata | boolean | Should API Extractor generate an TSDoc Metadata file. | true |
options | object | Additional options to pass to tsup. See https://paka.dev/npm/tsup@7.2.0/api#d35d54aca71eb26e. | |
plugins | object[] | 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.
Runs a neutral platform TypeScript build
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.
Runs a node platform TypeScript build
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.
The following executor options are available:
Option | Type | Description | Default |
---|---|---|---|
transports | string[] | [] |
Runs a browser platform TypeScript build
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.
Create styling source code from design tokens json file(s) exported from Figma Tokens Studio
This executor can be used by executing the following in a command line utility:
nx run my-project:design-tokens
Please note: The design-tokens 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.
The following executor options are available:
Option | Type | Description | Default |
---|---|---|---|
inputPath * | string | The path to the tokens json file(s) exported from Figma Tokens Studio. | |
type * | "tailwindcss" | "tamagui" | "all" | The type of code to generate based on the supplied tokens (TailWind CSS, Tamagui, etc.). | "tailwindcss" |
tsConfig * | string | Path to the typescript config file. | |
customActions | string | Path to the ts file exporting the custom actions to register. | |
customFileHeaders | string | Path to the ts file exporting the custom file headers to register. | |
customFilters | string | Path to the ts file exporting the custom filters to register. | |
customFormats | string | Path to the ts file exporting the custom formats to register. | |
customParsers | string | Path to the ts file exporting the custom parsers to register. | |
customTransformGroups | string | Path to the ts file exporting the custom transform groups to register. | |
customTransforms | string | Path to the ts file exporting the custom transform to register. | |
outputPath | string | The output path of the generated files. | |
deleteOutputPath | boolean | Delete the output path before building. | true |
platform | string | Build only the passed platform defined in the configuration. |
Please note: Option names followed by * above are required, and must be provided to run the executor.
Run the Typia generator to create runtime type validators
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.
The following executor options are available:
Option | Type | Description | Default |
---|---|---|---|
entryPath * | string | The path of the typescript files using `typia`. | "{sourceRoot}" |
outputPath * | string | The output path of the generated files. | "{sourceRoot}/generated/typia" |
tsConfig * | string | The path to the `tsconfig.json` file. | "{projectRoot}/tsconfig.json" |
clean | boolean | Remove previous output before build. | true |
Please note: Option names followed by * above are required, and must be provided to run the executor.
The following generators are available with this package to assist in workspace management:
Init Storm Workspace Plugin.
The following executor options are available:
Option | Type | Description | Default |
---|---|---|---|
skipFormat | boolean | Skip formatting files. |
Create a Storm workspace with all of the required files and recommended packages installed.
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'
The following executor options are available:
Option | Type | Description | Default |
---|---|---|---|
name * | string | The name of the workspace root. | |
organization * | string | The organization that owns the workspace. | "storm-software" |
namespace | string | The npm scope used for the workspace. Defaults to the organization name. | |
includeApps * | boolean | Should 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)? | |
description | string | The description of the workspace to use in the package.json and README.md files. | |
repositoryUrl | string | The URL of the workspace in GitHub. Defaults to https://github.com/{organization}/{name} | |
nxCloud | boolean | Should 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.
Create a new NodeJs TypeScript library package in the Storm workspace
The following executor options are available:
Option | Type | Description | Default |
---|---|---|---|
name * | string | A name for the library. | |
description | string | The library used by Storm Software for building TypeScript applications. | |
directory * | string | A 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 ). | |
tags | string | Add tags to the library (used for linting). | |
strict | boolean | Whether to enable tsconfig strict mode or not. | true |
publishable * | boolean | Generate a publishable library. | |
importPath * | string | The library name used to import it, like @storm-software/my-awesome-lib. Required for publishable library. | |
buildable * | boolean | Generate a buildable library. | true |
setParserOptionsProject | boolean | Whether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons. | |
rootProject | boolean | Is 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.
Create a StormConfig JSON schema based on the workspace's project configurations
The following executor options are available:
Option | Type | Description | Default |
---|---|---|---|
outputFile * | string | The 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.
Create a new Neutral TypeScript library package in the Storm workspaces
The following executor options are available:
Option | Type | Description | Default |
---|---|---|---|
name * | string | A name for the library. | |
description | string | The library used by Storm Software for building TypeScript applications. | |
directory * | string | A 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 ). | |
tags | string | Add tags to the library (used for linting). | |
strict | boolean | Whether to enable tsconfig strict mode or not. | true |
publishable * | boolean | Generate a publishable library. | |
importPath * | string | The library name used to import it, like @storm-software/my-awesome-lib. Required for publishable library. | |
buildable * | boolean | Generate a buildable library. | true |
setParserOptionsProject | boolean | Whether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons. | |
rootProject | boolean | Is 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.
Create a new browser TypeScript library package in the Storm workspace
The following executor options are available:
Option | Type | Description | Default |
---|---|---|---|
name * | string | A name for the library. | |
description | string | The library used by Storm Software for building TypeScript applications. | |
directory * | string | A 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 ). | |
tags | string | Add tags to the library (used for linting). | |
strict | boolean | Whether to enable tsconfig strict mode or not. | true |
publishable * | boolean | Generate a publishable library. | |
importPath * | string | The library name used to import it, like @storm-software/my-awesome-lib. Required for publishable library. | |
buildable * | boolean | Generate a buildable library. | true |
setParserOptionsProject | boolean | Whether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons. | |
rootProject | boolean | Is 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.
Create styling source code from design tokens json file(s) exported from Figma Tokens Studio
The following executor options are available:
Option | Type | Description | Default |
---|---|---|---|
inputPath * | string | The path to the tokens json file(s) exported from Figma Tokens Studio. | |
type * | "tailwindcss" | "tamagui" | "all" | The type of code to generate based on the supplied tokens (TailWind CSS, Tamagui, etc.). | "tailwindcss" |
tsConfig * | string | Path to the typescript config file. | |
customActions | string | Path to the ts file exporting the custom actions to register. | |
customFileHeaders | string | Path to the ts file exporting the custom file headers to register. | |
customFilters | string | Path to the ts file exporting the custom filters to register. | |
customFormats | string | Path to the ts file exporting the custom formats to register. | |
customParsers | string | Path to the ts file exporting the custom parsers to register. | |
customTransformGroups | string | Path to the ts file exporting the custom transform groups to register. | |
customTransforms | string | Path to the ts file exporting the custom transform to register. | |
outputPath | string | The output path of the generated files. | |
deleteOutputPath | boolean | Delete the output path before building. | true |
platform | string | Build only the passed platform defined in the configuration. |
Please note: Option names followed by * above are required, and must be provided to run the executor.
Run nx build workspace-tools
to build the library.
Run nx test workspace-tools
to execute the unit tests via Jest.
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.
See the open issues for a list of proposed features (and known issues).
Reach out to the maintainer at one of the following places:
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.
This project adheres to Semantic Versioning. Every release, along with the migration instructions, is documented in the CHANGELOG file
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:
Please adhere to this project's code of conduct.
You can use markdownlint-cli to check for common markdown style inconsistency.
Thanks goes to these wonderful people (emoji key):
Patrick Sullivan 🎨 💻 🔧 📖 ⚠️ | Tyler Benning 🎨 | 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
FAQs
⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.
We found that @storm-software/workspace-tools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.