svhiq v3.5.15
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
Prerequisites
It is recommended to install @vue/cli before using the webapp task.
Install it with:
$ npm install -g @vue/cliInstalling
This package should be installed globally.
Using npm:
$ npm install -g svhiqCommands
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:
projectwebapprestapp
A task is what action you are trying to do towards the name:
create=> Creates and initializes a givennamewatch=> Watches for file changes and does suitable transformations and actions towards the filetype. Currently thistaskis only available forproject'sdeploy=> Deploys to a remote.
Options
-por--production=> Signals if we should face the command towards a production environment.--vue=> Signals if thewebappis or should be initialized with a vue client application. NOTE: You have to have@vue/cliinstalled in the global scope.-for--force=> Signals if we should deploy thewebapporrestappwith 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 myWebappCreate a webapp named "myWebapp" with a VUE client
$ svhiq create webapp myWebapp --vueDeploy the webapp to remote.
$ svhiq deploy webapp -fIn 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 myAppWith 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 serveDeploy the webapp with:
$ npm run force-deploy-vueor
$ svhiq deploy webapp -f --vueWhen 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_NAMEin bothscr/main.jsandvue/display/src/main.tsto 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
--vueoption when you deploy. Or simply run:npm run force-deploy. This will not rebuild the vue application and deployment will be quicker.
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago