open-index/open-npm huggingface dataset:
npm package: @kornsupadej/setting-resolver
Description: My toolbox for project settings
Author: Kornsupadej Suvarnakasa
Latest version: 0.1.3

# :classical_building: @kornsupadej/setting-resolver

![eslint](https://img.shields.io/badge/eslint-v9.x-4b32c3?style=flat-square)
![nodejs](https://img.shields.io/badge/node.js-v18.18.x-green?style=flat-square)
![typescript](https://img.shields.io/badge/typescript-v5.x-3178c6?style=flat-square)

:toolbox: A toolbox for setting up new projects.

## :gear: Installation

```bash
npm i -D @kornsupadej/setting-resolver
```

## :open_book: Usage Example

**ESLint Configuration**

```js
// eslint.config.js
const { resolveSetting } = require("@kornsupadej/setting-resolver")

// For additional setting, `object` can be passed in `settingOptions`
module.exports = resolveConfig(
    // settingSpec: specify return type of setting & project properties
    {
        format: "flat",
        rootDir: __dirname,
        typescript: false,
        prettier: false
    },
    // settingOption: setting type that need to be resolved can be either string | object
    {
        type: "nodejs",
        options: {
            rules: {
                "no-unused-var": "off"
                "no-undef": "off"
            }
        }
    },
    "jest"
)

```

**Prettier Configuration**

```javascript
// prettier.config.js
const {
  resolvePrettierSetting,
} = require('@kornsupadej/setting-resolver/prettier')

// only resolve default setting
module.exports = resolvePrettierSetting()

// add or override default setting
module.exports = resolvePrettierSetting({
  semi: true,
  singleQutoe: false,
})
```

## Supported Setting

![javascript](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=JavaScript&logoColor=000)
![typescript](https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge&logo=typescript&logoColor=white)
![nodejs](https://img.shields.io/badge/node.js-339933?style=for-the-badge&logo=Node.js&logoColor=white)
![Mocha Badge](https://img.shields.io/badge/Mocha-8D6748?logo=mocha&logoColor=fff&style=for-the-badge)
![jest](https://img.shields.io/badge/Jest-323330?style=for-the-badge&logo=Jest&logoColor=white)
![Vitest Badge](https://img.shields.io/badge/Vitest-6E9F18?logo=vitest&logoColor=fff&style=for-the-badge)
![Prettier Badge](https://img.shields.io/badge/Prettier-F7B93E?logo=prettier&logoColor=fff&style=for-the-badge)
npm package: @korodrogerie/rsync-deployment
Description: Deployment script for CWC using rsync
Latest version: 1.4.2

# Rsync Deployment script

![npm](https://img.shields.io/npm/v/@korodrogerie/rsync-deployment)
![node-current (scoped)](https://img.shields.io/node/v/@korodrogerie/rsync-deployment)
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)

## Usage

The CLI script is meant to be run using `npx`:

```bash
npx @korodrogerie/rsync-deployment .
```

The script is taking one option which is the path which should be deployed.

Additionally you can enable debugging output of the script using the flag `-vvv` similar to Symfony's console application.

```bash
npx @korodrogerie/rsync-deployment . -vvv
```

Additionally to the debug parameter `-vvv` you can enable debug output using the env variable `DEBUG=*` too. It uses the NPM package [debug](https://www.npmjs.com/package/debug) which gives you additional output.

## Further information

The script is doing two things. It uses [rsync](https://linux.die.net/man/1/rsync) to sync the latest changes files to the different app nodes. Additionally it clears the cache of the app node after the sync is done.

To clear the cache we're renaming the `cache` directory first, delete it and create a new `cache` directory.

## License

Licensed under MIT

Copyright (c) 2020-present [Koro Handels GmbH](https://github.com/KoRoHandelsGmbH/)
npm package: @korodrogerie/webpack-plugin-mark-as-assets
Description: Webpack plugin which allows you to mark your Shopware 6 plugins as assets, so they're excluded from Shopware's all.js. The bundled JavaScript file can be included in your storefront theme where you want it.
Author: klarstil
Latest version: 1.0.1

# Webpack Plugin - Mark plugin as assets

Webpack plugin which allows you to mark your Shopware 6 plugins as assets, so they're excluded from Shopware's all.js. The bundled JavaScript file can be included in your storefront theme where you want it.

## Usage

Install the plugin as one of your NPM dev dependencies:

```bash
npm installl --save-dev @korodrogerie/webpack-plugin-mark-as-assets
```

Now create a new file called `storefront/build/webpack.config.js` to extend Shopware's Webpack building pipeline. Next up, extend the default Webpack configuration and add the plugin to it:

```js
module.exports = ({ config }) => {
    config.plugins.push(new WebpackMarkPluginsAsAssets({
        plugins: ['KoroProductOrigin']
    }));
}
```

The plugin requires an array of plugins which should be transformed. After the next `./psh.phar storefront:build` / `bin/build-storefront.sh` you're finding a new folder `storefront` inside the `public` folder of your Shopware 6 plugin.

### Usage in theme / template file

After copying the assets using the command `bin/console assets:install` you can use the Twig function `{{ assets() }}` to include your bundled JavaScript wherever you want to:

```twig
{{ asset('bundles/yourpluginname/yourpluginname.js') }}
```

## How it works

Shopware uses their own Webpack plugin called `WebpackCopyAfterBuild` which copies bundled JavaScript files from the `storefront` module to your Shopware 6 plugin. Afterwards Shopware collects all bundled JavaScript plugins inside a plugin when it's located inside a `dist` folder and compresses all found Shopware 6 plugins together into an `all.js` file.

This Webpack plugin allows you to intercept this behavior of Shopware. The plugin hooks into the step `afterPlugins` hook from Webpack which allows to modify Webpack plugin configurations.

Internally the plugin `WebpackCopyAfterBuild` contains a map containing chunk names and the corresponding destination path of the plugin.

This plugin alters the destination path and prevents Shopware's theme compiliation step to collect the bundled JavaScript files.

## License

Licensed under MIT

Copyright (c) 2020-present [Koro Handels GmbH](https://github.com/KoRoHandelsGmbH/)