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

@3squared/forge-ui

v1.9.3

Published

ForgeUI is designed to be a wrapper around different libraries that provide a consistent UI style. It is comprised of many different packages that have been combined to create a one stop shop for UI.

Downloads

381

Readme

Welcome to Forge UI!

alt

Adding a new component

Adding a new component in the /src directory

  1. Decide which category your new component should come under in /src/components. (Forms, Layout, General etc)

  2. Create a new folder in the relevant category with a descriptive name. For example if we wanted to create a location picker for the form:

src/
   components/
      forms/
         location-picker/
  1. Inside your new folder create a Vue SFC (Single File Component) with a relevant name. Here is a template to get you started that will mean tree shaking will be supported out the box.
location-picker/
   LocationPicker.vue
<template>
  <h1>Hello, world!</h1>
</template>

<script lang="ts">
import Vue from 'vue';

export const MyComponent = /*#__PURE__*/ Vue.extend({
  name: 'MyComponent'
});
export default MyComponent;
</script>
  1. Develop your component with all the features you require, creating a subfolder of components or helpers if you need.

  2. You now need to register your component in the main entry file.

Go to index.ts and import, export and optionally register your new component.

// Import it
import ForgeLocationPicker from './src/components/forms/location-picker/LocationPicker.vue';

...

// Optionally register it
const ForgeUI = {
  install(Vue: VueConstructor) {
    ...
    registerComponent(ForgeLocationPicker);
    ...
  }
};

...

// Export it
export {
   ...
   ForgeLocationPicker
   ...
}

Tips For Tree Shaking

Most of the leg work for making tree shaking work is already in place - there are just two things you need to make sure you do:

  • In your Vue SFC make sure you include the PURE annotation via
    export const MyComponent = /*#__PURE__*/ Vue.extend({..
  • When you install a new dependency, make sure to externalize it via the external section in rollup.config.js.

Documenting your new component

Please consult docs/README.md on how you should document your new component and add examples to test it's functionality!

Publishing a new version

To publish a new version of Forge UI Framework please open a PR targeting the main branch and the GitHub Action will take care of the rest!