BorrowScript
BorrowScript copied to clipboard
What will modules and the package index look like?
I personally like yaml because the task running steps can be multi line strings, we have comments and everyone knows it.
# project.yaml
scripts:
start: |
echo "Hello World"
dependencies:
main:
- "[email protected]/foo/bar.git"
optional:
- "[email protected]/foo/bar.git"
development:
- "[email protected]/foo/bar.git"
Not sure how I will describe dependencies. I quite like Go's use of git to share source, though that would limit packages that prefer to be distributed as private/compiled libraries.
Deno has a cool model too.
Broadly I would like to avoid a central repository like "npm"
I think copying Rust's Cargo.toml would be best.
On Thu, Sep 30, 2021, 8:28 AM David Alsh @.***> wrote:
I personally like yaml because the task running steps can be multi line strings, we have comments and everyone knows it.
project.yamlscripts:
start: | echo "Hello World"dependencies: main: - @./foo/bar.git" optional: - @./foo/bar.git" development: - @.***/foo/bar.git"
Not sure how I will describe dependencies. I quite like Go's use of git to share source, though that would limit packages that prefer to be distributed as private/compiled libraries.
Deno has a cool model too.
Broadly I would like to avoid a central repository like "npm"
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alshdavid/TypeScriptBC/issues/13, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDQCMSHE5WTAGXFY3QDEIDUERJWHANCNFSM5FCG2VXA .
The thing I like about yaml is that it's not foreign to anyone and it will allow for additional configuration to be added for things like the linter or the test runner.
If you stick with package.json and other similarities, it'll be easier for people to switch.
AssemblyScript, for example, uses package.json, and node_modules, making it easy for existing TS users to switch to it and using the same tools, VS Codes can provide intellisense using TypeScript and can find dependency types in node_modules like normal, eslint/prettier for formatting, etc.
If you reinvent all those conventions, it may be a lot more work.
I'd prefer using json5 if possible YAML has some extremely weird quirks and is best being avoided in my opinion even if it is more readable + its dependent on whitespace which I am not a fan of. Perhaps allowing for using both yaml or json5 might be better though. On the package repository side a centralised repository like npm would allow for easier adoption I'd imagine, perhaps having a standard repository with a focus on third party repositories and raw git sources might be a good idea?
I'd prefer using json5 if possible
Agree. 👍
Perhaps allowing for using both yaml or json5 might be better though.
Disagree. 👎
Having two different package formats is unnecessary complexity.
The thing I like about yaml is that it's not foreign to anyone and it will allow for additional configuration to be added for things like the linter or the test runner.
The exact same arguments work for JSON.
JSON is ubiquitous, universally supported, native to the web - and easy, simple and fast to parse.
I agree with everything above but expect push back against not allowing yaml and don't think its really worth trying to convince people otherwise. I'd preferably only use json5 for it but some people don't like json and do like yaml so the more people that are happier the better.