# @itandu/utils

> Bundles node modules into specific format for Cromwell module loader. Similar to RequireJS.

Latest version **2.0.14** (published 2022-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @itandu/utils
pnpm add @itandu/utils
yarn add @itandu/utils
bun add @itandu/utils
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.14 |
| Published | 2022-02-21 |
| First published | 2022-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 36 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Itandu UG |
| Maintainers | ituadmin |

## Links

- npm: https://www.npmjs.com/package/@itandu/utils
- Repository: https://github.com/playrich/nextcms
- Homepage: https://github.com/playrich/nextcms#readme
- Issues: https://github.com/playrich/nextcms/issues
- npm.io page: https://npm.io/package/@itandu/utils

## Dependencies (36)

- [glob](https://npm.io/package/glob.md) 7.1.7
- [async](https://npm.io/package/async.md) 3.2.1
- [tslib](https://npm.io/package/tslib.md) 2.3.1
- [colors](https://npm.io/package/colors.md) 1.4.0
- [flatted](https://npm.io/package/flatted.md) 3.1.1
- [webpack](https://npm.io/package/webpack.md) 5.65.0
- [archiver](https://npm.io/package/archiver.md) 5.3.0
- [chokidar](https://npm.io/package/chokidar.md) 3.5.2
- [fs-extra](https://npm.io/package/fs-extra.md) 10.0.0
- [css-loader](https://npm.io/package/css-loader.md) 6.2.0
- [is-promise](https://npm.io/package/is-promise.md) 4.0.0
- [node-fetch](https://npm.io/package/node-fetch.md) 2.6.1
- [extract-zip](https://npm.io/package/extract-zip.md) 2.0.1
- [import-from](https://npm.io/package/import-from.md) 3.0.0
- [symlink-dir](https://npm.io/package/symlink-dir.md) 5.0.1
- [@itandu/core](https://npm.io/package/@itandu/core.md) 2.0.11
- [babel-loader](https://npm.io/package/babel-loader.md) 8.2.2
- [is-reference](https://npm.io/package/is-reference.md) 1.2.1
- [mock-require](https://npm.io/package/mock-require.md) 3.0.3
- [node-cleanup](https://npm.io/package/node-cleanup.md) 2.1.2
- [resolve-from](https://npm.io/package/resolve-from.md) 5.0.0
- [style-loader](https://npm.io/package/style-loader.md) 3.2.1
- [yargs-parser](https://npm.io/package/yargs-parser.md) 20.2.9
- [estree-walker](https://npm.io/package/estree-walker.md) 2.0.1
- [normalize-path](https://npm.io/package/normalize-path.md) 3.0.0
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) 7.14.5
- [@rollup/pluginutils](https://npm.io/package/@rollup/pluginutils.md) 4.1.1
- [@itandu/core-backend](https://npm.io/package/@itandu/core-backend.md) 2.0.12
- [@rollup/plugin-babel](https://npm.io/package/@rollup/plugin-babel.md) 5.3.0
- [crypto-random-string](https://npm.io/package/crypto-random-string.md) 3.3.0
- [@itandu/core-frontend](https://npm.io/package/@itandu/core-frontend.md) 2.1.1
- [@rollup/plugin-virtual](https://npm.io/package/@rollup/plugin-virtual.md) 2.0.3
- [@rollup/plugin-node-resolve](https://npm.io/package/@rollup/plugin-node-resolve.md) 13.0.4
- [github-directory-downloader](https://npm.io/package/github-directory-downloader.md) 1.3.6
- [rollup-plugin-external-globals](https://npm.io/package/rollup-plugin-external-globals.md) 0.6.1
- [babel-plugin-transform-commonjs](https://npm.io/package/babel-plugin-transform-commonjs.md) 1.1.6

## Recent versions

- 2.0.14 (latest) — 2022-02-21

## README

# Cromwell CMS node modules manager


## Node modules bundler & loader

Bundles node modules into specific format for Cromwell module loader. Similar to RequireJS.

```sh
npx cromwell bm
``` 
Will scan over packages for frontendDependencies array and bundle each module in ./.cromwell/bundled-modules
Cromwell bundler plugins for Rollup and Webpack after building theme or plugin emit imports map which is supposed to be used with such bundled node modules via this cli command.

### Options:

#### "--production" 
```sh
npx cromwell bm --production
``` 
Will enable production mode of webpack. Development by default.

### Rebundle
```sh
npx cromwell bm -r
``` 
Will delete all bundled modules and bundle new. 
By default "cromwella b" command bundles only newly found modules that aren't exist in ./.cromwell/bundled-modules (caching)


## Hoisting installation of node_modules in multi-package repositories.
### Deprecated. Use Yarn now.

Simplified alternative of Lerna package manager.
Overall depends on 18 packages in opposite of 750+ for Lerna.

Forces to use same module verions across all packages in development environment. 

### Config
Place cromwella.json file in the root of your multi-package repository. Works same as lerna.json:

```json
{
  "packages": [
    "packages/*", 
    "src/**"
  ]
}
```

### Usage

```sh
npx cromwell install
```

### Options:

#### "--production" 
Install only dependencies from packages, without devDependencies.
```sh
npx cromwell install --production
```

#### "--path=" 
Optional. Absolute path to the project root directory with cromwella.json config.
```sh
npx cromwell install --path=/path/to/my/project
```

#### "-f"
```sh
npx cromwell install -f
```
Will force to install different versions of modules in node_modules of local packages in development env. By default in "development" environment installation will be aborted with an error in such case.

---
_Source: https://npm.io/package/@itandu/utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
