# gulp-jst-extend2

> Compile underscore/lodash view templates to JST file(s)

Latest version **0.1.3** (published 2018-01-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-jst-extend2
pnpm add gulp-jst-extend2
yarn add gulp-jst-extend2
bun add gulp-jst-extend2
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2018-01-22 |
| First published | 2017-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | mozuo |
| Maintainers | wuhao01 |
| Keywords | gulpplugin, jst, template, lodash, underscore |

## Links

- npm: https://www.npmjs.com/package/gulp-jst-extend2
- Repository: https://github.com/mozuo/gulp-jst-extend2
- Issues: https://github.com/mozuo/gulp-jst-extend2/issues
- npm.io page: https://npm.io/package/gulp-jst-extend2

## Dependencies (6)

- [jsdom](https://npm.io/package/jsdom.md) 11.4.0
- [jquery](https://npm.io/package/jquery.md) ^3.2.1
- [lodash](https://npm.io/package/lodash.md) ^3.0.1
- [through](https://npm.io/package/through.md) ~2.3.4
- [gulp-util](https://npm.io/package/gulp-util.md) ~2.2.14
- [jsdom-global](https://npm.io/package/jsdom-global.md) 3.0.2

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2018-01-22
- 0.1.2 — 2017-12-25
- 0.1.1 — 2017-11-29
- 0.1.0 — 2017-11-22

## README

# gulp-jst-extend2
Using lodash tempate to make the template modular management, each module is synthesized into a CMD or AMD JS, convenient for calling and management. This plug-in solves the problem of picture CDN cache, as long as the modified template, the path behind the picture will automatically compile and add version number

# gulp-jst-extend

> gulp plugin to compile underscore / lodash templates to js file(s).

Inspired by module [gulp-jst-concat](https://github.com/mozuo/gulp-jst-extend2.git) but this plugin add cmd/amd support, and will add more features soon.

## Install
Install using [npm](https://github.com/mozuo/gulp-jst-extend2.git).

    $ npm install gulp-jst-extend2


## Usage

``` js
gulp.task('jst', function(project, type, year) {
    if (!year) {
        year = new Date().getFullYear();
    }

    var jst = require('gulp-jst-extend');
    console.log("templatePath:" + templatePath)
    return gulp.src([type + '/project/' + year + '/' + project + '/source/tpl/**/*.html'])
        .pipe(changed(type + '/project/' + year + '/' + project + '/source/tpl/' + templatePath + '/', { extension: '.js' }))
        .pipe(jst('index.js', { renameKeys: ['^.*\/tpl\/.*\/(.*).html$', '$1'] }))
        .pipe(gulp.dest(type + '/project/' + year + '/' + project + '/source/js/tpl/' + templatePath + "/"))
        .on("end", function() {
            gulp.src(type + '/project/' + year + '/' + project + '/source/js/tpl/' + templatePath + '/*.js')
                .pipe(uglify({
                    output: {
                        ascii_only: true
                    }
                }))
                .pipe(gulp.dest(type + '/project/' + year + '/' + project + '/js/tpl/' + templatePath + "/"))
        })
});
```

More details please goto [gulp-jst-concat](https://github.com/tambourinecoder/gulp-jst-concat).

## License
MIT

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