# gulp-configration

> translate consts from propties files

Latest version **0.1.0** (published 2017-03-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-configration
pnpm add gulp-configration
yarn add gulp-configration
bun add gulp-configration
```

## 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.0 |
| Published | 2017-03-17 |
| First published | 2016-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | foolishchow |
| Maintainers | foolishchow |
| Keywords | translate, const, .propties |

## Links

- npm: https://www.npmjs.com/package/gulp-configration
- npm.io page: https://npm.io/package/gulp-configration

## Dependencies (1)

- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.7

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 0.1.0 (latest) — 2017-03-17
- 0.0.5 (gulp-configuration) — 2016-02-19
- 0.0.4 — 2016-02-19
- 0.0.3 — 2016-02-19
- 0.0.2 — 2016-02-19
- 0.0.1 — 2016-02-18

## README

gulp replace vars in javascript
----------

> useage

```shell
    npm install gulp-configuration --save
```

- in you `gulpfile.js`   
```javascript   

    var configration = require('gulp-configration');
    gulp.task('configration',function(){
        return gulp.src([
            'src/main.js'
        ])
        .pipe(configration('./vars/pre.vars.properties'))
        .pipe(gulp.dest('../dist'));
    });
```
- in your `src/main.js`   
```javascript 
    window.configurations = {};
    if( "${evn}".length == 3 ){
        configurations = {
            app_url : '${app_url}',
            InterFaceIp:'${InterFaceIp}',
            InterfaceUrl:'/Interface/core/postCtrl',
            headpicPreffix: '${headpicPreffix}/Interface/upload/showImg?remoteFile=',
            InterfaceName:'/Interface'
        }
    }else{
        configurations = {
            app_url: 'http://192.168.2.100:9300',
            InterFaceIp: 'http://10.20.16.74:8282',
            InterfaceUrl: '/Interface/core/postCtrl',
            UploadInterfaceUrl: '/Interface/upload/file',
            headpicPreffix: 'http://10.20.16.74:8282/Interface/attach/downloadFile?remoteFile=',
        }
    }
```

- in your `vars/pre.vars.properties`   
``` 
    evn=pre
    app_url=http://10.20.16.75:9300
    InterFaceIp=http://10.20.16.75:8018
    headpicPreffix=http://10.20.16.75:8018
```

- after configuration , your `src/main.js` would be   
```javascript
    if( "pre".length == 3 ){
        configurations = {
            app_url : 'http://10.20.16.75:9300',
            InterFaceIp:'http://10.20.16.75:8018',
            InterfaceUrl:'/Interface/core/postCtrl',
            headpicPreffix: 'http://10.20.16.75:8018/Interface/upload/showImg?remoteFile=',
            InterfaceName:'/Interface'
        }
    }else{
        configurations = {
            app_url: 'http://192.168.2.100:9300',
            InterFaceIp: 'http://10.20.16.74:8282',
            InterfaceUrl: '/Interface/core/postCtrl',
            UploadInterfaceUrl: '/Interface/upload/file',
            headpicPreffix: 'http://10.20.16.74:8282/Interface/attach/downloadFile?remoteFile=',
        }
    }
```

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