question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

We’ve been adding code without much thought to the overall directory structure. I suggest the following renames:

//net/http.ts -> //http/mod.ts
//net/file_server.ts -> //http/file_server.ts

//net/bufio.ts -> //io/bufio.ts

//net/textproto.ts -> //textproto/mod.ts

//path/index.ts -> //fs/path.ts
//mkdirp/index.ts -> //fs/mkdirp.ts

//logging/index.ts -> //log/mod.ts

//flags/index.ts -> //flags/mod.ts

//colors/index.ts -> //colors/mod.ts

Along with the associated tests.

If you’re worried about breaking existing code:

  1. People should link to tagged releases of deno_std … EG “https://deno.land/x/std@v0.2.4/net/http.ts” … we do not make stability guarantees for master.
  2. It’s better to make these changes now, when deno_std is young than later.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:23 (22 by maintainers)

github_iconTop GitHub Comments

3reactions
rycommented, Jan 14, 2019

I’m maybe open to deno.land registry hacks like that but this discussion is more about the style guide for deno in general.

  1. I think we all agree that index.ts is a bad idea because it comes with the wrong connotations.
  2. We’d like to avoid a lot of module specifiers that look like this “/foo/bar/mod.ts” - it’s a waste of space when “/foo/bar.ts” would work.
  3. We’d also like to avoid a lot of module specifiers that look like “/foo/bar/bar.ts” - also a waste of space.
  4. I’m hesitant to populate the root directory of deno_std with .ts files. It seems messy.

I feel like the ideal situation would be if we figured out some top level categories like “fs” and “net” that we could organize into? E.G.

//term/colors.ts
//fs/path.ts
//net/http.ts
3reactions
rycommented, Jan 12, 2019

@tunnckoCore I wrote about it in the style guide (README.md) of this project:

index.ts comes with the wrong connotations - and main.ts should be reserved for executable programs. The filename mod.ts follows Rust’s convention, is shorter than index.ts, and doesn’t come with any preconceived notions about how it might work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Home - Reorg
Reorg is a global provider of credit intelligence, data and analytics. · Investment Bankers · Investment Managers · Legal Professionals · Professional Services....
Read more >
REORG Charity | Helping Those Who Helped Us
REORG Charity is a community dedicated to helping our military, veterans and blue light workers.
Read more >
Reorg - Twitter
A global provider of credit intelligence, data and analytics. @ReorgAmericas · @ReorgAsia · @ReorgEMEA · @ReorgCovs_Amer.
Read more >
Getting Reorgs Right - Harvard Business Review
Research suggests that reorgs—and the uncertainty they provoke about the future—can cause greater stress and anxiety than layoffs, leading in about 60% of...
Read more >
Reorg. Definition & Meaning | Merriam-Webster Legal
What does the abbreviation reorg. stand for? Meaning: reorganization.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found