open-index/open-npm huggingface dataset:
npm package: @nice-labs/emit-file-webpack-plugin
Description: Emit a file to output directory
Author: septs
Latest version: 1.1.4

# @nice-labs/emit-file-webpack-plugin

Emit a file to output directory

## Installation

```bash
npm install --save-dev @nice-labs/emit-file-webpack-plugin
```

## Usage

```typescript
import { Configuration } from 'webpack'
import { emitFile } from '@nice-labs/emit-file-webpack-plugin'

const configuration: Configuration = {
  // ...
  plugins: [
    // ...
    emitFile({
      disabled: false, // disable the plugin
      name: '...', // output file name
      content: '...', // output file content
    }),
    // ...
  ],
  // ...
}

export default configuration
```

## LICENSE

[MIT](LICENSE)
npm package: @nice-labs/git-flow-init
Description: git-flow automate init on npm
Author: Septs
Latest version: 1.2.0
Deprecated: this package has been deprecated

# @nice-labs/git-flow-init

![node version](https://img.shields.io/node/v/@nice-labs/git-flow-init)
[![npm module](https://img.shields.io/npm/v/@nice-labs/git-flow-init)](https://www.npmjs.com/package/@nice-labs/git-flow-init)

git-flow automate init on npm

## Usage

```bash
# on npm install
npm install @nice-labs/git-flow-init

# generate git-flow config backup file to project root directory
npx @nice-labs/git-flow-init backup

# restore git-flow config to the project
npx @nice-labs/git-flow-init restore
```

## `.gitflow-rc.json` Discovery range

1. Project root directory
2. Project first-level subdirectory
npm package: @nice-labs/git-rev
Description: Synchronously get the current git commit hash, tag, or branch
Author: septs
Latest version: 3.5.1

# @nice-labs/git-rev

![node version](https://img.shields.io/node/v/@nice-labs/git-rev)
[![npm module](https://img.shields.io/npm/v/@nice-labs/git-rev)](https://www.npmjs.com/package/@nice-labs/git-rev)

Synchronously get the current git commit hash, tag, count, branch or commit message.

Forked from [git-rev-sync-js](https://github.com/kurttheviking/git-rev-sync-js).

## usage

```typescript
import git from '@nice-labs/git-rev';

// short commit-hash
console.log(git.commitHash(true)); // 75bf4ee

// long commit-hash
console.log(git.commitHash()); // 75bf4eea9aa1a7fd6505d0d0aa43105feafa92ef

// branch name
console.log(git.branchName()); // master
```

## installation

```bash
npm install --save-dev @nice-labs/git-rev
```
npm package: @nice-labs/react-cropper
Description: Cropper as React Component
Author: Septs
Latest version: 0.0.5
Deprecated: this package has been deprecated

# @nice-labs/react-cropper

<https://github.com/fengyuanchen/cropperjs> as React component

## Installation

```console
npm install --save @nice-labs/react-cropper
```

## LICENSE

[MIT](LICENSE)
npm package: @nice-labs/react-purecss
Description: PureCSS for React
Author: Septs
Latest version: 1.1.0
Deprecated: this package has been deprecated

[![npm version](https://badge.fury.io/js/%40nice-labs%2Freact-purecss.svg)](https://badge.fury.io/js/%40nice-labs%2Freact-purecss)

# @nice-labs/react-purecss

PureCSS for React Implemented

# Documentation

https://nicelabs.github.io/react-purecss/
npm package: @nice-labs/ts-import-plugin
Description: babel-plugin-import TypeScript version
Latest version: 2.1.1

[![npm version](https://badge.fury.io/js/%40nice-labs%2Fts-import-plugin.svg)](https://www.npmjs.com/package/@nice-labs/ts-import-plugin)

# @nice-labs/ts-import-plugin

Modular import plugin for TypeScript.

The library predefined supports:

- Functional library
  - lodash
  - ramda
  - async
  - date-fns
  - rxjs@5
  - rxjs@6
- UI framework
  - react-bootstrap
  - material-ui

# Why use this

transform such code:

```typescript
import _, { add } from "lodash";
import { getTime } from "date-fns";
_.chunk;
```

into:

```typescript
import add from "lodash/add";
import _$chunk from "lodash/chunk";
import getTime from "date-fns/get_time";
_$chunk;
```

# Usage with ts-loader (webpack)

```typescript
import webpack from "webpack";
import tsImportPluginFactory from "@nice-labs/ts-import-plugin";

const configure: webpack.Configuration = {
  // ...
  module: {
    rules: [
      {
        test: /\.tsx?$/,
        loader: require.resolve("ts-loader"),
        options: {
          compilerOptions: {
            module: "esnext"
          },
          getCustomTransformers: () => ({
            before: [
              tsImportPluginFactory(
                // predefined-names or ILibrary objects
                "lodash",
                "date-fns",
                {
                  // ILibrary object
                  libraryName: "antd",
                  libraryPath: "lib",
                  moduleName: "kebabCase",
                  appendPaths: path => `${path}/style/index.less`
                }
              )
            ]
          })
        }
      }
    ]
  }
  // ...
};

export default configure;
```

# ILibrary definition

Reference: [src/types.ts](src/types.ts)

# Compatible libraries

Reference: [src/libraries.ts](src/libraries.ts)

# About antd & antd-mobile supports

Reference: [test/test/antd.test.ts](test/test/antd.test.ts)

# License

see [LICENSE](LICENSE)
npm package: @nice-labs/typed-css-modules
Description: Typed CSS Modules
Author: Septs
Latest version: 1.3.0
Deprecated: this package has been deprecated

# @nice-labs/typed-css-modules

Creates TypeScript definition files from [CSS Modules](https://github.com/css-modules/css-modules) .css files.

If you have the following css,

```css
/* locals.css */

.local {
}
.local-1 {
}
```

typed-css-modules creates the following .d.ts files from the above css:

```ts
/* locals.css.d.ts */
interface ILocals {
  'local': string;
  'local-1': string;
  [name: string]: string;
}
declare const locals: ILocals;
export = locals;
```

So, you can import CSS modules' class or variable into your TypeScript sources:

```ts
/* app.ts */
import * as locals from './locals.css';
console.log(locals.local);
console.log(locals['local-1']);
```

## API

```sh
npm install -D @nice-labs/typed-css-modules
```

```ts
import * as fs from 'fs';
import { promisify } from 'util';
import { getModuleTokens, createTypeHint } from '@nice-labs/typed-css-modules';

const readFile = promisify(fs.readFile);

async function main() {
  const source = await readFile('locals.css');
  const tokens = await getModuleTokens(source); // ["local", "local-1"]
  const typeHint = createTypeHint(tokens); // d.ts file content
}

main();
```

## Webpack loader integrated

```ts
// webpack.config.ts
import webpack from "webpack";

import * as TypedCSSModules from "@nice-labs/typed-css-modules";

const configure: webpack.Configuration = {
  module：{
    rules: [
      // ...
      {
        test: /\.css$/,
        use: [
          [TypedCSSModules.loader, {
            mode: "local", // "local" | "global" (default is "local")
            camelCase: false // boolean (default is false)
          }],
          require.resolve("postcss-loader"),
        ]
      }
      // ...
    ]
  }
};

export default configure;
```

## Webpack plugin integrated

```ts
// webpack.config.ts
import TypedCSSModulesPlugin from '@nice-labs/typed-css-modules';

const configure: webpack.Configuration = {
  plugins: [
    // ...
    new TypedCSSModulesPlugin({
      mode: 'local', // "local" | "global" (default is "local")
      camelCase: false, // boolean (default is false)
      filesPattern: './src/**/*.css', // string | string[] (default is "./src/**/*.css")
    }),
    // ...
  ],
};

export default configure;
```

## License

This software is released under the MIT License, see LICENSE.txt.
npm package: @nice-move/all-in-base
Description: [![npm][npm-badge]][npm-url] [![github][github-badge]][github-url] ![node][node-badge]
Author: Eric Chen
Latest version: 0.8.2

# @nice-move/all-in-base

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[npm-url]: https://www.npmjs.com/package/@nice-move/all-in-base
[npm-badge]: https://img.shields.io/npm/v/@nice-move/all-in-base.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/modules/all-in-base
[github-badge]: https://img.shields.io/npm/l/@nice-move/all-in-base.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/all-in-base.svg?style=flat-square&colorB=green&logo=node.js

## Installation

```bash
npm install @nice-move/all-in-base --save-dev
```
npm package: @nice-move/all-in-react
Description: [![npm][npm-badge]][npm-url] [![github][github-badge]][github-url] ![node][node-badge]
Author: Eric Chen
Latest version: 0.8.2

# @nice-move/all-in-react

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[npm-url]: https://www.npmjs.com/package/@nice-move/all-in-react
[npm-badge]: https://img.shields.io/npm/v/@nice-move/all-in-react.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/modules/all-in-react
[github-badge]: https://img.shields.io/npm/l/@nice-move/all-in-react.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/all-in-react.svg?style=flat-square&colorB=green&logo=node.js

## Installation

```bash
npm install @nice-move/all-in-react --save-dev
```
npm package: @nice-move/all-in-vue
Description: [![npm][npm-badge]][npm-url] [![github][github-badge]][github-url] ![node][node-badge]
Author: Eric Chen
Latest version: 0.8.2

# @nice-move/all-in-vue

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[npm-url]: https://www.npmjs.com/package/@nice-move/all-in-vue
[npm-badge]: https://img.shields.io/npm/v/@nice-move/all-in-vue.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/modules/all-in-vue
[github-badge]: https://img.shields.io/npm/l/@nice-move/all-in-vue.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/all-in-vue.svg?style=flat-square&colorB=green&logo=node.js

## Installation

```bash
npm install @nice-move/all-in-vue --save-dev
```
npm package: @nice-move/all-in-web
Description: [![npm][npm-badge]][npm-url] [![github][github-badge]][github-url] ![node][node-badge]
Author: Eric Chen
Latest version: 0.8.2

# @nice-move/all-in-web

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[npm-url]: https://www.npmjs.com/package/@nice-move/all-in-web
[npm-badge]: https://img.shields.io/npm/v/@nice-move/all-in-web.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/modules/all-in-web
[github-badge]: https://img.shields.io/npm/l/@nice-move/all-in-web.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/all-in-web.svg?style=flat-square&colorB=green&logo=node.js

## Installation

```bash
npm install @nice-move/all-in-web --save-dev
```
npm package: @nice-move/cli
Description: Frontend develop helper for frontend development
Author: Eric Chen
Latest version: 0.11.31

# @nice-move/cli

Frontend develop helper for frontend development.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[npm-url]: https://www.npmjs.com/package/@nice-move/cli
[npm-badge]: https://img.shields.io/npm/v/@nice-move/cli.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/packages/cli
[github-badge]: https://img.shields.io/npm/l/@nice-move/cli.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/cli.svg?style=flat-square&colorB=green&logo=node.js

## Installation

```bash
npm install @nice-move/cli --save-dev
```

## Usage

```bash
npm exec nice-move <command>
```

## Commands

### `lint commit`

Lint git commit message.

Use [commitlint](https://commitlint.js.org/) to enforcing [conventional commits](https://conventionalcommits.org/).

```sh
#!/bin/sh

# file: .git/hooks/commit-msg

npm exec nice-move lint commit
```

### `lint staged`

Lint and format git staged files.

Install `eslint` / `stylelint` / `prettier` / `garou` when needed:

```bash
npm install eslint stylelint prettier garou --save-dev
```

Add configurations:

```jsonc
// file: package.json
{
  "eslintConfig": {},
  "prettier": {},
  "stylelint": {},
  "garou": {}
}
```

```sh
#!/bin/sh

# file: .git/hooks/pre-commit

npm exec nice-move lint staged
```

Change a few files, then run:

```bash
git add .
npm exec nice-move lint staged
```

## Related

- [@nice-move/init](../init)
- [@nice-move/commitlint-config](../commitlint-config)
- [@nice-move/eslint-config-base](../eslint-config-base)
- [@nice-move/eslint-config-react](../eslint-config-react)
- [@nice-move/eslint-config-vue](../eslint-config-vue)
- [@nice-move/stylelint-config](../stylelint-config)
- [@nice-move/prettier-config](../prettier-config)
npm package: @nice-move/commitlint-config
Description: A `commitlint` config created by personal preferences
Author: Eric Chen
Latest version: 0.10.13

# @nice-move/commitlint-config [<img src="https://commitlint.js.org/assets/icon.svg" alt="commitlint" height="80" align="right">][commitlint]

A [commitlint] config created by personal preferences.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[commitlint]: https://commitlint.js.org/
[npm-url]: https://www.npmjs.com/package/@nice-move/commitlint-config
[npm-badge]: https://img.shields.io/npm/v/@nice-move/commitlint-config.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/packages/commitlint-config
[github-badge]: https://img.shields.io/npm/l/@nice-move/commitlint-config.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/commitlint-config.svg?style=flat-square&colorB=green&logo=node.js

## Installation

```sh
npm install commitlint @nice-move/commitlint-config --save-dev
```

## Usage

```jsonc
// example: package.json
{
  "commitlint": {
    "extends": "@nice-move/commitlint-config"
  }
}
```

```sh
echo "foo" | commitlint
```

### Using by git hooks

```sh
#!/bin/sh

npx --no-install commitlint -e

# save this to: .githooks/commit-msg
```

```sh
git config core.hooksPath .githooks
git commit -m "foo"
```

## Tips

This config includes [@commitlint/config-conventional](https://www.npmjs.com/package/@commitlint/config-conventional), but case checking is disabled.
npm package: @nice-move/eslint-config-base
Description: A `eslint` config for best practice
Author: Eric Chen
Latest version: 0.15.1

# @nice-move/eslint-config-base [<img src="https://cdn.worldvectorlogo.com/logos/eslint-1.svg" alt="eslint" height="80" align="right">][eslint]

A [eslint] config for best practice.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[eslint]: https://eslint.org/
[npm-url]: https://www.npmjs.com/package/@nice-move/eslint-config-base
[npm-badge]: https://img.shields.io/npm/v/@nice-move/eslint-config-base.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/packages/eslint-config-base
[github-badge]: https://img.shields.io/npm/l/@nice-move/eslint-config-base.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/eslint-config-base.svg?style=flat-square&colorB=green&logo=node.js

## Installation

```bash
npm install eslint @nice-move/eslint-config-base --save-dev
```

## Usage

Add to eslint.config.mjs

```js
// example: eslint.config.mjs
export { default } from '@nice-move/eslint-config-base';
```

Then run

```bash
eslint --fix .
```

## Specification

| Environment | pattern                                |
| :---------- | :------------------------------------- |
| browser     | `.js`, `.html`                         |
| node.js     | `.mjs`, `.mts`, `.cjs`, `.cts`         |
| es modules  | `.mjs`, `.mts`, `.js`, `.html`         |
| commonjs    | `.cjs`, source code in webpack project |

## Tips

### Noiseless reporting

Rules can handle by [prettier](https://prettier.io/) and [garou](https://github.com/nice-move/garou) is disabled by default.

## Related

- [@nice-move/eslint-config-react](../eslint-config-react/)
- [@nice-move/eslint-config-vue](../eslint-config-vue/)
npm package: @nice-move/eslint-config-react
Description: A `eslint` config for `react` project best practice
Author: Eric Chen
Latest version: 0.15.1

# @nice-move/eslint-config-react [<img src="https://cdn.worldvectorlogo.com/logos/eslint-1.svg" alt="eslint" height="80" align="right">][eslint]

A [eslint] config for [react] project best practice.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[react]: https://reactjs.org/
[eslint]: https://eslint.org/
[npm-url]: https://www.npmjs.com/package/@nice-move/eslint-config-react
[npm-badge]: https://img.shields.io/npm/v/@nice-move/eslint-config-react.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/packages/eslint-config-react
[github-badge]: https://img.shields.io/npm/l/@nice-move/eslint-config-react.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/eslint-config-react.svg?style=flat-square&colorB=green&logo=node.js

## Installation

```bash
npm install eslint @nice-move/eslint-config-react --save-dev
```

## Usage

Add to eslint.config.mjs

```js
// example: eslint.config.mjs
export { default } from '@nice-move/eslint-config-react';
```

Then run

```bash
eslint --fix .
```

## Specification

| Environment | pattern                                |
| :---------- | :------------------------------------- |
| browser     | `.js`, `.html`, `.jsx`                 |
| node.js     | `.mjs`, `.mts`, `.cjs`, `.cts`         |
| es modules  | `.mjs`, `.mts`, `.js`, `.html`, `.jsx` |
| commonjs    | `.cjs`, source code in webpack project |

## Tips

### Noiseless reporting

Rules can handle by [prettier](https://prettier.io/) and [garou](https://github.com/nice-move/garou) is disabled by default.

## Related

- [@nice-move/eslint-config-base](../eslint-config-base/)
- [@nice-move/eslint-config-vue](../eslint-config-vue/)
npm package: @nice-move/eslint-config-vue
Description: A `eslint` config for `vue` project best practice
Author: Eric Chen
Latest version: 0.15.1

# @nice-move/eslint-config-vue [<img src="https://cdn.worldvectorlogo.com/logos/eslint-1.svg" alt="eslint" height="80" align="right">][eslint]

A [eslint] config for [vue] project best practice.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[vue]: https://vuejs.org/
[eslint]: https://eslint.org/
[npm-url]: https://www.npmjs.com/package/@nice-move/eslint-config-vue
[npm-badge]: https://img.shields.io/npm/v/@nice-move/eslint-config-vue.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/packages/eslint-config-vue
[github-badge]: https://img.shields.io/npm/l/@nice-move/eslint-config-vue.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/eslint-config-vue.svg?style=flat-square&colorB=green&logo=node.js

## Installation

```bash
npm install eslint @nice-move/eslint-config-vue --save-dev
```

## Usage

Add to eslint.config.mjs

```js
// example: eslint.config.mjs
export { default } from '@nice-move/eslint-config-vue';
```

Then run

```bash
eslint --fix .
```

## Specification

| Environment | pattern                                |
| :---------- | :------------------------------------- |
| browser     | `.js`, `.html`, `.vue`                 |
| node.js     | `.mjs`, `.mts`, `.cjs`, `.cts`         |
| es modules  | `.mjs`, `.mts`, `.js`, `.html`, `.vue` |
| commonjs    | `.cjs`, source code in webpack project |

## Tips

### Noiseless reporting

Rules can handle by [prettier](https://prettier.io/) and [garou](https://github.com/nice-move/garou) is disabled by default.

### TODO

- [ ] JSX for `vue`
- [ ] typescript in `vue` SFC

## Related

- [@nice-move/eslint-config-base](../eslint-config-base/)
- [@nice-move/eslint-config-react](../eslint-config-react/)
npm package: @nice-move/init
Description: Initialize your frontend workspaces
Author: Eric Chen
Latest version: 0.8.37

# @nice-move/init

Initialize your frontend workspaces.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[npm-url]: https://www.npmjs.com/package/@nice-move/init
[npm-badge]: https://img.shields.io/npm/v/@nice-move/init.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/packages/init
[github-badge]: https://img.shields.io/npm/l/@nice-move/init.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/init.svg?style=flat-square&colorB=green&logo=node.js

## Usage

```bash
mkdir sample # when needed

cd sample

npx @nice-move/init
```

## Features

- Confirm when workspace not empty or repository not clean
- Run `git init` when workspace not a git project
- Run a better `npm init` command when needed
- Create or overwrite `.gitignore` / `.gitattributes`
- Create or overwrite `LICENSE` / `.editorconfig`
- Create `README.md` when it not exists
- Set registry to China mirror in `.npmrc`
- Add or reset project dependencies by interactive

## Related

- [@nice-move/cli](../cli)
- [@nice-move/lint](../lint)
npm package: @nice-move/lint
Description: Linter of '@nice-move/cli'
Author: Eric Chen
Latest version: 0.6.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @nice-move/lint

Linter of '@nice-move/cli'.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[npm-url]: https://www.npmjs.com/package/@nice-move/lint
[npm-badge]: https://img.shields.io/npm/v/@nice-move/lint.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/packages/lint
[github-badge]: https://img.shields.io/npm/l/@nice-move/lint.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/lint.svg?style=flat-square&colorB=green&logo=node.js

## Usage

Use [@nice-move/cli](https://github.com/nice-move/nice-move/tree/master/packages/cli) instead.

## Related

- [@nice-move/cli](../cli)
- [@nice-move/init](../init)
npm package: @nice-move/prettier-config
Description: A `prettier` config created by personal preferences
Author: Eric Chen
Latest version: 0.15.8

# @nice-move/prettier-config [<img src="https://raw.githubusercontent.com/prettier/prettier-logo/master/images/prettier-icon-light.png" alt="prettier" height="80" align="right">][prettier]

A [prettier] config created by personal preferences.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[prettier]: https://prettier.io/
[npm-url]: https://www.npmjs.com/package/@nice-move/prettier-config
[npm-badge]: https://img.shields.io/npm/v/@nice-move/prettier-config.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/packages/prettier-config
[github-badge]: https://img.shields.io/npm/l/@nice-move/prettier-config.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/prettier-config.svg?style=flat-square&colorB=green&logo=node.js

## Extname support

- .gql .md
- .editorconfig
- .css .less .scss
- .cjs .mjs .js .jsx
- .yml .yaml .ini .json
- .htm .html .xml .svg .vue

## Filename support

- .npmrc
- .babelrc
- .sentryclirc
- .ssh/config ssh_config

### Mini progarm

- .acss
- .jxss
- .ttss
- .qss .qs
- .wxss .wxs

### Include plugins

- [@nice-move/prettier-plugin-package-json](https://github.com/nice-move/prettier-plugin-package-json)
- prettier-plugin-ini
- @prettier/plugin-xml
- prettier-plugin-css-order
- @nice-move/prettier-plugin-sort-imports

### Auto load plugins when they are installed

- [prettier-plugin-ssh-config]
- [prettier-plugin-groovy]
- prettier-plugin-java
- prettier-plugin-nginx
- prettier-plugin-tailwindcss
- @cospaia/prettier-plugin-clojure

### Addons support from kroki

- .bpmn
- .bytefield
- .excalidraw
- .markmap
- .vega
- .vegalite
- .wavedrom
- .wireviz

## Installation

```bash
npm install prettier @nice-move/prettier-config --save-dev
```

## Usage

Add to package.json

```jsonc
// example: package.json
{
  "prettier": "@nice-move/prettier-config"
}
```

Then run

```bash
prettier --write .
```

### Editorconfig support

```ini
# .editorconfig

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
quote_type = single
tab_width = 2
trim_trailing_whitespace = true
```

## Related

- [garou](https://github.com/nice-move/garou)
- [prettier-plugin-dbml](https://github.com/nice-move/prettier-plugin-dbml)
- [prettier-plugin-groovy]
- [prettier-plugin-ssh-config]

[prettier-plugin-ssh-config]: https://github.com/nice-move/prettier-plugin-ssh-config
[prettier-plugin-groovy]: https://github.com/nice-move/prettier-plugin-groovy
npm package: @nice-move/prettier-plugin-package-json
Description: A `prettier` plugin to make `package.json` prettier
Author: Eric Chen
Latest version: 0.9.2

# @nice-move/prettier-plugin-package-json

A [prettier] plugin to make `package.json` prettier.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[prettier]: https://prettier.io/
[npm-url]: https://www.npmjs.com/package/@nice-move/prettier-plugin-package-json
[npm-badge]: https://img.shields.io/npm/v/@nice-move/prettier-plugin-package-json.svg?style=flat-square&logo=npm
[github-url]: https://github.com/airkro/nice-move/tree/master/packages/prettier-plugin-package-json
[github-badge]: https://img.shields.io/npm/l/@nice-move/prettier-plugin-package-json.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/prettier-plugin-package-json.svg?style=flat-square&colorB=green&logo=node.js

Read about [npm-package.json](https://docs.npmjs.com/cli/v7/configuring-npm/package-json).

## Installation

```bash
npm install prettier @nice-move/prettier-plugin-package-json --save-dev
```

## Usage

```jsonc
// .prettierrc.json
{
  "overrides": [
    {
      "files": "package.json",
      "options": {
        "parser": "package-json"
      }
    }
  ]
}
```

```bash
prettier --write **/package.json
```

## Feature

[normalize-package-data]: https://github.com/npm/normalize-package-data
[normalize-package-bin]: https://github.com/npm/npm-normalize-package-bin

- Normalize by [normalize-package-data] and [normalize-package-bin]
- Sort `package.json` fields in a preset order
- Expand `author` and `contributors` fields into objects
- Remove deprecated fields like `preferGlobal`, `engineStrict`
- Merge `bundleDependencies` into `bundledDependencies`
- Rename `esnext` / `jsnext` to `module`, rename `typings` to `types`
- Differentiate `UNLICENSED` and `Unlicense` license by `private`
- Remove leading `./` from `main` / `files[n]`
- Normalize `engines.*` versions
- Normalize `repository` fields
- Set `version` when needed
- More ...

## Related

- [@nice-move/prettier-config](https://github.com/nice-move/nice-move/tree/master/packages/prettier-config)
npm package: @nice-move/stylelint-config
Description: A `stylelint` config created by personal preferences
Author: Eric Chen
Latest version: 0.10.27

# @nice-move/stylelint-config <img src="https://cdn.worldvectorlogo.com/logos/stylelint.svg" alt="logo" height="80" align="right">

A [stylelint] config created by personal preferences.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[stylelint]: https://stylelint.io/
[npm-url]: https://www.npmjs.com/package/@nice-move/stylelint-config
[npm-badge]: https://img.shields.io/npm/v/@nice-move/stylelint-config.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/packages/stylelint-config
[github-badge]: https://img.shields.io/npm/l/@nice-move/stylelint-config.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/stylelint-config.svg?style=flat-square&colorB=green&logo=node.js

## Supports

- Stylesheet in \*.{vue,html,htm,svg,md}
- [SCSS syntax](https://sass-lang.com/documentation/syntax#scss) / [Less syntax](https://lesscss.org/#overview)
- [CSS Modules exceptions - :global / :local](https://github.com/css-modules/css-modules#exceptions) in \*.module.{css,scss,less}, \*.vue
- [Interoperable CSS (ICSS) - :export](https://github.com/css-modules/icss#export) in \*.module.{css,scss,less}, \*.vue
- [Tailwind CSS](https://tailwindcss.com/) at rules when `tailwindcss` installed
- Mini Program Stylesheet limitation when needed

## Installation

```bash
npm install stylelint @nice-move/stylelint-config --save-dev
```

## Usage

Add to package.json

```jsonc
// example: package.json
{
  "stylelint": {
    "extends": "@nice-move/stylelint-config"
  }
}
```

Then run

```sh
stylelint --fix "**/*.{css,less,scss,vue,html,htm,md}"
```

## Tips

Some rules that covering by [Prettier](https://prettier.io/) / [Garou](https://github.com/nice-move/garou) are disabled.
npm package: @nice-move/syncpack-config
Description: A `syncpack` config created by personal preferences
Author: Eric Chen
Latest version: 0.5.4

# @nice-move/syncpack-config <img src="https://jamiemason.github.io/syncpack/logo.svg" alt="logo" height="80" align="right">

A [syncpack] config created by personal preferences.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[syncpack]: https://jamiemason.github.io/
[npm-url]: https://www.npmjs.com/package/@nice-move/syncpack-config
[npm-badge]: https://img.shields.io/npm/v/@nice-move/syncpack-config.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/packages/syncpack-config
[github-badge]: https://img.shields.io/npm/l/@nice-move/syncpack-config.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/syncpack-config.svg?style=flat-square&colorB=green&logo=node.js

## Installation

```bash
npm install @nice-move/syncpack-config --save-dev
```

## Usage

```mjs
// example: syncpack.config.mjs
// @ts-check
import defineConfig from '@nice-move/syncpack-config';

export default defineConfig(import.meta.url, {
  versionGroups: [
    {
      dependencies: ['@example/*'],
      label: 'Pin pnpm workspace',
      pinVersion: 'workspace:~'
    }
  ]
});
```
npm package: @nice-move/tsconfig
Description: A `typescript` config created by personal preferences
Author: Eric Chen
Latest version: 0.5.0

# @nice-move/tsconfig

A `typescript` config created by personal preferences.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[npm-url]: https://www.npmjs.com/package/@nice-move/tsconfig
[npm-badge]: https://img.shields.io/npm/v/@nice-move/tsconfig.svg?style=flat-square&logo=npm
[github-url]: https://github.com/nice-move/nice-move/tree/master/packages/tsconfig
[github-badge]: https://img.shields.io/npm/l/@nice-move/tsconfig.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/@nice-move/tsconfig.svg?style=flat-square&colorB=green&logo=node.js

## Installation

```bash
npm install @nice-move/tsconfig --save-dev
```

# Usage

```jsonc
// tsconfig.json
{
  "extends": "@nice-move/tsconfig/base.json"
}
```
npm package: @nice-winter/patcher
Description: A patch bundle.
Author: nice-winter
Latest version: 1.3.2

# Patcher [![npm](https://img.shields.io/npm/v/@nice-winter/patcher)](https://www.npmjs.com/package/@nice-winter/patcher) [![CI](https://github.com/nice-winter/patcher/actions/workflows/ci.yml/badge.svg)](https://github.com/nice-winter/patcher/actions/workflows/ci.yml)

A patch bundle.

## License

[MIT License](LICENSE)
npm package: @niceai/next-pwa
Description: PWA for Next.js, powered by Workbox.
Latest version: 0.0.0-dev.0

# Zero-config [PWA](https://web.dev/learn/pwa/) plugin for [Next.js](https://nextjs.org/)

This plugin is powered by [Workbox](https://developer.chrome.com/docs/workbox/) and other good stuff.

[![Build Size](https://img.shields.io/bundlephobia/minzip/@ducanh2912/next-pwa?label=Bundle%20size&style=flat&color=success)](https://bundlephobia.com/result?p=@ducanh2912/next-pwa)
[![Version](https://img.shields.io/npm/v/@ducanh2912/next-pwa?style=flat&color=success)](https://www.npmjs.com/package/@ducanh2912/next-pwa)

**NOTE:** If there's no specific reason to continue using `@ducanh2912/next-pwa`, consider migrating to [`@serwist/next`](https://github.com/serwist/serwist).

---

## Getting Started

Visit https://ducanh-next-pwa.vercel.app/docs/next-pwa/getting-started to get started with `next-pwa`.

## Documentation

Visit https://ducanh-next-pwa.vercel.app/docs/next-pwa to see the documentation.

## Community

You can ask questions, suggest features, and share your projects on [Github Discussions](https://github.com/DuCanhGH/next-pwa/discussions).

Please follow our [Code of Conduct](/CODE_OF_CONDUCT.md) when you communicate with other people.

## Contributing

Please see [our contributing guide](/CONTRIBUTING.md).

## Reference

1. [Google Workbox](https://developer.chrome.com/docs/workbox/what-is-workbox/)
2. [ServiceWorker, MessageChannel, & postMessage](https://ponyfoo.com/articles/serviceworker-messagechannel-postmessage) by [Nicolás Bevacqua](https://ponyfoo.com/contributors/ponyfoo)
3. [The service worker lifecycle](https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle)
4. [6 Tips to make your iOS PWA feel like a native app](https://www.netguru.com/codestories/pwa-ios)
5. [Make your PWA available on Google Play Store](https://www.netguru.com/codestories/make-your-pwa-available-on-google-play-store)
npm package: @nicebets/hooks
Description: [![npm](https://img.shields.io/npm/dm/@nicebets/hooks)](https://www.npmjs.com/package/@nicebets/hooks)
Author: Vitaly Rtishchev
Latest version: 7.1.4-alpha.4

# Mantine Hooks

[![npm](https://img.shields.io/npm/dm/@nicebets/hooks)](https://www.npmjs.com/package/@nicebets/hooks)

A set of react hooks for state and UI management

[View documentation](https://mantine.dev/)

## Installation

```bash
# With yarn
yarn add @nicebets/hooks

# With npm
npm install @nicebets/hooks
```

## License

MIT
npm package: @nicebuzzy/fetch-wrapper
Description: A simple fetch wrapper.
Author: nicebuzzy
Latest version: 1.0.1

# Fetch Wrapper

## Overview

A simple fetch wrapper.

## Installation

### Node

```bash
npm install @nicebuzzy/fetch-wrapper
```

### Browser

```html
<script type="module">
  import { request, get, post } from 'https://esm.run/@nicebuzzy/fetch-wrapper'
</script>
```

---

## Usage

`request` is a wrapper for `fetch` with a similar API.

```js
import { request, get } from '@nicebuzzy/fetch-wrapper'

try {
  const response = await request('https://example.com/posts/1')
  const json = await response.json()
} catch (error) {
  console.error(error)
}
```

`request` automatically sets the correct headers and applies `JSON.stringify` to the body if it is an object. Otherwise, it relies on the default behavior of the `fetch`. Any custom `options` passed to `request` will override both its defaults and any values it tries to set.

```js
import { post } from '@nicebuzzy/fetch-wrapper'

try {
  const body = { title: 'Hello, World!' }
  const response = await post('https://example.com/posts/add', { body })
  const json = await response.json()
} catch (error) {
  console.error(error)
}
```

---

## API Reference

#### `request(endpoint, options)`

`Returns`: `Promise<Response>`  

- `endpoint`: `String` | `URL`  
The URL to which the request is sent.

- `options`: `Object`  
Configuration options for the request.

  - `options.timeout`: `Number` (in milliseconds, default: `5000`)  
  If the request takes longer than this time, a TimeoutError will be thrown.

Refer to the [MDN](https://developer.mozilla.org/docs/Web/API/fetch) for details.

#### `get(), post(), put(), patch(), del(), head(), options()`
Helpers for making requests with specific HTTP methods.

---
npm package: @nicebuzzy/object-extractor
Description: A simple function to extract values from an object using a list of paths.
Author: nicebuzzy
Latest version: 2.0.0

# Object Extractor

## Overview

The `extract` function retrieves values from a source object using a list of paths. For each specified key, multiple paths can be provided, and the function returns the value from the first valid path found.

---

## Installation

### Node

```bash
npm install @nicebuzzy/object-extractor
```

### Browser

```html
<script type="module">
  import extract from 'https://esm.run/@nicebuzzy/object-extractor'
</script>
```

---

## Usage

```js
import extract from '@nicebuzzy/object-extractor'

const user = {
  theme: 'light'
}

const settings = {
  theme: 'dark',
  notifications: {
    email: true
  }
}

const variables = {
  username: ['name', 'username'],
  theme: ['theme'],
  notification: ['notifications.sms', 'notifications.email']
}

const result = extract(variables, user, settings)

console.log(result) // { theme: 'light', notification: true }
```

---

## API Reference

### `extract(variables, ...sources)`

**Returns**: `Object`

- **`variables`**: `Object`  
  An object where each key represents the name of the variable in the resulting object, and the value is an array of paths (as dot-separated strings) to search for the corresponding value in the `sources`.

- **`sources`**: `...Object`  
  One or more source objects from which values will be extracted. The function searches for values in the order of the provided sources, using the first valid path found.

---
npm package: @nicebuzzy/userscript-storage
Description: A wrapper for GM.getValue, GM.setValue, GM.deleteValue, etc.
Author: nicebuzzy
Latest version: 1.1.0

# Userscript Storage

## Overview

Userscript Storage is a simple wrapper for `GM.getValue`, `GM.setValue`, `GM.deleteValue`, etc.

---

## Installation

### Node

```bash
npm install @nicebuzzy/userscript-storage
```

### Userscripts

```js
// @require https://cdn.jsdelivr.net/npm/@nicebuzzy/userscript-storage/dist/userscript-storage.umd.js
```

---

## Usage

```js
const store = new Storage()

store.set('foo', 'bar')
store.set('baz', { qux: 'qux' })

store.get('foo') // 'bar'
store.get('baz') // { qux: 'qux' }
store.list() // { foo: 'bar', baz: { qux: 'qux' } }

store.insert('baz', { foo: 'bar' })
store.list() // { foo: 'bar', baz: { qux: 'qux', foo: 'bar' } }

store.remove('baz')
store.get('baz') // undefined
store.list() // { foo: 'bar' }

store.clear()
store.list() // {}
```

#### Using scopes

The `scope` option allows customization of key storage:

```js
const settings = new Storage({ scope: 'settings' })
```

Scoped instances only work with keys that match their scope:

```js
store.set('foo', 'bar')
settings.set('foo', 'bar')

store.list() // { foo: 'bar', settings: { foo: 'bar' } }
settings.list() // { foo: 'bar' }

settings.clear()
settings.list() // {}
store.list() // { foo: 'bar' }

store.clear() // clears all keys, including scoped ones
```

---

## API Reference

### Constructor

```js
const store = new Storage(options = {})
```

- `options`: `Object`  
  - `options.scope`: `String`


### Methods

#### `store.clear()`

Clears all entries in the storage.

#### `store.get(key, defaultValue = undefined)`

Retrieves the value for the given key. Returns `defaultValue` if the key is not found.

#### `store.keys()`

Returns all keys in the storage.

#### `store.list()`

Lists all key-value pairs in the storage.

#### `store.remove(key)`

Removes the specified key and its value from the storage.

#### `store.set(key, value)`

Adds or updates a key-value pair in the storage.

#### `store.insert(key, value)`

Adds values to an existing `key` whose value is an object or an array.

### Properties

#### `store.size`

Returns the number of keys stored.

#### static `Storage.grants`

A list of required `@grant` keys.

---
npm package: @nicecactus/ng-srm-wrapper
Description: - [Quick start](#quick-start) - [API Reference](#api-reference) - [NgSRMWrapper](#ngsrmwrapper)
Author: rgoupil
Latest version: 0.8.13

<h3 align="center">NG SRM Wrapper</h3>

<p align="center">
  Easily integrate SRM into your Angular application
</p>

<p align="center">
  <a href="https://badge.fury.io/js/%40robingoupil%2Fng-srm-wrapper"><img src="https://badge.fury.io/js/%40robingoupil%2Fng-srm-wrapper.svg" alt="npm version" ></a>
</p>

## Table of contents

- [Quick start](#quick-start)
- [API Reference](#api-reference)
  - [NgSRMWrapper](#ngsrmwrapper)

## Quick start

Install `@nicecactus/ng-srm-wrapper`:

- with [npm](https://www.npmjs.com/): `npm install -S @nicecactus/ng-srm-wrapper`
- with [yarn](https://yarnpkg.com/): `yarn add @nicecactus/ng-srm-wrapper`

Add the module to NgModule imports

#### **`AppModule`**
```ts
import { NgSRMWrapperModule } from '@nicecactus/ng-srm-wrapper';

@NgModule({
  ...
  modules: [ NgSRMWrapperModule, ... ],
  ...
})
```

Create a loader component for your SRM.  
We will assume that:
* the asset-manifest.json file url is stored in `environment.assetManifestUrl`  
* once loaded, the SRM `render()` function is exposed in `window.myOrg.myModule`
* the module will be served with the relative path `/my-module`


#### **`my-module-loader.component.ts`**
```ts
import { Component } from '@angular/core';

import { environment } from 'projects/my-project/src/environments/environment';

@Component({
  selector: 'app-my-modue-loader',
  templateUrl: './my-modue-loader.component.html',
})
export class MyModuleLoaderComponent {
  const assetManifestUrl = environment.assetManifestUrl;
}
```

#### **`my-module-loader.component.html`**
```html
<ng-srm-wrapper assetManifestUrl="{{assetManifestUrl}}" exportPath="myOrg.myModule" basename="/my-module"></ng-srm-wrapper>
```

Expose the loader in the app router

#### **`AppRoutingModule`**
```ts
const routes: Routes = [
  {
    path: 'my-module',
    children: [
        {
            path: '**',
            component: MyModuleLoaderComponent,
        },
    ],
  }
];
```

## API Reference

### [NgSRMWrapper](https://github.com/nicecactus/ng-srm-wrapper/blob/master/src/lib/ng-srm-wrapper.component.ts)

|||
|-|-|
| Selector | `ng-srm-wrapper` |

### Inputs
|||
|-|-|
| `assetManifestUrl` | Type: `string` <br /> URL to the `asset-manifest.json`. |
| `exportPath` | Type: `string` <br /> Path to the exported `render()` function once the module has been loaded. |
| `basename` | Type: `string` <br /> Default value: `/` <br /> Relative path the module is being served from. |
| `language` | Type: `string` <br /> Default value: `en` <br /> Language used for i18n. |
| `arguments` | Type: `object` <br /> Default value: `{}` <br /> Extra arguments to pass to the `render()` function. |
| `eventHandlers` | Type: `object` <br /> Default value: `{}` <br /> Custom events that can be called by the SRM. |

### Outputs
|||
|-|-|
| `loaded` | Type: `EventEmitter<HTMLElement>` <br /> Emits an event when the module has been loaded. |
| `rendered` | Type: `EventEmitter<any>` <br /> Emits an event when the module has been rendered. |
npm package: @nicecactus/react-srm-wrapper
Description: <h3 align="center">React SRM Wrapper</h3>
Author: rgoupil
Latest version: 0.1.6

<h3 align="center">React SRM Wrapper</h3>

<p align="center">
  Easily integrate SRM into your React application
</p>

<p align="center">
  <a href="https://badge.fury.io/js/%40robingoupil%2Freact-srm-wrapper"><img src="https://badge.fury.io/js/%40robingoupil%2Freact-srm-wrapper.svg" alt="npm version" ></a>
</p>

## Table of contents

- [Quick start](#quick-start)
- [API Reference](#api-reference)

## Quick start

Install `@nicecactus/react-srm-wrapper`:

- with [npm](https://www.npmjs.com/): `npm install -S @nicecactus/react-srm-wrapper`
- with [yarn](https://yarnpkg.com/): `yarn add @nicecactus/react-srm-wrapper`

Create a loader component for your SRM.  
We will assume that:
* the asset-manifest.json file url is stored in `.env`  
* once loaded, the SRM `render()` function is exposed in `window.myOrg.myModule`
* the module will be served with the relative path `/my-module`

#### **`MyModuleLoader.tsx`**
```tsx
import React from 'react'
import { ReactSRMWrapper } from '@nicecactus/react-srm-wrapper';

const MyModuleLoader = () => {
  return (
    <>
      <h2>React SRM wrapper</h2>
      <ReactSRMWrapper assetManifestUrl={process.env.REACT_APP_ASSET_MANIFEST_URL!} exportPath="myOrg.myModule" basename="/my-module" />
    </>
  )
};

export default MyModuleLoader;
```

Expose the loader in your router ([example for React Router](https://reactrouter.com/web/guides/quick-start/1st-example-basic-routing))

## API Reference

### [ReactSRMWrapper](https://github.com/nicecactus/react-srm-wrapper/blob/master/index.tsx)

|||
|-|-|
| Selector | `ReactSRMWrapper` |

### Inputs
|||
|-|-|
| `assetManifestUrl` | Type: `string` <br /> URL to the `asset-manifest.json`. |
| `exportPath` | Type: `string` <br /> Path to the exported `render()` function once the module has been loaded. |
| `basename` | Type: `string` <br /> Default value: `/` <br /> Relative path the module is being served from. |
| `language` | Type: `string` <br /> Default value: `en` <br /> Language used for i18n. |
| `arguments` | Type: `object` <br /> Default value: `{}` <br /> Extra arguments to pass to the `render()` function. |
| `eventHandlers` | Type: `object` <br /> Default value: `{}` <br /> Custom events that can be called by the SRM. |

### Outputs
|||
|-|-|
| `loaded` | Type: `(el: HTMLElement) => any` <br /> Emits an event when the module has been loaded. |
| `rendered` | Type: `(args: any) => any` <br /> Emits an event when the module has been rendered. |