File tree Expand file tree Collapse file tree 5 files changed +9110
-127
lines changed Expand file tree Collapse file tree 5 files changed +9110
-127
lines changed Original file line number Diff line number Diff line change @@ -15,19 +15,25 @@ A GitHub Actions javascript library for running the [Microsoft Security DevOps C
15
15
16
16
### Preqrequisities:
17
17
18
- * Install [ dotnet] ( https://dotnet.microsoft.com/en-us/ )
19
- * install [ node.js] ( https://nodejs.org/en ) (for npm)
20
-
21
- To build, run:
22
- ``` powershell
23
- dotnet build ./build.proj [/p:NpmInstall=true|false]
18
+ * Install [ node.js] ( https://nodejs.org/en ) (for npm)
19
+ * Install [ gulp-cli] ( https://www.npmjs.com/package/gulp-cli ) globally:
20
+ ```
21
+ npm install -g gulp-cli
22
+ ```
23
+ * Install node package dependencies
24
+ ```
25
+ npm install
26
+ ```
27
+
28
+ To build, simply run ` gulp ` in the root of the repo:
29
+ ```
30
+ gulp
24
31
```
25
32
26
33
The build:
27
- 1 . If ` NpmInstall ` is true, runs ` npm install ` at the root of the repo
28
34
1 . Compiles the typescript in the ` ./src ` directory
29
- 1 . Outputs javascript to the ` ./lib ` directory
30
- 1 . Copies the ` ./package.json ` file to the ` ./lib ` folder
35
+ 1 . Outputs javascript to the ` ./dist ` directory
36
+ 1 . Copies the ` ./package.json ` file to the ` ./dist ` folder
31
37
32
38
## Publish
33
39
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ const gulp = require ( 'gulp' ) ;
2
+ const shell = require ( 'gulp-shell' ) ;
3
+ const ts = require ( 'gulp-typescript' ) ;
4
+
5
+ const tsProject = ts . createProject ( 'tsconfig.json' ) ;
6
+
7
+ function clean ( cb ) {
8
+ import ( 'del' )
9
+ . then ( ( del ) => del . deleteSync ( [ 'dist' ] ) )
10
+ . then ( ( ) => cb ( ) ) ;
11
+ }
12
+
13
+ function compile ( cb ) {
14
+ tsProject
15
+ . src ( )
16
+ . pipe ( tsProject ( ) ) . js
17
+ . pipe ( gulp . dest ( 'dist' ) ) ;
18
+ cb ( ) ;
19
+ }
20
+
21
+ function copyPackageJson ( cb ) {
22
+ gulp
23
+ . src ( 'package.json' )
24
+ . pipe ( gulp . dest ( 'dist' ) ) ;
25
+ cb ( ) ;
26
+ }
27
+
28
+ exports . clean = clean ;
29
+ exports . compile = compile ;
30
+ exports . build = gulp . series ( clean , compile , copyPackageJson ) ;
31
+ exports . default = exports . build ;
You can’t perform that action at this time.
0 commit comments