Skip to content
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

Devise a way to lock the version of jk when generating configuration #180

Open
dlespiau opened this issue Apr 29, 2019 · 6 comments
Open
Labels
kind/enhancement New feature or request

Comments

@dlespiau
Copy link
Member

@palemtnrider made the comment that, if the goal is to always generate the same output for the same input script, it'd be a good idea to also ensure everyone (all developers but also CI, a potential future flux hook, ...) is running the same version of jk.

I was thinking we should support reading a .jkcfg config file in the current working directly where we could source options from instead of having them on the command line. That file could also hold the required jk version and jk could bail out if the its version doesn't match the specified version, eg.:

requiredVersion: 0.2.5
entrypoint: config.js
...
@dlespiau dlespiau added the kind/enhancement New feature or request label Apr 29, 2019
@errordeveloper
Copy link
Contributor

Doesn't package.json have something related to this?

@errordeveloper
Copy link
Contributor

@dlespiau
Copy link
Member Author

Yes, something like this indeed :) we can't mandate the presence of a package.json file though.

@errordeveloper
Copy link
Contributor

we can't mandate the presence of a package.json file though

Why? How would it be different from mandating presence of .jkcfg?

@dlespiau
Copy link
Member Author

dlespiau commented Apr 29, 2019

I don't know if we'll always use npm (and thus package.json) to handle our vendoring in the future. For instance deno (from the very same Ryan Dahl!) has switched away from npm to use HTTP directly:

import { serve } from "https://deno.land/std@v0.3.2/http/server.ts";

async function main() {
  const body = new TextEncoder().encode("Hello World\n");
  for await (const req of serve(":8000")) {
    req.respond({ body });
  }
}

main();

@errordeveloper
Copy link
Contributor

https://whatwg.github.io/loader/#intro ...interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants