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-build-helper

v0.1.12

Published

Streamline the Vue CLI 3 build process

Downloads

10

Readme

Build status Coverage Status Greenkeeper badge NPM version Vue 2 Vue CLI 3 Commitizen friendly Contributions welcome Hit count License MIT

Streamline the Vue CLI 3 build process.

The Vue CLI 3 is an awesome tool. The build process is not completely smooth when you have multiple components or are testing the component locally using link with npm or yarn. This module provides the following features.

  1. It removes the (irritating) demo.html files that are useless.
  2. It generates an index file with named exports for all components.
  3. It disables eslint for the components to avoid an avalanche of errors and warnings when testing the component in another project using link with npm or yarn.

These functionalities can be run all together or separately.

Installation

Global

Install as a globally available CLI tool using npm:

npm install --global vue-build-helper

Or install using yarn:

yarn gloabl add vue-build-helper

Local

Install as a devDependency using npm:

npm install --save-dev vue-build-helper

Or install using yarn:

yarn add --dev vue-build-helper

The following entry will be added to the devDependencies section in the package.json file.

{
  "devDependencies": {
    "vue-build-helper": ^0.1.11
  }
}

Add the following entry to the scripts section in the package.json file:

{
  "scripts": {
    "build-helper": "vue-build-helper"
  }
}

Now you can run npm run build-helper from the command line. You can pass it arguments using double dashes (--), e.g. npm run build-helper -- info.

Go to Table of Contents

Usage

Minimum configuration

The easiest way to use this module is adding it as a postbuild script in the package.json file. The following shows how to run all features when the build process has completed successfully. The vue-build-helper uses sane defaults, if no options are specified it assumes dist as default destination for the build directory.

{
  "scripts": {
    "build": "vue-build-helper.js-helper.js",
    "postbuild": "vue-build-helper all"
  }
}

You can also call it directly by executing one of the following commands.

npm run postbuild

Or:

yarn postbuild

Go to Table of Contents

Additional configuration

Running features individually

Features can be run individually by specifying one of the following commands: eslint-disable, delete-demo-html, create-exports.

Example calling the eslint-disable feature for a specific file. Keep in mind that the file is always relative to the build destination directory (default dist).

{
  "scripts": {
    "postbuild": "vue-build-helper eslint-disable --file TestPlugin/TestPlugin.common.js"
  }
}

Specifying alternative build directory

All commands accept the --dest option so that you can specify a different build directory than the default dist directory. Keep in mind that the build destination directory is always relative to the current working directory.

Example setting the destination build directory to build.

{
  "scripts": {
    "postbuild": "vue-build-helper all --dist build"
  }
}

Go to Table of Contents

Other options

  • --help: Using npm run build-helper -- --help will list the available commands.

  • <command> --help: Using npm run build-helper -- <command> --help will display information about the specified command and its options.

  • info: Using npm run build-helper -- info will display information about your operating system and other environment information that is useful if you need to submit an issue.

Go to Table of Contents

Roadmap

Currently there is nothing on the roadmap. Suggestions? Please submit an issue.

Go to Table of Contents

Contributing

We welcome pull requests! What follows is the simplified version of the contribution process, please read here to fully understand our contribution policy and here to understand our code of conduct.

  1. Fork the repository here!
  2. Create your feature branch: git checkout -b my-new-feature
  3. If relevant, don't forget to add your tests
  4. Commit your changes: npm run commit
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request :-)

Go to Table of Contents

Support & brag about us

If you like this project, please support us by starring ⭐ this repository. Thx!

Please let the world know about us! Brag about us using Twitter, email, blog, Discord, Slack, forums, etc. etc. Thx!

Go to Table of Contents

Author

nidkil © nidkil, released under the MIT license. Authored and maintained by nidkil with help from contributors.

Website · GitHub @nidkil · Twitter @nidkil