Gathering detailed insights and metrics for nx-simple
Gathering detailed insights and metrics for nx-simple
Gathering detailed insights and metrics for nx-simple
Gathering detailed insights and metrics for nx-simple
@ns3/nx-serverless
A simple plugin for running sls commands in nx monorepo. It executes serverless commands in specific app directory. It is configured to support nx cache out of the box for build and deploy commands.
nx-occjs
simple opencascadejs
cypress-testrail-simple-nx
Simple upload of Cypress test results to TestRail
graph-tool-nx-prototype
a simple nx graph representation
npm install nx-simple
Typescript
Module System
Node Version
NPM Version
35
Supply Chain
57.3
Quality
70.2
Maintenance
50
Vulnerability
94.6
License
Love this project? Help keep it running β sponsor us today! π
Total Downloads
1,401
Last Day
1
Last Week
2
Last Month
45
Last Year
214
Latest Version
0.1.11
Package Id
nx-simple@0.1.11
Unpacked Size
75.93 kB
Size
19.37 kB
File Count
40
NPM Version
8.19.1
Node Version
18.12.1
Published on
Mar 17, 2023
Cumulative downloads
Total Downloads
Last Day
-50%
1
Compared to previous day
Last Week
-86.7%
2
Compared to previous week
Last Month
200%
45
Compared to previous month
Last Year
-82%
214
Compared to previous year
5
1
A lightweight alternative to @nrwl/js.
Designed to slot into Nx monorepos and play nicely with other tools.
See also comparison with @nrwl/js
.
npm install nx-simple
Compiles TypeScript projects for consumption by other build tools, bundlers and dev servers e.g. ts-node, vite, esbuild etc.
Compiles, type checks, and packages TypeScript projects for publication to NPM, deployment as an app, or inclusion within another packagable project.
nx-simple aims to achieve the simplicity of a package-based repo, while retaining some of the power of an integrated repo.
The main difference with @nrwl/js is nx-simple's approach to module resolution. Packages built by nx-simple can be resolved by setting up NPM workspaces, rather than relying on upstream plugins. This simplifies interoperability β if a package exists in node_modules, every bundler, dev server, and test runner will be able to resolve it.
Architecturally, this is enabled by providing two executors:
{projectRoot}/dist
){workspaceRoot}/dist/{projectName}
)Additional differences:
package.json
, tsconfig.json
and .swcrc
) to determine its behaviour.nx-simple aims to maximise compatibility with other tools in the ecosystem. This table provides an overview of how and why compatibility is achieved.
Tooling | Setup | Explanation |
---|---|---|
π’ Build tools (ts-node, esbuild, webpack etc.) | using the build executor and setting up NPM workspaces | Build tools will resolve the package to the compiled code without the need for any custom path mappings |
π’ Intellisense | setting up package.json types field | Imports are resolved to their source files when using features like "Go to definition" |
π’ Single-version monorepos | using the package executor to detect dependencies | A separate package is built with a generated package.json (including any detected dependencies) |
π Publishing/versioning tools1 | using the package executor to create distributable packages | Versioning is applied to source packages as normal. Only packages built to {workspaceRoot}/dist should be published. |
{workspaceRoot}/dist/{projectName}
) is published.The package executor generates a package in {workspaceRoot}/dist/{projectName}
so that it can make changes to the source package.json. This is necessary in any of these scenarios:
types
field points to a source file rather than a generated .dts file (so intellisense is always using the latest types without needing a potentially slow re-compile). When the package is published, .d.ts
files are created and the types
field is removed from package.json.This plugin aims to achieve a predictable and cohesive development experience by adhering to the following design principles:
module
exports condition for bundlers e.g. webpack, esbuildFeel free to open an issue to bump any of these points.
Contributions and feedback are welcome! Todo: write some contribution guidelines. When proposing new features, keep in mind the design (principles)[#principles].
MIT
No vulnerabilities found.
No security vulnerabilities found.