{"action":"created","issue":{"url":"https://api.github.com/repos/elm-lang/elm-make/issues/177","repository_url":"https://api.github.com/repos/elm-lang/elm-make","labels_url":"https://api.github.com/repos/elm-lang/elm-make/issues/177/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/elm-make/issues/177/comments","events_url":"https://api.github.com/repos/elm-lang/elm-make/issues/177/events","html_url":"https://github.com/elm-lang/elm-make/issues/177","id":250377991,"number":177,"title":"Feature Proposoal: Format Flag for JS vs HTML output","user":{"login":"maxsnew","id":1479741,"avatar_url":"https://avatars3.githubusercontent.com/u/1479741?v=4","gravatar_id":"","url":"https://api.github.com/users/maxsnew","html_url":"https://github.com/maxsnew","followers_url":"https://api.github.com/users/maxsnew/followers","following_url":"https://api.github.com/users/maxsnew/following{/other_user}","gists_url":"https://api.github.com/users/maxsnew/gists{/gist_id}","starred_url":"https://api.github.com/users/maxsnew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxsnew/subscriptions","organizations_url":"https://api.github.com/users/maxsnew/orgs","repos_url":"https://api.github.com/users/maxsnew/repos","events_url":"https://api.github.com/users/maxsnew/events{/privacy}","received_events_url":"https://api.github.com/users/maxsnew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-15T17:14:23Z","updated_at":"2017-08-15T17:14:24Z","closed_at":null,"body":"# Motivation\r\n\r\nAs a build tool for a web technology, `elm-make` is not just used directly by humans but also by build scripts that combine elm with programs written in other languages.\r\nThe current interface is optimized for direct human interaction, which is a fine default but should be overridable for unforeseen use-cases.\r\nSpecifically, `elm make Main.elm --output=main.js` parses the filename given in the `--output` option, meaning tools can't output to files that do not end in `js` or `html`.\r\n\r\n# Proposal: `--format` Flag\r\n\r\nMy proposal is to add a `--format` flag that would allow you to ignore the filename and declare the intended output format directly.\r\nCurrently you would have 2 options: `js,html` but we can easily add more in the future if needed.\r\n\r\n```\r\n# write js output to main.js\r\n> elm make Main.elm --output=main.js\r\n# writes js output to main\r\n> elm make Main.elm --format=js --output=main\r\n# write js output to main.html\r\n> elm make Main.elm --format=js --output=main.html\r\n```\r\n\r\nThis change would be backwards-compatible and wouldn't affect any user not using the feature except in that it makes `elm make -h` longer.\r\n\r\n# Use Case: Output to stdout\r\n\r\nOne non-obvious side effect of this would be to partially solve https://github.com/elm-lang/elm-make/issues/39 at least on unix-like systems using `/dev/stdout` as a filename:\r\n```\r\n# prints js compilation to stdout\r\n> elm make Main.elm --format=js --output=/dev/stdout\r\n```\r\nso this would make `elm make` much easier to use for scripting for the reasons lain out in that issue.\r\nI don't know enough about Windows to say for sure, but from some brief googling it looks like this would not solve #39 for them."},"comment":{"url":"https://api.github.com/repos/elm-lang/elm-make/issues/comments/322529286","html_url":"https://github.com/elm-lang/elm-make/issues/177#issuecomment-322529286","issue_url":"https://api.github.com/repos/elm-lang/elm-make/issues/177","id":322529286,"user":{"login":"process-bot","id":16453249,"avatar_url":"https://avatars0.githubusercontent.com/u/16453249?v=4","gravatar_id":"","url":"https://api.github.com/users/process-bot","html_url":"https://github.com/process-bot","followers_url":"https://api.github.com/users/process-bot/followers","following_url":"https://api.github.com/users/process-bot/following{/other_user}","gists_url":"https://api.github.com/users/process-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/process-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/process-bot/subscriptions","organizations_url":"https://api.github.com/users/process-bot/orgs","repos_url":"https://api.github.com/users/process-bot/repos","events_url":"https://api.github.com/users/process-bot/events{/privacy}","received_events_url":"https://api.github.com/users/process-bot/received_events","type":"User","site_admin":false},"created_at":"2017-08-15T17:14:24Z","updated_at":"2017-08-15T17:14:24Z","body":"Thanks for the issue! Make sure it satisfies [this checklist][checklist]. My human colleagues will appreciate it!\n\nHere is [what to expect next][expectations], and if anyone wants to comment, keep [these things][participation] in mind.\n\n[checklist]: https://github.com/process-bot/contribution-checklist/blob/master/issues.md\n[expectations]: https://github.com/process-bot/contribution-checklist/blob/master/expectations.md\n[participation]: https://github.com/process-bot/contribution-checklist/blob/master/participation.md"}}
{"actor":{"display_login":"process-bot"}}