Skip to content

Commit 0feee23

Browse files
authored
Merge pull request #20 from heldinz/gh-actions
Metadata and CI updates
2 parents 59fe326 + d9c7d8f commit 0feee23

File tree

7 files changed

+1513
-1173
lines changed

7 files changed

+1513
-1173
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ charset = utf-8
88
trim_trailing_whitespace = true
99
insert_final_newline = true
1010

11-
[package.json]
11+
[*.{json,yml}]
1212
indent_style = space
1313
indent_size = 2
1414

.github/workflows/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: ["main"]
5+
pull_request:
6+
branches: ["main"]
7+
8+
jobs:
9+
test:
10+
name: Test
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x, 22.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: "npm"
24+
- run: npm ci
25+
- run: npm test
26+
27+
coverage:
28+
name: Coverage
29+
runs-on: ubuntu-latest
30+
needs: test
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version: 20.x
37+
cache: "npm"
38+
- run: npm ci
39+
40+
- name: Coverage
41+
run: npm run coverage:lcov
42+
43+
- name: Coveralls
44+
uses: coverallsapp/github-action@v2.3.0

.github/workflows/node-ci.js.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

readme.md renamed to README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
# [gulp](http://gulpjs.com)-convert-encoding
2+
23
[![Build Status](https://travis-ci.org/heldinz/gulp-convert-encoding.svg?branch=master)](https://travis-ci.org/heldinz/gulp-convert-encoding)
34
[![Coverage Status](https://coveralls.io/repos/heldinz/gulp-convert-encoding/badge.svg?branch=main)](https://coveralls.io/r/heldinz/gulp-convert-encoding?branch=main)
45
[![NPM Downloads](https://img.shields.io/npm/dm/gulp-convert-encoding.svg)](https://www.npmjs.com/package/gulp-convert-encoding)
56

6-
> Convert files from one encoding to another using [iconv-lite](https://github.com/ashtuchkin/iconv-lite).
7-
7+
> Convert file encodings using [iconv-lite](https://github.com/ashtuchkin/iconv-lite).
88
99
## Install
1010

1111
```sh
12-
$ npm install --save-dev gulp-convert-encoding
12+
npm install --save-dev gulp-convert-encoding
1313
```
1414

15-
1615
## Usage
1716

1817
```js
19-
var gulp = require('gulp');
20-
var convertEncoding = require('gulp-convert-encoding');
21-
22-
gulp.task('default', function () {
23-
return gulp.src('src/file.txt')
24-
.pipe(convertEncoding({to: 'iso-8859-15'}))
25-
.pipe(gulp.dest('dist'));
18+
var gulp = require("gulp");
19+
var convertEncoding = require("gulp-convert-encoding");
20+
21+
gulp.task("default", function () {
22+
return gulp
23+
.src("src/file.txt")
24+
.pipe(convertEncoding({ to: "iso-8859-15" }))
25+
.pipe(gulp.dest("dist"));
2626
});
2727
```
2828

29-
3029
## API
3130

3231
### convertEncoding(options)
@@ -54,7 +53,7 @@ The target file encoding.
5453
##### iconv
5554

5655
Type: `object`
57-
Default: `{decode: {}, encode: {}}`
56+
Default: `{ decode: {}, encode: {} }`
5857

5958
Allows you to pass additional options into `iconv-lite`, for example [BOM Handling](https://github.com/ashtuchkin/iconv-lite#bom-handling).
6059

0 commit comments

Comments
 (0)