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

Publish a module to npm #92

Closed
zeke opened this issue May 31, 2018 · 4 comments
Closed

Publish a module to npm #92

zeke opened this issue May 31, 2018 · 4 comments

Comments

@zeke
Copy link
Contributor

zeke commented May 31, 2018

Once we've landed #57 and #77, we'll have translated content flowing into this repo in the form of markdown files sorted into subdirectories by node version and language. To make this translated content easier to consume by projects like nodejs/website-redesign, we should export a node module that is easy to install and easy to use. The name could be something like nodejs-i18n.

The existing electron-i18n module can be used as a reference:

  • Has no runtime dependencies
  • Exports a single JSON object
  • Exports pre-parsed GitHub-style HTML with hubdown, a collection of remark plugins.

The module exports an object with the following structure:

i18n.docs[language][path]

For example:

i18n.docs['en-US']['/docs/api/browser-window']

Each document object looks something like this:

{ 
  locale: 'en-US',
  slug: 'browser-window',
  category: 'api',
  href: '/docs/api/browser-window',
  githubUrl: 'https://github.com/electron/electron/tree/master/docs/api/browser-window.md',
  crowdinFileId: '68',
  title: 'BrowserWindow',
  description: 'Create and control browser windows.',
  html: '...' 
}
@lukaszewczak
Copy link
Contributor

Hi, @zeke I like this idea, how can I help with this?

@zeke
Copy link
Contributor Author

zeke commented Jun 1, 2018

@lukaszewczak once we land #99, we'll have all the files in place. If you want to start on this, feel free! Let me know if you need help or guidance on where to start.

@lukaszewczak
Copy link
Contributor

@zeke I definitely, want to try start with this :-), I will be back to you for some guidance when I will be ready to start work on this.

@alexandrtovmach
Copy link
Contributor

Closing in favor #261

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

4 participants