Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

twinkle-core

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twinkle-core

This is intended to be the "core" repository for [Twinkle](https://en.wikipedia.org/wiki/Wikipedia:Twinkle) using which Twinkle installations for different wikis can be created (for example: [twinkle-enwiki](https://github.com/wikimedia-gadgets/twinkle-st

  • 3.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
73
increased by102.78%
Maintainers
1
Weekly downloads
 
Created
Source

twinkle-core

This is intended to be the "core" repository for Twinkle using which Twinkle installations for different wikis can be created (for example: twinkle-enwiki)

The twinkle-starter repository provides a template using which a new Twinkle installation can be started off easily. Each twinkle installation relies on twinkle-core as an npm dependency. Please refer to the README of twinkle-starter for instructions on setting up twinkle for a new wiki.

Download stats

Documentation for twinkle-core is hosted on Toolforge. Check it out at https://tools-static.wmflabs.org/twinkle/core-docs (alternative link).

Twinkle-core uses orange-i18n for internationalisation. A fork of banana-i18n, it uses the same format for messages as MediaWiki. Translations are coordinated via translatewiki.net. See https://translatewiki.net/wiki/Translating:Twinkle for contributing translations.

Contributing

  • Set up an IDE or code editor to work with JS/TS. Popular choices include Visual Studio Code or one of the JetBrains IDEs if you have a licence (JetBrains offers free licenses to MediaWiki contributors and students). If you are a command line veteran, check out TypeScript for Vim or emacs!
  • Work on twinkle-core is usually done while developing or testing a localised twinkle installation (such as twinkle-enwiki). In twinkle-enwiki, all imports from twinkle-core are used through the gateway file core.ts file. Change export * from 'twinkle-core';there to export * from '../../twinkle-core/src/index';. (Assuming that you have twinkle-core and twinkle-enwiki cloned as sibling directories).
    • Some other projects such as WVUI follow a somewhat more systematic workflow. You can also try this method though it wasn't working reliably for me.
  • Try to ensure all documentation comments align with the TSDoc standard, and what Typedoc supports.
  • Ensure that code at the top level (that is, code at 0 level of indentation as well as class property initialisations) don't have usages of msg() as msg will only work once initMessaging() is run.
  • This library has no side effects. Never do anything at the top level that impacts the DOM or changes the state of any globally available variable, as that affects tree-shaking. All such code must be within a function that is exported and called only by the client twinkle installation.
  • There do exist many TypeScript type errors currently. They should be avoided but are not disallowed if there isn't actually a bug.

Workflows

Credits

Thanks to the authors of wikimedia-gadgets/twinkle from which the code is adapted.

This repository was created by siddharthvp (SD0001) as part of Grants:Project/Rapid/SD0001/Twinkle localisation.

FAQs

Package last updated on 16 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc