Development - Puzzlepart/prosjektportalen GitHub Wiki
Development
Build
This project is built using npm
and gulp
. Before you start make sure you have the latest version of npm. This project has been tested with npm 3.10.10 and newer. The quickest way to install or update npm is to install node.js
In order to build the project, you need to have gulp
globally available.
You can install gulp globally with npm
npm install gulp -g
Once nodejs is installed, open a command prompt in the directory where you have cloned this project, e.g. c:\code\prosjektportalen and execute the following
npm install
Now you need to create your own @env.js
in the folder .tasks
. Use the @env.sample.js
as a base. This file is used with the gulp watch
task in conjuction with Live Reload. You can leave the values in this file blank.
Once this has completed, execute the following to build the project (using the default task)
npm run release
The resulting build can be found under /dist, and a packaged zip under /release.
Watch
npm run watch
will start listening to changes to .ts
files.
Create a @watch.json
in the tasks folder. The pageUrl specified here will be opened when running the watch
script. See @watch.sample.json
.
'use strict';
{
"pageUrl": ""
}
Potential issues
If you haven´t upgraded the project portal installation for a while, you might have to update the Custom Actions.
Connect-PnPOnline {url}
Apply-PnPProvisioningTemplate ./templates/root/root.xml -Handlers CustomActions
Create a new release
NB: Make sure you're on the master
branch and that dev has been merged through PR
- Update version
Update minor version (e.g. 1.x.0
)
npm version minor
Update patch version (e.g. 1.0.x
)
npm version patch
npm run release
will be run automatically after a npm version
update through the NPM script postversion
.
- Run
git push --tags
to update the new tags/versions on the remote. - Create a new release
- Pick the right tag version (the version you just published to remote)
- In
Release title
write the same as the version/tag name without thev
(see image above) - Add a description of what's been changed in this release (see other releases for inspiration)
- Under
releases
in your Project Portal folder, find the.zip
file for your version and drop it to the area underDescribe this release
- Publish release!