{"action":"created","issue":{"url":"https://api.github.com/repos/ai/size-limit/issues/23","repository_url":"https://api.github.com/repos/ai/size-limit","labels_url":"https://api.github.com/repos/ai/size-limit/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/ai/size-limit/issues/23/comments","events_url":"https://api.github.com/repos/ai/size-limit/issues/23/events","html_url":"https://github.com/ai/size-limit/issues/23","id":261267913,"number":23,"title":"Improve NPX Support / Passing Config Options via CLI","user":{"login":"Saeris","id":3144549,"avatar_url":"https://avatars2.githubusercontent.com/u/3144549?v=4","gravatar_id":"","url":"https://api.github.com/users/Saeris","html_url":"https://github.com/Saeris","followers_url":"https://api.github.com/users/Saeris/followers","following_url":"https://api.github.com/users/Saeris/following{/other_user}","gists_url":"https://api.github.com/users/Saeris/gists{/gist_id}","starred_url":"https://api.github.com/users/Saeris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Saeris/subscriptions","organizations_url":"https://api.github.com/users/Saeris/orgs","repos_url":"https://api.github.com/users/Saeris/repos","events_url":"https://api.github.com/users/Saeris/events{/privacy}","received_events_url":"https://api.github.com/users/Saeris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-28T10:24:10Z","updated_at":"2017-09-28T11:05:48Z","closed_at":null,"author_association":"NONE","body":"Hey I discovered both this project and `npx` today thanks to your blog-post introducing `size-limit`. One immediate drawback that stood out to me from the documentation and a cursory glance at the source code, and that was the lack of ability to pass config options via the CLI.\r\n\r\nIt would be nice if I could just run `npx size-limit -p \"./src/index.js\" --why` and thanks to the magic of `npx` I can quickly see how bloated my project is without having to modify my project in any way. I think going forward this would also be an excellent way to get people to try it out, just for how friction-less it is.\r\n\r\nThis would go along great with #16 as well. I recently tried running `size-limit` on a project written in typescript, and obviously that's not going to work out of the box, especially when the webpack config for the project wasn't in the root directory.\r\n\r\nThanks for putting this out there! I'd make a PR for this change, but as a front-end dev I'm not very familiar with the ins and outs of writing node.js CLI scripts."},"comment":{"url":"https://api.github.com/repos/ai/size-limit/issues/comments/332803689","html_url":"https://github.com/ai/size-limit/issues/23#issuecomment-332803689","issue_url":"https://api.github.com/repos/ai/size-limit/issues/23","id":332803689,"user":{"login":"Saeris","id":3144549,"avatar_url":"https://avatars2.githubusercontent.com/u/3144549?v=4","gravatar_id":"","url":"https://api.github.com/users/Saeris","html_url":"https://github.com/Saeris","followers_url":"https://api.github.com/users/Saeris/followers","following_url":"https://api.github.com/users/Saeris/following{/other_user}","gists_url":"https://api.github.com/users/Saeris/gists{/gist_id}","starred_url":"https://api.github.com/users/Saeris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Saeris/subscriptions","organizations_url":"https://api.github.com/users/Saeris/orgs","repos_url":"https://api.github.com/users/Saeris/repos","events_url":"https://api.github.com/users/Saeris/events{/privacy}","received_events_url":"https://api.github.com/users/Saeris/received_events","type":"User","site_admin":false},"created_at":"2017-09-28T11:05:48Z","updated_at":"2017-09-28T11:05:48Z","author_association":"NONE","body":"Received the following:\r\n\r\n```shell\r\n$ npx size-limit ./src/index.js --why\r\nnpx: installed 1 in 2.047s\r\nPath must be a string. Received undefined\r\nC:\\Users\\Saeris\\AppData\\Roaming\\npm-cache\\_npx\\43864\\node_modules\\size-limit\\cli.js\r\n ERROR  Size Limit can't resolve\r\n        dns\r\n        in D:\\GitHub\\Flickr-Wormhole\\node_modules\\isemail\\lib\r\n```\r\n\r\nI haven't used `size-limit` on this project yet, so I don't think having run the command in that directory before would have anything to do with it, if that's a possible bug with `npx`."}}
{"actor":{"display_login":"Saeris"}}