Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Feb 18, 2018
1 parent e1366cd commit c9bf153
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Expand Up @@ -7,6 +7,6 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{package.json,*.yml}]
[*.yml]
indent_style = space
indent_size = 2
1 change: 0 additions & 1 deletion .travis.yml
@@ -1,4 +1,3 @@
sudo: false
language: node_js
node_js:
- '8'
Expand Down
20 changes: 4 additions & 16 deletions license
@@ -1,21 +1,9 @@
The MIT License (MIT)
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
72 changes: 36 additions & 36 deletions package.json
@@ -1,38 +1,38 @@
{
"name": "detect-indent",
"version": "5.0.0",
"description": "Detect the indentation of code",
"license": "MIT",
"repository": "sindresorhus/detect-indent",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"indent",
"indentation",
"detect",
"infer",
"identify",
"code",
"string",
"text",
"source",
"space",
"tab"
],
"devDependencies": {
"ava": "*",
"xo": "*"
}
"name": "detect-indent",
"version": "5.0.0",
"description": "Detect the indentation of code",
"license": "MIT",
"repository": "sindresorhus/detect-indent",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"indent",
"indentation",
"detect",
"infer",
"identify",
"code",
"string",
"text",
"source",
"space",
"tab"
],
"devDependencies": {
"ava": "*",
"xo": "*"
}
}
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -15,7 +15,7 @@ Pass in a string of any kind of text and get the indentation.
## Install

```
$ npm install --save detect-indent
$ npm install detect-indent
```


Expand Down
6 changes: 2 additions & 4 deletions test.js
@@ -1,11 +1,9 @@
import fs from 'fs';
import path from 'path';
import test from 'ava';
import m from './';
import m from '.';

function getFile(file) {
return fs.readFileSync(path.join(__dirname, file), 'utf8');
}
const getFile = file => fs.readFileSync(path.join(__dirname, file), 'utf8');

test('detect the indent of a file with space indent', t => {
t.is(m(getFile('fixture/space.js')).indent, ' ');
Expand Down

0 comments on commit c9bf153

Please sign in to comment.