# gulp-transform-interface

> A plugin for gulp that will compile Java-style interfaces to Javascript

Latest version **1.0.1** (published 2016-07-02) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install gulp-transform-interface
pnpm add gulp-transform-interface
yarn add gulp-transform-interface
bun add gulp-transform-interface
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-07-02 |
| First published | 2016-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Frederik Wessberg |
| Maintainers | wessberg |
| Keywords | gulp, interface, transform, java, javascript |

## Links

- npm: https://www.npmjs.com/package/gulp-transform-interface
- Repository: https://github.com/dlmma/gulp-transform-interface
- Homepage: https://github.com/dlmma/gulp-transform-interface#readme
- Issues: https://github.com/dlmma/gulp-transform-interface/issues
- npm.io page: https://npm.io/package/gulp-transform-interface

## Dependencies (1)

- [readable-stream](https://npm.io/package/readable-stream.md) ^2.0.4

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-07-02
- 1.0.0 — 2016-06-25

## README

# gulp-transform-interface

A plugin for gulp that will compile Java-style interfaces to Javascript.

## Installation

```
$ npm install gulp-transform-interface --save-dev
```

## Use case

This plugin will extend the Javascript language with interface declarations like you know them from Java.

Here's the syntax you can now use:

```javascript
interface FooBar {
    isFoo = Boolean;
    barCollection = Map;
    sayFoo(arg1, arg2);
    doBar();
}
```

This compiles down to the following ES2015 code:
```javascript
const FooBar = {
    isFoo: Boolean,
    barCollection: Map,
    sayFoo(arg1, arg2){},
    doBar(){}
}
```

Combining this with the npm package `gulp-class-implements-polymerjs` gives the possibility for declaratively implementing interfaces by
supporting the Java-inspired `class <subclass> extends <class> implements <interface>` syntax.

interfaces are NOT part of the official ES2015 module spec. Be aware that the syntax this plugin expects isn't and probably never will be officially supported.

## Usage

Simply add it to your `gulpfile.js`:

```javascript
const INTERFACE_EXTENSION = require('gulp-transform-interface');

    gulp.src("./components/**/*.*")
        .pipe(INTERFACE_EXTENSION())
        .pipe(gulp.dest(COMPILED_DIRECTORY + "/components"));
```

## License
Copyright (c) 2016 Dlmma IVS. Released under the MIT license.

[npm-url]: https://npmjs.org/package/gulp-transform-interface
[npm-image]: https://badge.fury.io/js/gulp-transform-interface.svg

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