-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add npm installer #288
Add npm installer #288
Conversation
Removes checking if bin is not directory. Since elm-format compress the binaries directly to the .tgz file and we already pass the uncompressed filename as `path` argument to unzip and untar, the check is unnecessary.
@avh4 let me know what your npm username is and I'll add you as an owner to the |
for version numbers, I think maybe we should only publish the elm-0.18 version via npm (it can be used for any other supported elm-version by passing and if we do want to publish other elm version versions, we could publish them as What do you think of that? |
Well, there's a slight risk of someone being a jerk and squatting on the package name before we can grab it. 😉 I presume the upside would be that you could do |
I guess there's also the issue that this would result in a lot of versions being listed when you looked at the module. Arguably that's a good thing though; would let you see all the supported combinations all in one place. 🤔 |
Ah, okay. Well I think we should start with only publishing elm-format that defaults |
Wouldn't |
yes, typo :)
…On Jan 7, 2017 4:15 PM, "Richard Feldman" ***@***.***> wrote:
Wouldn't ***@***.*** be more appropriate than 5.2.0?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#288 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAExmskJQZV2rRzdp5KYQtB5M3OWRzVks5rQCqvgaJpZM4LdYGE>
.
|
@avh4 I made the package change, so I think the only thing remaining is to add some quick Travis tests to show that it installs and runs. What I've done for these in the past is to write |
package/npm/install.js
Outdated
var packageInfo = require(path.join(__dirname, "package.json")); | ||
|
||
// Use major.minor.patch from version string - e.g. "1.2.3" from "1.2.3-alpha" | ||
var binVersion = packageInfo.version.match(/^(\d+\.\d+\.\d+).*$/)[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does bintray not allow prerelease identifiers?
(CI ❌ because the prs/branches were deleted before CI finished) |
To try it out: (this will install
elm-format 0.5.2-alpha
for Elm 0.18)Should work on the 64-bit versions of:
Notes
It installs
elm-format
versions based on theversion
specified inpackage.json
, which is set up to include both theelm-format
version and the Elm version.For example, to explicitly get the latest version, you'd run
npm install -g elm-format@0.5.2-elm0.18.0
(although in the case of the absolute latest version you could always just donpm install -g elm-format
)This means when publishing a new version, you'd need to publish all the combinations as separate npm package releases.
TODO
Add CI tests like what
elm-platform
uses, to verify all the combinations download and install successfully.