Home
Softono
w

wikimedia

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
2

Software by wikimedia

design-codex
Open Source

design-codex

# Codex Codex is the design system for Wikimedia. The Codex repository contains four packages: - **Components**: for building usable, accessible, translatable applications. Codex contains [Vue 3](https://v3.vuejs.org/) components and CSS-only components - **Design tokens**: for writing styles consistent with the [Codex Design Style Guide for Wikimedia](https://doc.wikimedia.org/codex/latest/style-guide/overview.html) - **Icons**: a collection of icons with language and directionality variants - **VitePress site**: for [Codex documentation, Vue component demos, and design token visualization](https://doc.wikimedia.org/codex/latest/) Codex features: - Wide-ranging support for internationalization and global usage - Web accessibility compliant (Web Content Accessibility Guidelines 2.1 level AA) - Comprehensive browser and device support ## Quick start ### Usage To install: ```sh npm install --save-dev @wikimedia/codex @wikimedia/codex-icons ``` To use components: ```js import { CdxButton, CdxTextInput } from '@wikimedia/codex'; ``` To use icons: ```js import { cdxIconAlert, cdxIconNewWindow } from '@wikimedia/codex-icons'; ``` For more information on how to set up and use the library, refer to the [usage documentation](https://doc.wikimedia.org/codex/latest/using-codex/developing.html). ### Development Codex development requires the following: - **Node:** the required version of Node is pinned in `.nvmrc`. To install and use the required version, run `nvm install "$(<.nvmrc)"` then `nvm use` in the root of the repository. **Node Version Manager (NVM)** is a handy tool that lets you install and switch between multiple versions of Node on your machine. This is especially useful when working on multiple projects that depend on different Node versions.<br>[Learn more about NVM on GitHub](https://github.com/nvm-sh/nvm). - **npm:** version 7 or higher is required to support workspaces. You can install latest version of npm with nvm via `nvm install --latest-npm`. Helpful commands: - `npm install` in the root of the repository to install requirements for all workspaces - `npm run doc:dev` to start the docs site - `npm run dev` to start the Vite sandbox - `npm run test:unit -w @wikimedia/codex` to run unit tests for e.g. the codex workspace. [Read more about testing.](https://doc.wikimedia.org/codex/latest/contributing/testing-components.html) Refer to the [contributing code](https://doc.wikimedia.org/codex/latest/contributing/development-basics.html) guidelines for more information. ## Contributing If you'd like to contribute, head over to the [contributing docs](https://doc.wikimedia.org/codex/latest/contributing/overview.html) to learn about our processes and ways you can contribute. ## Maintainers Codex is maintained by the [Design System Team](https://www.mediawiki.org/wiki/Design_System_Team) of the Wikimedia Foundation. It is designed and developed by contributors from the [Wikimedia Foundation](https://wikimediafoundation.org/), [Wikimedia Deutschland](https://www.wikimedia.de/), and the [Wikimedia](https://www.wikimedia.org/) volunteer community. To contact us or to learn more about current and future work, visit our [workboard](https://phabricator.wikimedia.org/project/board/5587/) or the [Design System Team page](https://www.mediawiki.org/wiki/Design_System_Team) on mediawiki.org.

CSS Frameworks & UI Kits Design Systems & Tokens
104 Github Stars
html-metadata
Open Source

html-metadata

html-metadata ============= [![npm](https://img.shields.io/npm/v/html-metadata.svg)](https://www.npmjs.com/package/html-metadata) > MetaData html scraper and parser for Node.js (supports Promises only. Callbacks were deprecated in 3.0.0) The aim of this library is to be a comprehensive source for extracting all html embedded metadata. Currently it supports Schema.org microdata using a third party library, a native BEPress, Dublin Core, Highwire Press, JSON-LD, Open Graph, Twitter, EPrints, PRISM, and COinS implementation, and some general metadata that doesn't belong to a particular standard (for instance, the content of the title tag, or meta description tags). Planned is support for RDFa, AGLS, and other yet unheard of metadata types. Contributions and requests for other metadata types welcome! ## Install npm install html-metadata ## Usage ```js var scrape = require('html-metadata'); var url = "http://blog.woorank.com/2013/04/dublin-core-metadata-for-seo-and-usability/"; scrape(url).then(function(metadata){ console.log(metadata); }); ``` The scrape method used here invokes the parseAll() method, which uses all the available methods registered in method metadataFunctions(), and are available for use separately as well, for example: ```js var cheerio = require('cheerio'); var parseDublinCore = require('html-metadata').parseDublinCore; var url = "http://blog.woorank.com/2013/04/dublin-core-metadata-for-seo-and-usability/"; fetch(url).then(function(response){ $ = cheerio.load(response.body); return parseDublinCore($).then(function(metadata){ console.log(metadata); }); }); ``` Options dictionary: You can also pass an [options dictionary](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit) as the first argument containing extra parameters. Some websites require the user-agent or cookies to be set in order to get the response. This is identifical to the RequestInit dictionary except that it should also contain the requested url as part of the dictionary. ``` var scrape = require('html-metadata'); var options = { url: "http://example.com", headers: { 'User-Agent': 'webscraper' } }; scrape(options, function(error, metadata){ console.log(metadata); }); ``` The method parseGeneral obtains the following general metadata: ```html <link rel="apple-touch-icon" href="" sizes="" type=""> <link rel="icon" href="" sizes="" type=""> <meta name="author" content=""> <link rel="author" href=""> <link rel="canonical" href=""> <meta name ="description" content=""> <link rel="publisher" href=""> <meta name ="robots" content=""> <link rel="shortlink" href=""> <title></title> <html lang="en"> <html dir="rtl"> ``` ## Tests ```npm test``` runs the mocha tests ```npm run-script coverage``` runs the tests and reports code coverage ## Contributing Contributions welcome! All contibutions should use [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) instead of callbacks.

JavaScript Libraries & Components Browser Automation
173 Github Stars