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-cli-template-dev-server

v1.0.1

Published

development server for vue.js custom template projects

Downloads

5

Readme

vue-cli-template-dev-server

development server for building vue-cli custom templates

NPM


overview

this package provides a simple, file-watching server to ease the development of vue-cli custom templates.

once started, the server will listen to changes in the app template source files (under the /template directory). when a change is detected, it will re-compile the template to an output directory, allowing live inspection of the generated vue.js application.

after the output project is generated, if it's an NPM project, the server will collect its dependencies with npm i, and run npm run dev (you can customize which command will run instead of dev).

setup

  • install via NPM:

    npm i vue-cli-template-dev-server -D
  • add these bits:

    package.json *

    {
      "scripts": {
        "dev": "vue-cli-template-dev-server"
      },
    }

    .gitignore

    out/

* if you don't have a package.json file, run npm init.

usage

simply run the dev script:

npm run dev

the server script accepts two optional arguments. the first one is used for overriding the output directory path (defaults to out), and the second for the output project name (awesome-vue-app, if not provided).

to use them, either directly run:

npm run dev -- 'dist/dev-server-out' 'my-app'

… or put them in the package scripts for good:

{
  "scripts": {
    "dev": "vue-cli-template-dev-server 'dist/dev-server-out' 'my-app'"
  },
}

you can also change which NPM script will run on startup (dev by default), by passing the TARGET_INIT_COMMAND environment variable:

env TARGET_INIT_COMMAND='serve' npm run dev -- 'dist/dev-server-out' 'my-app'

demo

check out the /example directory in this repository for an example usage with the most simple application. it only contains what's required for the dev-server to work.

to see it in action:

  • get a local clone:

    cd <workspace-path>
    #   ^ replace this with your local workspace directory
    git clone https://github.com/eliranmal/vue-cli-template-dev-server.git
  • navigate to the demo, and ignite the engines:

    cd <workspace-path>/vue-cli-template-dev-server/example
    #   ^ you know the drill
    npm start

    this will install dependencies, and run the example app's dev server.
    from now on, if you kill the server, you can run it again with:

    npm run dev
  • open ./template/hello.md and ./out/hello.md in your editor.

  • edit ./template/hello.md and save your changes.

  • see ./out/hello.md change accordingly.

CLI

use the -h flag to see the manual.