aboutsummaryrefslogtreecommitdiff
path: root/lib/vnlib.browser/Taskfile.yaml
blob: bf1c7e7eca948608ad8b7da13437c97d2eba34b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# https://taskfile.dev

#Called by the vnbuild system to produce builds for my website
#https://www.vaughnnugent.com/resources/software


#this file must be in the same directory as the solution file

version: '3'

tasks:

#called by build pipeline to build module
  build:
    cmds:
     - echo "building module {{ .PROJECT_NAME  }}" 

    #update internal package version
     - cmd: npm version {{ .BUILD_VERSION }}
       ignore_error: true

    #install dependencies and build
     - npm install
     - npm run build

  postbuild_success:
    vars:
      TAR_FILES:
        dist/
        LICENSE.txt
        README.md
        package.json
        package-lock.json
        tsconfig.json

    cmds:
    - powershell -Command "mkdir bin -Force"
    #tgz the dist folder
    - tar -czf bin/release.tgz {{ .TAR_FILES }}

#called by build pipeline to clean module
  clean:
    ignore_error: true
    cmds:
     #delete dist folder
    - for: ['bin/', 'dist/', 'node_modules/']
      cmd: powershell -Command "Remove-Item -Recurse -Force {{ .ITEM_NAME }}"