npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

twinkle-core

v3.1.3

Published

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

Downloads

202

Readme

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

  • On every push to the master branch, the documentation on Toolforge is automatically updated by the docs-deploy workflow.
  • Another workflow (i18n-deploy.yml) sanitises new i18n messages synced from translatewiki.net using the build-i18n script and syncs them to the i18n branch which only contains built i18n messages. This branch is mirrored to the TwinkleCore Gerrit repository. Wikis can fetch i18n messages from Gerrit in a CSP-compliant way.
  • You can create a new release using the releases tab in GitHub UI. This triggers the npm-publish workflow to publish a new version of the NPM package. Be sure that the version number in package.json was updated before this is done (trying to republish with the same version will not work).
  • On every new release, the docs-deploy workflow also saves the documentation to a permanent link (eg. for v3.0.2-beta at https://twinkle.toolforge.org/core-docs-3.0.2-beta).

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.