Skip to content

Commit e44ca94

Browse files
authored
chore: cleanup doctor sources (#5625)
1 parent 3b42042 commit e44ca94

27 files changed

+1627
-1151
lines changed

packages/doctor/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ test-reports.xml
6464

6565
*.js
6666
*.js.map
67-
/lib/.d.ts
67+
/src/.d.ts
6868
.d.ts
6969
!/*.js

packages/doctor/Gruntfile.js

+37-59
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,77 @@ module.exports = function (grunt) {
33
ts: {
44
options: grunt.file.readJSON("tsconfig.json").compilerOptions,
55

6-
devlib: {
7-
src: ["lib/**/*.ts", "typings/**/*.ts"],
8-
reference: "lib/.d.ts"
6+
devsrc: {
7+
src: ["src/**/*.ts", "typings/**/*.ts"],
8+
reference: "src/.d.ts",
99
},
1010

1111
devall: {
12-
src: ["lib/**/*.ts", "test/**/*.ts", "typings/**/*.ts"],
13-
reference: "lib/.d.ts"
12+
src: ["src/**/*.ts", "test/**/*.ts", "typings/**/*.ts"],
13+
reference: "src/.d.ts",
1414
},
1515

1616
release_build: {
17-
src: ["lib/**/*.ts", "test/**/*.ts", "typings/**/*.ts"],
18-
reference: "lib/.d.ts",
17+
src: ["src/**/*.ts", "test/**/*.ts", "typings/**/*.ts"],
18+
reference: "src/.d.ts",
1919
options: {
2020
sourceMap: false,
21-
removeComments: true
22-
}
23-
}
21+
removeComments: true,
22+
},
23+
},
2424
},
2525

2626
tslint: {
2727
build: {
2828
files: {
29-
src: ["lib/**/*.ts", "test/**/*.ts", "typings/**/*.ts", "!**/*.d.ts"]
29+
src: ["src/**/*.ts", "test/**/*.ts", "typings/**/*.ts", "!**/*.d.ts"],
3030
},
3131
options: {
3232
configuration: grunt.file.readJSON("./tslint.json"),
33-
project: "tsconfig.json"
34-
}
35-
}
33+
project: "tsconfig.json",
34+
},
35+
},
3636
},
3737

3838
watch: {
3939
devall: {
40-
files: ["lib/**/*.ts", 'test/**/*.ts'],
41-
tasks: [
42-
'ts:devall',
43-
'shell:npm_test'
44-
],
40+
files: ["src/**/*.ts", "test/**/*.ts"],
41+
tasks: ["ts:devall", "shell:npm_test"],
4542
options: {
4643
atBegin: true,
47-
interrupt: true
48-
}
44+
interrupt: true,
45+
},
4946
},
5047
ts: {
51-
files: ["lib/**/*.ts", "test/**/*.ts"],
52-
tasks: [
53-
'ts:devall'
54-
],
48+
files: ["src/**/*.ts", "test/**/*.ts"],
49+
tasks: ["ts:devall"],
5550
options: {
5651
atBegin: true,
57-
interrupt: true
58-
}
59-
}
52+
interrupt: true,
53+
},
54+
},
6055
},
6156

6257
shell: {
6358
options: {
6459
stdout: true,
6560
stderr: true,
66-
failOnError: true
67-
},
68-
build_package: {
69-
command: "npm pack"
61+
failOnError: true,
7062
},
7163
npm_test: {
72-
command: "npm test"
73-
}
64+
command: "npm test",
65+
},
7466
},
7567

7668
clean: {
77-
src: ["test/**/*.js*", "lib/**/*.js*", "!lib/hooks/**/*.js", "!Gruntfile.js", "*.tgz"]
78-
}
69+
src: [
70+
"test/**/*.js*",
71+
"src/**/*.js*",
72+
"!src/hooks/**/*.js",
73+
"!Gruntfile.js",
74+
"*.tgz",
75+
],
76+
},
7977
});
8078

8179
grunt.loadNpmTasks("grunt-contrib-clean");
@@ -84,30 +82,10 @@ module.exports = function (grunt) {
8482
grunt.loadNpmTasks("grunt-ts");
8583
grunt.loadNpmTasks("grunt-tslint");
8684

87-
grunt.registerTask("delete_coverage_dir", function () {
88-
var done = this.async();
89-
var rimraf = require("rimraf");
90-
rimraf("coverage", function (err) {
91-
if (err) {
92-
console.log("Error while deleting coverage directory from the package: ", err);
93-
done(false);
94-
}
95-
96-
done();
97-
});
98-
});
99-
10085
grunt.registerTask("test", ["ts:devall", "shell:npm_test"]);
101-
102-
grunt.registerTask("pack", [
103-
"clean",
104-
"ts:release_build",
105-
"shell:npm_test",
106-
"delete_coverage_dir",
107-
"shell:build_package"
108-
]);
86+
grunt.registerTask("pack", ["clean", "ts:release_build", "shell:npm_test"]);
10987
grunt.registerTask("lint", ["tslint:build"]);
11088
grunt.registerTask("all", ["clean", "test", "lint"]);
111-
grunt.registerTask("rebuild", ["clean", "ts:devlib"]);
112-
grunt.registerTask("default", "ts:devlib");
89+
grunt.registerTask("rebuild", ["clean", "ts:devsrc"]);
90+
grunt.registerTask("default", "ts:devsrc");
11391
};

packages/doctor/lib/definitions/osenv.d.ts

-4
This file was deleted.

packages/doctor/lib/definitions/unzip.d.ts

-3
This file was deleted.

0 commit comments

Comments
 (0)