Skip to content

sly-x86/rollup-plugin-encoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-encoding

Rollup plugin to convert files from one encoding to another, built on top of encoding package.

Installation

npm install --save-dev rollup-plugin-encoding

Usage

Add the following lines to your rollup.config.js:

import encoding from 'rollup-plugin-encoding';

export default {
    // ...
    plugins: [
        encoding({
            src: 'src/fileToEncode.js',
            dest: 'dist/encodedFile.cp1251.js',
            toCharset: 'CP1251',
            verbose: true
        })
    ]
}

or

import encoding from 'rollup-plugin-encoding';

export default {
    // ...
    plugins: [
        encoding([
            {src: 'src/fileToEncode1.js', dest: 'dist/encodedFile1.js', toCharset: 'CP1251'},
            {src: 'src/fileToEncode2.js', dest: 'dist/encodedFile2.js', toCharset: 'CP1251'},
            // ...
        ])
    ]
}

Options

  • src:<string>* - path to the file to be encoded
  • dest:<string>* - path where to put encoded file
  • toCharset:<string>* - the charset to convert to
  • fromCharset:<string> - (optional, default 'UTF-8') the source charset
  • verbose:<boolean> - (optional, default false) display verbose message

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published