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

vue-sample-component

v0.10.1

Published

The purpose of this project is to provide a boilerplate to quickly create reusable Vue components that are intended to be published as dependencies using all the latest JS goodies that take into account the every-evolving best practices in the world of Ja

Downloads

8

Readme

SampleComponent.vue

The purpose of this project is to provide a boilerplate to quickly create reusable Vue components that are intended to be published as dependencies using all the latest JS goodies that take into account the every-evolving best practices in the world of JavaScript. This is very much a rolling target, so any collaboration is very much welcome and appreciated.

What is the real purpose behind this project?

With the ES6 becoming the norm, it makes sense to start packaging more of what we create into reusable bundles. Node developers have taken this to the extreme, but it does work (most of the time). What prevents me personally from writing more distributable code is literally the act of creating a new repo, the directory structure, adding dependencies, defining a structure for the source, eventually coming up with a name, then there is documentation, examples and tests. Setting everything up is a constant battle and a huge amount of time that inherently prevents me from starting the task.

So this boilerplate is a way to make all of that as painless as possible...

So why use this boilerplate instead of something else?

There is obviously more than one way to skin a cat. This project is meant to be opinionated and meant to make decisions so that I don't have make them later. It also attempts to utilize as few dependencies as possible. Many examples available use Webpack, but project uses Rollup for simplicity. At the time of this writing, almost all the examples use Babel6, but this project uses the upcoming Babel7.

Unit Testing

So this is a hot topic, and is a moving target, so to speak. After using a few testing suites and a lot of reading, I decided on Jest. Like everything, it has pros and cons, but it has that "it just works" feel to it and is extremely easy to configure and use. And people have done the hard work with Vue and seems to be a popular choice with ample documentation and examples.

Features

  • Pre-configured Babel7
  • Pre-configured Rollup.js config
  • Pre-configured SASS/SCSS
  • Pre-configured unit tests with Jest
  • Pre-defined commands for building, publishing, and testing
  • Uglification & Minification of source files
  • Automated UMD build and bundle naming conventions
  • Browser server/livereload

Commands

npm run dev

Start the Rollup build process and watch the source files and trigger livereload when a file changes.

npm run commit

Makes a GIT commit with the current version from package.json. (This command is called automatically in the npm run release command.)

npm run release-patch

Compiles the latest source files, makes an incremental version bump (1.0.x) to package.json, then makes a commit with new version, and finally publishes the latest build to NPM.

npm run release-minor

Compiles the latest source files, makes a minor version bump (1.x.0) to package.json, then makes a commit with new version, and finally publishes the latest build to NPM.

npm run release-major

Compiles the latest source files, makes a major version bump (x.1.0) to package.json, then makes a commit with new version, and finally publishes the latest build to NPM.

npm run release

Compiles the latest source files for release, runs the uglification process, makes the commit, and published the package. This command is called automatically uses any of the other npm run release-{type} commands.

npm run uglify

Rund the uglify library over the compiled source to create a {package-name}.min.js file that Gzip and minifies that library.