Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Discussion about NPM module #261

Closed
alexandrtovmach opened this issue Mar 27, 2020 · 6 comments
Closed

Discussion about NPM module #261

alexandrtovmach opened this issue Mar 27, 2020 · 6 comments

Comments

@alexandrtovmach
Copy link
Contributor

Let's make this issue as central place to discuss question "do we need NPM module or not?"
cite from #250 (comment)

I'm actually thinking that it's a bit overhead to create npm module for localization purposes. It makes sense to create any of npm package to share functionality (or content in our case) between many projects. We have just two nodejs.org and nodejs.dev and sounds like a good catch, but... in new website we're using Gatsby/GraphQL, that can be extended with gatsby-source-git plugin to pull any of data directly from GitHub repo.

From my point of view we solved content delivery for nodejs.dev, so there no more reasons to create npm package, because it's going to be used just in one project - nodejs.org.

Please write your objections here, and let's make a decision. If everyone agrees that NPM module is not needed, these issues and PR will be closed.: #92 #93 #133 #245 #250

@nodejs/i18n
@nodejs/i18n-api

@zeke
Copy link
Contributor

zeke commented Mar 27, 2020

Thanks for bringing this all into one place.

Based on your feedback in #250 (comment), it seems like nodejs.dev will likely use a Gatsby plugin to get localized content directly from this git repo.

I'd still be in favor of exporting a lightweight version of the module as designed in #250, but NOT PUBLISHING it to npm. That way anyone can install directly from the master branch on GitHub using npm install nodejs/i18n. I see a few benefits to this:

  • Provides easy programmatic access to all the localized content.
  • Doesn't require us to establish a formalized npm versioning and releasing process.
  • Content lives in node_modules so it won't muck up git version control history when used in other projects.
  • Works without requiring git submodules or third-party tools like gatsby-source-git.

@alexandrtovmach
Copy link
Contributor Author

@zeke Totally makes sense, and I agree with this way. I'm just curious - where do you think we will use this module? =)

@zeke
Copy link
Contributor

zeke commented Apr 2, 2020

where do you think we will use this module?

I was imagining building a lightweight portable website desktop app that could be used to visually validate the localized content, independent of any external site like nodejs.org or nodejs.dev.

vmd is a Node.js module that contains an Electron app that renders Markdown with GitHub styles applied using github-markdown-css. I'd like to use this as inspiration.

I think it would be cool to be able to run npx nodejs-docs (or similar) and get a locally running desktop app with all the Node.js docs, a sidebar with a table of contents, nice styles that look like github.com, a dropdown for changing the node version, and a dropdown for changing the language.

Just an idea though 🤔

@JoseJPR
Copy link

JoseJPR commented Apr 17, 2020

👋 Hi all, sorry I'm late for this issue.

I see two different points after reading these ideas:

1.- On the one hand, the standardization of documentation files for both website .dev and .org.

I did not know this library (https://www.gatsbyjs.org/packages/gatsby-source-git/) but I think it can really give a solution for the .dev website. Keep updated an NPM library is more effort.

2.- On the other hand, the idea of ​​offering a lightweight portable website desktop version. And here I ask a question. Don't you think we can offer this feature with the current websites if they are turned to progressive web applications?

In this way the user can to install a version of website on their desktop or mobile and have access from an icon. With libraries such as Google's Workbox, you can design caching strategies to be able to force the updating content when it is necessary and when this application is opened by the user. For users with low internet connectivity always have a local version.

Cheers!

@alexandrtovmach
Copy link
Contributor Author

alexandrtovmach commented Apr 17, 2020

@zeke Nevermind, I'll close related stuff

@alexandrtovmach
Copy link
Contributor Author

Closing in favor #250

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants