0.3.0 • Published 8 years ago

editorconfig-indent v0.3.0

Weekly downloads
105
License
MIT
Repository
github
Last release
8 years ago

editorconfig-indent Build Status

get indent_size and indent_style from .editorconfig file

Installation

$ npm install editorconfig-indent

Usage

var fs = require('fs')
var getIndent = require('editorconfig-indent')
var editorconfig = fs.readFileSync('.editorconfig', 'utf-8')

getIndent(editorconfig)

/*
{
    indentSize: {
        all: 4
    },
    indentStyle: {
        all: 'space'
    }
}
*/


/* specify the file extension */
getIndent(editorconfig, ['css', 'scss'])

/*
{
    indentSize: {
        all: 4,
        css: 2,
        scss: null
    },
    indentStyle: {
        all: 'space',
        css: null,
        scss: null
    }
}
*/

License

The MIT License (MIT)

Copyright (c) 2015 Masaaki Morishita

0.3.0

8 years ago

0.2.0

8 years ago

0.1.1

9 years ago

0.1.0

9 years ago