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

teste-ui

v0.0.126

Published

<p float="left"> <img src="https://cdn.auth0.com/blog/vuejs/vue-logo.png" alt="Vue.js" width="100"/> <img src="https://www.saashub.com/images/app/service_logos/8/20ef90d04b35/large.png?1527741609" alt="Vuetify.js" width="100"/> <img src="https

Downloads

144

Readme

teste-ui

GitHub issues GitHub pull requests GitHub contributors

GitHub last commit GitHub Release Date

GitHub code size in bytes GitHub repo size GitHub

A Design System / Component Library Template for enabling graphic consistency and legibility across web development projects by creating reusable components and styles with accessible & legible documentation. Built on top of Vue.js and Vuetify.js.

Usage

This Template is comprised of two major categories: Styles and Components. It builds to compiled components (.js) and compiled styles (.css) from the source (.vue) files which can be used across web applications. It also creates a Storybook site for component/design system documentation.

Clone this repository locally, and use it as a starting point for building a component library / design system on top of Vue.js and Vuetify.js

Added/Updated Configurations to Vue CLI Starter

  1. AirBnB Style Guide
  2. Prettier Style Guide
  3. ESLint (Style Enforcing)
  4. Storybook
  5. Library Build
  6. SCSS/SASS
  7. Vuetify.js

Key Commands

After cloning/downloading the repository locally, install the required dependencies using npm i. After installation, the following commands can be used to develop & build the component library.

  1. npm run build:all - This will build the component library in the dist folder, the preview app in the dist-app folder, and the static storybook site for documenting the components in the storybook-static folder.
  2. npm run storybook:serve - Runs a local instance of Storybook, allowing you to preview/interact with your component documentation.
  3. npm run serve - Runs the preview app.

How to Import (The Built Library)

Importing Components

Global

Importing the single file .vue components directly. (If using Vue CLI 3 with Babel or TypeScript, it's recommended that you import its src directory. This will minimize the size of your application by preventing duplicate or unnecessary polyfills.)

Importing the source .vue file:

// main.js
import HelloWorld from "teste-ui/src/components";
Vue.use(HelloWorld);

Importing the bundled .js:

// main.js
import HelloWorld from "teste-ui";
Vue.use(HelloWorld);

In-Component Import

For single use in a component or small set of components.

Importing the source .vue file:

// component.vue
import HelloWorld from "teste-ui/src/components/HelloWorld";

export default {
  name: "Tester",
  components: {
    HelloWorld,
    Footer: () => import("teste-ui/src/components/Footer"),
  }
}
</script>

Importing the bundled .js components individually.

// component.vue
import { HelloWorld } from "teste-ui";

export default {
  name: "Tester",
  components: {
    HelloWorld
  }
}
</script>

Importing Styles

Loading Compiled CSS

The styles are written in SCSS and can be compiled upon building this library. They can be loaded into an application that doesn't have SCSS loading capability by referencing/importing the teste-ui.css file which is created in the dist folder of this repository when executing npm run build.

In order to enable this functionality, an edit has to be made in vue.config.js. The line extract: false must be removed or set to true, so that the compiled .css file(s) are created upon build.

import "teste-ui/dist/teste-ui.css";

Loading SCSS Directly

In order to import and use styles across Vue.js applications, the application will need to have sass, node-sass, and sass-loader installed as dev dependencies. Once installed, the style files may be imported using the syntax below.

// import in vue.js style section
@import "./styles/colors.scss";

After importing, styles may be applied through classes, or through referencing the variables exported by the SASS.

/* importing variables in css */
#nav a.router-link-exact-active {
  color: $blue;
}

Design System

The structure of this project and component library are meant to emulate a larger-scale Design System (such as Google's Material).

Colors

Colors are referenced into components from the styles folder.

Icons (need to change)

The icons are FontAwesome 5, and are loaded in using Vuetify.js & @fortawesome/fontawesome-free

Components

Components can be found in the src/components folder in the root directory of this repository.

Developer Documentation

Building

In order to contribute to this project, fork/clone this repository locally. After cloning is completed, install the dependencies using npm i.

Preview

You can start a development server by running the commands below in the root directory of this repository. Once the development server is running, view localhost:8080 using Chrome and Vue.js Dev Tools. This is a preview application and will allow you to visualize the components/styles that will ultimately be compiled to the design system library.

npm run serve

or run the Storybook instance instead of the preview app

npm run storybook:serve

Library

To build the project as a library, run npm run build in the root directory of the repository.

Commands

The following commands are used to develop the project:

  1. npm run build - Build the package distribution bundle.
  2. npm run build:app - Build the preview web application.
  3. npm run build:all - Build the preview application, distribution bundles, and the Storybook static site.
  4. npm run serve - Start a development server with live-reloading on changes. (Used for previewing individual components.)
  5. npm run lint - Lint code using ESLint and Vue, AirBnB, and Prettier configs.
  6. npm test - Run unit tests for the individual components in the package.
  7. npm run release - Runs tests, build, and version incrementing procedures.
  8. npm run storybook - Run Storybook to see the component library in action.
  9. npm run build- storybook - Build the Storybook to a static application (for deploying design system documentation elsewhere)