Skip to content

Commit 14ed77a

Browse files
authored
base: add description about deno task npm-build, minify and dry-publish. (#619)
1 parent 9a7be01 commit 14ed77a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,34 @@ The generated packages are placed in the `npm` directory and are ready to be
107107
published with `npm publish` or similar commands. This task is essential for
108108
releasing new versions of the library to npm.
109109

110+
- `deno task npm-build`: Build npm packages for all modules using dnt
111+
112+
The `deno task npm-build` command performs the npm package build process for all
113+
modules in the workspace. This is part of the full `deno task npm` pipeline and
114+
handles the conversion of Deno modules to npm-compatible packages. It runs the
115+
individual `npm-build` task for each package, which uses the
116+
[dnt](https://github.com/denoland/dnt) tool to transform TypeScript code into
117+
both ESM and CommonJS formats suitable for npm distribution.
118+
119+
- `deno task minify`: Generate minified versions of all packages
120+
121+
The `deno task minify` command creates minified JavaScript files for all
122+
packages in the workspace. This task runs the individual `minify` task for each
123+
package, which generates optimized, production-ready minified files suitable for
124+
browser environments. The minified files are saved to the corresponding npm
125+
package directories with `.min.js` extensions and can be used for CDN
126+
distribution or direct browser inclusion.
127+
128+
- `deno task dry-publish`: Test npm package publishing without actually
129+
publishing
130+
131+
The `deno task dry-publish` command simulates the npm publishing process for all
132+
packages without actually publishing them to the npm registry. This is useful
133+
for verifying that packages are properly structured and contain all necessary
134+
files before performing an actual release. It runs `npm pack --dry-run` for each
135+
package, which validates the package contents and shows what would be included
136+
in the published package.
137+
110138
### Code Quality
111139

112140
The project enforces code quality through the `deno task test` command, which

0 commit comments

Comments
 (0)