open-index/open-npm huggingface dataset:
npm package: @spinnakernordic/micro-components
Description: Microframework for mounting code on top of DOM elements
Latest version: 1.0.2

# Micro-components

Micro-components is a lightweight framework that allows code to be mounted on DOM elements.

## Installation

```bash
$ yarn add @spinnakernordic/micro-components
```

## Components

### Creating a component

```typescript
import type { ComponentType } from '@spinnakernordic/micro-components';

const Component: ComponentType = (node, { app, emitter }) => {
  console.log(node); // The DOM element
  console.log(app); // The app instance
  console.log(emitter); // Event emitter
};

export default Component;
```

### Registering a component

```typescript
import { App } from '@spinnakernordic/micro-components';

const app = new App({
  // Asynchronous, loads component with custom loaders/event listeners
  'my-component': ['mouseenter', () => import('components/my-component')],

  // Synchronous, loads component immediately
  'my-component': require('components/my-component'),
});

app.mount();
```

Create DOM element(s) with the attribute `data-component` containing the name of your component

```html
<div data-component="my-component"></div>
```

## Creating custom loaders

When default DOM events are not sufficient to load your component, you may want to create a custom loader.

```typescript
import type { ComponentLoaderType } from '@spinnakernordic/micro-components';

const Loader: ComponentLoaderType = ({ node, emitter }, load) => {
  // In this example we call load() on a custom event listener
  document.addEventListener('my-custom-event', load);

  // Return a function which disconnects the listener
  return () => {
    document.removeEventListener('my-custom-event', load);
  };
};

export default Loader;
```

### Register the loader on a component

```typescript
import customLoader from 'loaders/custom-loader',

const app = new App({
  'my-component': [customLoader, () => import('components/my-component')],
});

app.mount();
```

### Using multiple loaders

It is very simple to add multiple loaders for a component.
In cases where only regular events that are emitted from the node itself is used, you can pass a single string containing these.
If you want to combine multiple custom loaders, you can use an array.

```typescript
import customLoader from 'loaders/custom-loader',
import otherCustomLoader from 'loaders/other-custom-loader',

const app = new App({
  // Multiple regular events
  'my-component': ['mouseenter click', () => import('components/my-component')],
  
  // Combine multiple custom loaders
  'my-component': [
    [customLoader, otherCustomLoader, 'mouseenter'],
    () => import('components/my-component'),
  ],
});

app.mount();
```
npm package: @spinodev/copy-webpack-plugin-cached
Description: Copy files && directories with webpack
Author: Len Boyette
Latest version: 6.1.0
Deprecated: false

<div align="center">
  <a href="https://github.com/webpack/webpack">
    <img width="200" height="200"
      src="https://webpack.js.org/assets/icon-square-big.svg">
  </a>
</div>

# copy-webpack-plugin-cached

This is a personal use fix for the original https://www.npmjs.com/package/copy-webpack-plugin which does not work properly for me.

## Changes

I found that the copy plugin just always overwrites the files in my dist directory, so from logging i figured that "compilation.getAsset" and "compilation.updateAsset" weren't recognizing any existing files in the dist folder before the compilation (meaning they only recognized the files after they were copied again during the current compilation).

My fix: 

Added a cache file that saves mappings of (filePath, size) using fs. By default the path to this cache file is in node_modules folder, so you should overwrite that location.

Added a new var to the plugin constructor - "cacheLocation" - the path to where you want the cache file to be(including the cache file name).

example:

```js
new CopyPlugin({
    patterns:
        [
            {
                from: path.resolve(__dirname, './assets'),
                to: path.resolve(__dirname, './dist/assets'),
                force: false,
            },
        ]
        , options: {
            cacheLocation: path.resolve(__dirname, "./asset_cache/copy_cache"),
        }
}),
```
## License

All credits and license to the creators of the original plugin:
[MIT](./LICENSE)
npm package: @spinque/angular-ui
Description: Library containing Angular components to rapidly develop applications on top of Spinque APIs.
Author: Spinque B.V.
Latest version: 21.0.0

# SpinqueAngularUi

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.0.

## Code scaffolding

Run `ng generate component component-name --project spinque-angular-ui` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project spinque-angular-ui`.
> Note: Don't forget to add `--project spinque-angular-ui` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build spinque-angular-ui` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build spinque-angular-ui`, go to the dist folder `cd dist/spinque-angular-ui` and run `npm publish`.

## Running unit tests

Run `ng test spinque-angular-ui` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.