Skip to content

Commit 31e093f

Browse files
committed
2 parents 70787ff + fa9c9d0 commit 31e093f

File tree

5 files changed

+9110
-127
lines changed

5 files changed

+9110
-127
lines changed

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,25 @@ A GitHub Actions javascript library for running the [Microsoft Security DevOps C
1515

1616
### Preqrequisities:
1717

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
2431
```
2532

2633
The build:
27-
1. If `NpmInstall` is true, runs `npm install` at the root of the repo
2834
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
3137

3238
## Publish
3339

build.proj

Lines changed: 0 additions & 32 deletions
This file was deleted.

gulpfile.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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;

0 commit comments

Comments
 (0)