https://github.com/localvoid/gulp-replace-ids
Gulp plugin for replacing ids using predefined dictionary
https://github.com/localvoid/gulp-replace-ids
Last synced: about 1 year ago
JSON representation
Gulp plugin for replacing ids using predefined dictionary
- Host: GitHub
- URL: https://github.com/localvoid/gulp-replace-ids
- Owner: localvoid
- License: mit
- Created: 2015-08-17T11:29:42.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-23T10:44:11.000Z (over 10 years ago)
- Last Synced: 2025-01-25T06:25:23.626Z (about 1 year ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-replace-ids
[Gulp](http://gulpjs.com) plugin for replacing ids using predefined
dictionary.
## Install
```sh
$ npm install --save-dev gulp-replace-ids
```
## Usage
```js
var gulp = require('gulp');
var replaceIds = require('gulp-replace-ids');
gulp.task('default', function () {
return gulp.src('templates/*.tpl')
.pipe(replaceIds({
dict: 'build/css_map.json',
pattern: "{{\ *getCssName\ +\"([a-zA-Z0-9]+)\"\ *}}"
}))
.pipe(gulp.dest('build'));
});
```
## API
### replaceIds(options)
#### options
##### dict
Type: `String`
Path to the dictionary file.
##### pattern
Type: `String`
RegExp pattern to match ids.