Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata and CI updates #20

Merged
merged 5 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[package.json]
[*.{json,yml}]
indent_style = space
indent_size = 2

Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
test:
name: Test
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm test

coverage:
name: Coverage
runs-on: ubuntu-latest
needs: test

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- run: npm ci

- name: Coverage
run: npm run coverage:lcov

- name: Coveralls
uses: coverallsapp/[email protected]
27 changes: 0 additions & 27 deletions .github/workflows/node-ci.js.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

25 changes: 12 additions & 13 deletions readme.md → README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
# [gulp](http://gulpjs.com)-convert-encoding

[![Build Status](https://travis-ci.org/heldinz/gulp-convert-encoding.svg?branch=master)](https://travis-ci.org/heldinz/gulp-convert-encoding)
[![Coverage Status](https://coveralls.io/repos/heldinz/gulp-convert-encoding/badge.svg?branch=main)](https://coveralls.io/r/heldinz/gulp-convert-encoding?branch=main)
[![NPM Downloads](https://img.shields.io/npm/dm/gulp-convert-encoding.svg)](https://www.npmjs.com/package/gulp-convert-encoding)

> Convert files from one encoding to another using [iconv-lite](https://github.com/ashtuchkin/iconv-lite).

> Convert file encodings using [iconv-lite](https://github.com/ashtuchkin/iconv-lite).

## Install

```sh
$ npm install --save-dev gulp-convert-encoding
npm install --save-dev gulp-convert-encoding
```


## Usage

```js
var gulp = require('gulp');
var convertEncoding = require('gulp-convert-encoding');

gulp.task('default', function () {
return gulp.src('src/file.txt')
.pipe(convertEncoding({to: 'iso-8859-15'}))
.pipe(gulp.dest('dist'));
var gulp = require("gulp");
var convertEncoding = require("gulp-convert-encoding");

gulp.task("default", function () {
return gulp
.src("src/file.txt")
.pipe(convertEncoding({ to: "iso-8859-15" }))
.pipe(gulp.dest("dist"));
});
```


## API

### convertEncoding(options)
Expand Down Expand Up @@ -54,7 +53,7 @@ The target file encoding.
##### iconv

Type: `object`
Default: `{decode: {}, encode: {}}`
Default: `{ decode: {}, encode: {} }`

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

Expand Down
Loading