Skip to content

Commit

Permalink
remove support for node less than v4
Browse files Browse the repository at this point in the history
  • Loading branch information
75lb committed Jan 16, 2017
1 parent 3934c31 commit fd5abac
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 313 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ node_js:
- 6
- 5
- 4
- iojs
- 0.12
21 changes: 0 additions & 21 deletions es5/command-line-usage.js

This file was deleted.

38 changes: 0 additions & 38 deletions es5/content-section.js

This file was deleted.

85 changes: 0 additions & 85 deletions es5/content.js

This file was deleted.

87 changes: 0 additions & 87 deletions es5/option-list.js

This file was deleted.

50 changes: 0 additions & 50 deletions es5/section.js

This file was deleted.

5 changes: 0 additions & 5 deletions index.js

This file was deleted.

23 changes: 6 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
"description": "Generates command-line usage information",
"repository": "https://github.com/75lb/command-line-usage.git",
"license": "MIT",
"main": "index",
"main": "lib/command-line-usage",
"files": [
"es5",
"lib",
"index.js"
"lib"
],
"keywords": [
"terminal",
Expand All @@ -18,29 +16,20 @@
"generator"
],
"engines": {
"node": ">=0.12.0"
"node": ">=4.0.0"
},
"scripts": {
"docs": "jsdoc2md -t jsdoc2md/README.hbs --no-gfm lib/*.js > README.md; echo",
"test": "test-runner test/*.js",
"es5": "rm -rf es5 && babel --presets babel-preset-es2015 --no-comments lib --out-dir es5"
"test": "test-runner test/*.js"
},
"dependencies": {
"ansi-escape-sequences": "^3.0.0",
"array-back": "^1.0.3",
"table-layout": "^0.3.0",
"feature-detect-es6": "^1.3.1",
"array-back": "^1.0.4",
"table-layout": "^0.4.0",
"typical": "^2.6.0"
},
"devDependencies": {
"babel-preset-es2015": "^6.18.0",
"core-assert": "^0.2.1",
"jsdoc-to-markdown": "^2.0.1",
"test-runner": "^0.3.0"
},
"standard": {
"ignore": [
"es5"
]
}
}
16 changes: 8 additions & 8 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict'
var TestRunner = require('test-runner')
var commandLineUsage = require('../')
var a = require('core-assert')
const TestRunner = require('test-runner')
const commandLineUsage = require('../')
const a = require('assert')

var runner = new TestRunner()
const runner = new TestRunner()

runner.test('commandLineUsage(sections)', function () {
var definitions = [
const definitions = [
{
name: 'help',
description: 'Display this usage guide.',
Expand All @@ -30,7 +30,7 @@ runner.test('commandLineUsage(sections)', function () {
}
]

var sections = [
const sections = [
{
header: 'a typical app',
content: 'Generates something very important.'
Expand All @@ -41,14 +41,14 @@ runner.test('commandLineUsage(sections)', function () {
}
]

var result = commandLineUsage(sections)
const result = commandLineUsage(sections)
a.ok(/a typical app/.test(result))
a.ok(/Generates something very important/.test(result))
a.ok(/Display this usage guide/.test(result))
})

runner.test('header only, no content', function () {
var usage = commandLineUsage([
const usage = commandLineUsage([
{ header: 'header' }
])
a.ok(/header/.test(usage))
Expand Down

0 comments on commit fd5abac

Please sign in to comment.