Skip to content

Commit

Permalink
Reproduction case for 75lb/command-line-args#99
Browse files Browse the repository at this point in the history
  • Loading branch information
dananderson committed Mar 13, 2019
0 parents commit 27cc107
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules

8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import commandLineArgs from 'command-line-args'

commandLineArgs([
{ name: 'verbose', alias: 'v', type: Boolean },
{ name: 'src', type: String, multiple: true, defaultOption: true },
{ name: 'timeout', alias: 't', type: Number }
]);

13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"devDependencies": {
"rollup": "^1.6.0",
"rollup-plugin-commonjs": "^9.2.1",
"rollup-plugin-node-resolve": "^4.0.1"
},
"dependencies": {
"command-line-args": "^5.0.2"
},
"scripts": {
"rollup": "rollup -c"
}
}
24 changes: 24 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'

export default [
{
input: 'index.js',
output: {
file: 'one.js',
strict: true,
format: 'cjs'
},
plugins: [
resolve({
jsnext: true,
main: true,
preferBuiltins: true
}),
commonjs({
include: ['./node_modules/**'],
ignore: true,
})
]
}
]

0 comments on commit 27cc107

Please sign in to comment.