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

@hiq-malardalen/svhiq

v3.5.21

Published

Boilerplate CLI to create sitevision projects and webapps

Downloads

6

Readme

Sitevision boilerplate CLI

A cli interface to create sitevision projects, webapps and restapps.

Created by: John Larsson, HiQ Mälardalen

Description

This CLI was made in order to make SiteVision development easier and more fun.

Creation of webapps and restapps with deployment and automatic signing to choosen SiteVision environment. Also includes an option to use VUE as front end framework instead of the default sitevision "Component" library.

Creation of a complete project with built in filewatchers for scss, client js, script module files, resource files with automatic sync to a remote SiteVision environment.

ToC

  1. Prerequisites
  2. Installing
  3. Commands
    1. Options
  4. Examples
  5. Boilerplates
    1. Webapp

Prerequisites

It is recommended to install @vue/cli before using the webapp task.

Install it with:

$ npm install -g @vue/cli

Installing

This package should be installed globally.

Using npm:

$ npm install -g @hiq-malardalen/svhiq

Commands

Every command needs atleast a name and task.

Commandshape:

$ svhiq <task> <name> '<optional folderpath>' [options]

A name is what type you are trying to target:

  • project
  • webapp
  • restapp

A task is what action you are trying to do towards the name:

  • create => Creates and initializes a given name
  • watch => Watches for file changes and does suitable transformations and actions towards the filetype. Currently this task is only available for project's
  • deploy => Deploys to a remote.

Options

  • -p or --production => Signals if we should face the command towards a production environment.
  • --vue => Signals if the webapp is or should be initialized with a vue client application. NOTE: You have to have @vue/cli installed in the global scope.
  • -f or --force => Signals if we should deploy the webapp or restapp with the "force" argument.
  • --zip => Saves the created app bundle as a zip file in the project root.
  • --noSign => Prevents signing of the app when deploying.
  • -h => Get a printout of available commands.

Examples

Create a webapp named "myWebapp" in current directory

$ svhiq create webapp myWebapp

Create a webapp named "myWebapp" with a VUE client

$ svhiq create webapp myWebapp --vue

Deploy the webapp to remote.

$ svhiq deploy webapp -f

In the package.json file you can find allready premade script tasks that are more suitable to the current project, webapp or restapp.

Boilerplates

These are the boilerplates and their structures

Webapp

Webapps can be created with or without the --vue option.

$ svhiq create webapp myApp

With VUE client

If the vue option is added the boilerplate will be instantiated with a VUE client. This means that the front end development for the app is developed in the /vue/display directory. This is a regular VUE project so in order to start development just run:

$ cd /vue/display
$ npm run serve

Deploy the webapp with:

$ npm run force-deploy-vue

or

$ svhiq deploy webapp -f --vue

When deploying with --vue the vue application will be built, .js files will be moved to the app src/resource folder and all styles will be moved to src/css folder. A script will then automaticly update the script tag in src/template/main.html to point to the newly generated file.

At runtime the Webapp state is automaticly imported to the VUE applicaion.

Notes

  • It is recommended that you replace the name APP_NAME in both scr/main.js and vue/display/src/main.ts to a proper name. This is to prevent app conflicts if more than one of these types of apps appears on the same page.

  • If you did not make any changes to the vue application, you can omit the --vue option when you deploy. Or simply run: npm run force-deploy. This will not rebuild the vue application and deployment will be quicker.