Code Monkey home page Code Monkey logo

egardner / wvui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wikimedia/wvui

0.0 1.0 0.0 5.82 MB

Wikimedia Vue UI (WVUI) – Wikimedia Foundation's Vue.js shared user-interface components for Wikipedia, MediaWiki, and beyond. Please file tasks for search and Vue.js on Phabricator: https://w.wiki/Xbs, https://w.wiki/Xbt. Mirror from https://gerrit.wikimedia.org/r/plugins/gitiles/wvui

License: GNU General Public License v2.0

JavaScript 3.81% TypeScript 69.27% Vue 23.04% Shell 1.56% Less 2.11% Dockerfile 0.21%

wvui's Introduction

🧩 Wikimedia Vue UI

Wikimedia Vue UI (WVUI) components – Wikimedia Foundation's Vue.js shared user-interface components for Wikipedia, MediaWiki, and beyond. See quick start to contribute.

Table of contents {ignore=true}

Usage

Installation and version history

Install the library and Vue.js v2:

npm i --save-prefix= vue@2 @wikimedia/wvui

WVUI is semantically versioned. See the changelog for release notes.

We recommend pinning WVUI to an exact patch version. For example:

  …,
  "dependencies": {
    "…": "",
    "@wikimedia/wvui": "1.2.3",
    "…": ""
  }
  …,

WVUI is semantically versioned but bugs occasionally slip through. They're easier for consumers to identify when upgrades are tracked deliberately via package.json. If semver ranges are used instead, like "^1.2.3", only the verbose and noisy package-lock.json will change on an upgrade which may go unnoticed. Additionally, new features are easier to consider and socialize at upgrade time when minor / major version upgrades are intentional and reflected in package.json.

The recommendation to use exact patch versions like "1.2.3" may seem pedantic but if a project specifies dependencies with looser versioning instead, that project will be at the mercy of its dependencies instead of in control of them.

Integration

The following example demonstrates an integration with the Vue root App that has access to the entire WVUI component library and styles:

<!-- App.vue -->
<template>
	<wvui-button>Hello WVUI</wvui-button>
</template>

<script lang="ts">
	import components from "@wikimedia/wvui";
	import "@wikimedia/wvui/dist/wvui.css";

	export default {
		name: "App",
		components, // App can compose any WVUI component.
	};
</script>
// index.ts
import Vue from "vue";
import App from "./App.vue";

new Vue({
	el: "#app",
	components: { App },
	render: (createElement) => createElement(App),
});

Different builds

There is currently one bundle available:

  • Combined: the complete library. This bundle is the simplest to use because it contains all code but is not performant if only part is used or if different parts should be loaded at different times. ⚠️ This chunk is standalone and should not be loaded with split chunks.

    • wvui.js/css: the complete library, excluding icons, and default export. No other chunks required unless additional icons not referenced by the core library are used.

    • wvui-icons.js: the complete iconography (optional).

Each chunk is side-effect free. All chunks are fully compiled ES5 / CSS and require a Vue.js runtime. See peerDependencies.

See the performance section for related topics.

Development

Quick start

Get running on your host machine quickly with:

npm install
npm start

See DEVELOPERS for much more information on developing this library.

See CONTRIBUTING to learn how to contribute to this library.

Library design goals

  • Deploy search to all test wikis before August 31, 2020: frwiktionary, hewiki, ptwikiversity, frwiki, euwiki, fawiki.
  • Relevant, modern, efficient, iterative contributor workflows.
  • Delightful user experiences shareable as an NPM package and reusable everywhere with and without MediaWiki.
  • Fully typed. Accurate typing improves comprehension for tooling and programmers.
  • Semantically versioned.
  • Thoroughly documented for development and usage; everything needed to be productive is in the readme.
  • Well tested and robust.

License (GPL-2.0+)

See LICENSE.

wvui's People

Contributors

niedzielski avatar volker-e avatar nicholasray avatar speedandfunction-anribolon avatar catrope avatar phuedx avatar jdlrobson avatar annetee avatar jandre3000 avatar berndsi avatar dannys712 avatar egardner avatar speedandfunction-anri avatar somechris avatar hknustwmf avatar wiese avatar simon04 avatar edg2s avatar legoktm avatar nikkhn avatar umherirrender avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.