Skip to content

Commit

Permalink
meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 19, 2016
1 parent 4832474 commit 312164f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 39 deletions.
5 changes: 1 addition & 4 deletions .editorconfig
Expand Up @@ -7,9 +7,6 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

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

[*.md]
trim_trailing_whitespace = false
13 changes: 0 additions & 13 deletions .jshintrc

This file was deleted.

3 changes: 2 additions & 1 deletion .travis.yml
@@ -1,6 +1,7 @@
sudo: false
language: node_js
node_js:
- 'iojs'
- '6'
- '4'
- '0.12'
- '0.10'
12 changes: 5 additions & 7 deletions cli.js
Expand Up @@ -3,12 +3,10 @@
var meow = require('meow');
var osName = require('./');

meow({
help: [
'Example',
' os-name',
' OS X Mavericks'
]
});
meow([
'Example',
' $ os-name',
' macOS Sierra'
]);

console.log(osName());
11 changes: 6 additions & 5 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "os-name",
"version": "1.0.3",
"description": "Get the name of the current operating system. Example: OS X Mavericks",
"description": "Get the name of the current operating system. Example: macOS Sierra",
"license": "MIT",
"repository": "sindresorhus/os-name",
"author": {
Expand All @@ -14,7 +14,7 @@
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
"test": "xo && ava"
},
"files": [
"index.js",
Expand All @@ -23,7 +23,6 @@
"keywords": [
"cli-app",
"cli",
"bin",
"os",
"operating",
"system",
Expand All @@ -32,16 +31,18 @@
"title",
"release",
"version",
"macos",
"osx",
"windows",
"linux"
],
"dependencies": {
"meow": "^3.3.0",
"meow": "^3.7.0",
"osx-release": "^1.0.0",
"win-release": "^1.0.0"
},
"devDependencies": {
"mocha": "*"
"ava": "*",
"xo": "*"
}
}
17 changes: 8 additions & 9 deletions test.js
@@ -1,11 +1,10 @@
'use strict';
var assert = require('assert');
var osName = require('./');
import test from 'ava';
import m from './';

it('should return the name a OS', function () {
assert(osName().length > 0);
assert.strictEqual(osName('darwin', '14.0.0'), 'OS X Yosemite');
assert.strictEqual(osName('linux', '3.13.0-24-generic'), 'Linux 3.13');
assert.strictEqual(osName('win32', '5.1.2600'), 'Windows XP');
assert.strictEqual(osName('win32'), 'Windows');
test(t => {
t.true(m().length > 0);
t.is(m('darwin', '14.0.0'), 'OS X Yosemite');
t.is(m('linux', '3.13.0-24-generic'), 'Linux 3.13');
t.is(m('win32', '5.1.2600'), 'Windows XP');
t.is(m('win32'), 'Windows');
});

0 comments on commit 312164f

Please sign in to comment.