# ed-lansawebpack-plugin

> Lansa repository Loader/Compiler for WebPack/Vue (Emmedata Srl)

Latest version **2.7.0** (published 2020-12-23) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install ed-lansawebpack-plugin
pnpm add ed-lansawebpack-plugin
yarn add ed-lansawebpack-plugin
bun add ed-lansawebpack-plugin
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.7.0 |
| Published | 2020-12-23 |
| First published | 2020-03-04 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | app.developer@emmedata.com |
| Maintainers | emmedataowner |
| Keywords | vue, LANSA, webpack, loader, compiler |

## Links

- npm: https://www.npmjs.com/package/ed-lansawebpack-plugin
- npm.io page: https://npm.io/package/ed-lansawebpack-plugin

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.7.0 (latest) — 2020-12-23
- 2.6.0 — 2020-12-10
- 2.5.4 — 2020-10-26
- 2.5.3 — 2020-10-22
- 2.5.2 — 2020-10-22
- 2.5.1 — 2020-10-22
- 2.5.0 — 2020-10-22
- 2.4.1 — 2020-10-20
- 2.4.0 — 2020-10-20
- 2.3.1 — 2020-05-06
- 2.3.0 — 2020-05-06
- 2.1.0 — 2020-04-30
- 2.0.3 — 2020-04-30
- 2.0.2 — 2020-04-30
- 1.5.0 — 2020-03-19
- … 7 more at https://npm.io/package/ed-lansawebpack-plugin/versions

## README

# ed-lansawebpack-plugin

Resolve LANSA repository *field*, *mtxtvars* and *messages* definitions and create a repository object to use in Vue projects.

### Installation

1. Add ed-lansawebpack-plugin to your project

```sh
$ npm install --save-dev ed-lansawebpack-plugin
```

2. Add the plugin in `vue.config.js`

```javascript
const LansaWebPackPlugin = require('ed-lansawebpack-plugin')
module.exports = {
    chainWebpack: config => {
        config.module
            .rule('vue-repo')
            .test(/\.vue$/)
            .exclude
                .add(/node_modules/)
                .end()            
            .use('ed-lansawebpack-plugin')
                .loader('ed-lansawebpack-plugin')
                .end();

        config.module
            .rule('js-repo')
            .test(/\.js$/)
            .exclude
                .add(/node_modules/)
                .end()            
            .use('ed-lansawebpack-plugin')
                .loader('ed-lansawebpack-plugin')
                .end();  
        
        config
            .plugin('LansaWebPackPlugin.compiler')
                .use(LansaWebPackPlugin.compiler, [{
                    devserver: {
                        host: 'localhost',
                        port: '8000',
                        path: '/lansa/getrepository'
                    }}])
                .end();        
}
```

3. Add **_repository_** reference in `main.js` 
```javascript
import repository from '../lansa/repository';
```
> **Warning!** the code **MUST** be inserted immediatly after  
> ```javascript
> import app from './app.vue';

### Usage

In `.vue` or `.js` sources the plugin will search for theese tags references:

* `v-ed-format` directive
* `p-lansa-field` attribute
* `$lansa.text` function
* `__LANSA__` template function (use when needs to decode LANSA repository objects in other parts of the program)
```javascript 
function __LANSA__(t) {return t;}
```

## License

`ed-lansawebpack-plugin` may be redistributed according to the [BSD 3-Clause License](LICENSE).

Copyright 2020

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