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

@gatship/gs-components-3

v0.0.84

Published

GAT-Ship Vue 3 components

Downloads

52

Readme

gs-components-3

Vue 3 component library

NB: If you are cloning this repository, please follow the guidelines for cloning at the bottom.

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Adding the plugin to a new project

  1. Init a project with vuetify and gs-components: Open your terminal and navigate to the folder where you want to create your new project. Then write the following commands in your terminal, this will scaffold a new vue project using vuetify + vite. Make sure that you opt in for Typescript since the gs-components package requires it.
1. npm create vuetify
2. cd -your-project-name-
3. npm i @gatship/gs-components-3
4. npm i -D sass
5. npm i iso-3166-1
6. code .
  1. Follow "Adding the plugin exsisting project" steps.

Adding the plugin exsisting project

  1. Create the plugin with options in seperate file:

src/plugins/gs-components.ts

import { createGatComponents } from '@gatship/gs-components-3';

export default createGatComponents(/* global config options */);
  1. Add plugin to the project.

src/plugins/index.ts

// Plugins
import { loadFonts } from './webfontloader';
import vuetify from './vuetify';
import router from '../router';
import pinia from '../store';
import gatComponents from './gs-components';
// Types
import type { App } from 'vue';

export function registerPlugins(app: App) {
  loadFonts();
  // load all your plugins here
  app.use(vuetify).use(router).use(pinia).use(gatComponents); // .use(router) etc.
}
  1. Load the plugins in main.ts

src/main.ts

// Components
import App from './App.vue';

// Composables
import { createApp } from 'vue';

// Plugins
import { registerPlugins } from '@/plugins';

const app = createApp(App);

registerPlugins(app);

app.mount('#app');
  1. Edit the vite.config.ts file (optimizeDeps -> numeral, iso-3166-1): For some reason the commonJs libraries numeralJS & iso-3166- will not be correctly initialized by vite on project-startup. Therefore we need to tell vite to always initialize the numeral & iso-3166-1 libraries.
export default defineConfig({
  // Add this property to your vite config.
  optimizeDeps: {
    include: ['numeral', 'iso-3166-1'],
  },
  // ... plugins etc.
});
  1. npm run dev (if you just cloned this repository, follow the 'Cloning this repository' guide): The gs-components plugin should now be installed to your project. The browser console will print out 'gat-components loaded' on project-init. Happy coding!

Cloning this repository

This repository is using the submodule gs-components-3 (https://dev.azure.com/gatship/gs-components/_git/gs-components-3) This means that when you are cloning this repository you need to make sure that the submodule is initialized, updated and set to main/origin.

Run these commands in your terminal at the root of the gs-components3-docs project:

  1. git submodule init
  2. git submodule update
  3. cd submodule_dir
  4. git checkout master
  5. cd ../