open-index/open-npm huggingface dataset:
npm package: @spearhook/spearhook
Description: A minimal, pluggable, non-bundling web app pipeline
Author: viveleroi
Latest version: 0.0.8

# Spearhook

A minimal, pluggable, non-bundling web app pipeline.

## Why non-bundling?

Some projects need an easy pipeline for AMD or other fully-split formats, without having to fight against a bundler.

## Usage

Install, via yarn `yarn add --dev @spearhook/spearhook` or NPM `npm install --save-dev @spearhook/spearhook`.

Add a `spearhook.config.js` file to the root of your project.

Configure a list of files and plugins to flow them through:

```js
export default {
    input: 'src/app.js',
    plugins: [
        babel({
            presets: ['@babel/preset-env']
        }),
        writer((filepath) => filepath.replace('src', 'dist'))
    ]
};
```

Run `spearhook`.

## Writing Plugins

Create a new javascript file which exports a module.

Each plugin has three core pieces:

1. The initialization function, in which custom configuration options are provided.
2. A stream execution function, which returns a stream transformer.
3. File contents/path actor.

```js
import through2 from 'through2';

export default function(opts) {
    return () => through2.obj(function(file, encoding, cb) {
        // transform file.contents, act on file.path, etc

        // emit errors with this.emit('spearhook.error', ...);

        cb(null, file);
    });
};
```

The `file` argument is a [Vinyl](https://github.com/gulpjs/vinyl) `File` object.
npm package: @spearly/cms-js-core
Description: [日本語](./README_ja.md)
Author: Unimal.jp
Latest version: 1.0.19

[日本語](./README_ja.md)

# Spearly CMS JS Core module

## Feature

- Generate converted html string from specified html template string.
- Fetch content data.

## Concept : DO NOT MANIPULATE THE DOM

- This module **SHOULD NOT** use Browser DOM Manipulation.
  - This module should out of DOM world.
  - This module should use pure JavaScript.
  - Internally, this core library use html parser in order to search sub-loop element.

## Spec

### `generateContent`

`generateContent` will generate the one content html string from fetched data.

Params:

- templateHtml : template html string which using generate the html. This html string **SHOULD NOT** contain `cms-item` attributes. This mean that pass the innerHTML of element which has `cms-item`.
- contentId : Specify the content id want to fetch. or You can specify alias id.

Return:

- Generated content as html string.

Error:

- Throws Error when generator doesn't fetch or convert.