Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: rename typings/ to types/ #6617

Merged
merged 1 commit into from
Nov 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Tracing processor takes the output of trace of tab and identifies the top-level

## Audits

The return value of each audit [takes this shape](https://github.com/GoogleChrome/lighthouse/blob/8f500e00243e07ef0a80b39334bedcc8ddc8d3d0/typings/audit.d.ts#L117-L130).
The return value of each audit [takes this shape](https://github.com/GoogleChrome/lighthouse/blob/09cc741c54bfdf6f6851dae1c749dd46a52d6a1f/typings/audit.d.ts#L133-L159).

The `details` object is parsed in report-renderer.js. View other audits for guidance on how to structure `details`.

Expand Down
4 changes: 2 additions & 2 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function launchChromeAndRunLighthouse(url, opts, config = null) {
opts.port = chrome.port;
return lighthouse(url, opts, config).then(results => {
// use results.lhr for the JS-consumeable output
// https://github.com/GoogleChrome/lighthouse/blob/master/typings/lhr.d.ts
// https://github.com/GoogleChrome/lighthouse/blob/master/types/lhr.d.ts
// use results.report for the HTML/JSON/CSV output as a string
// use results.artifacts for the trace/screenshots/other specific case you need (rarer)
return chrome.kill().then(() => results.lhr)
Expand Down Expand Up @@ -50,7 +50,7 @@ You can also craft your own config (e.g. [mixed-content-config.js](https://githu

### Differences from CLI flags

Note that some flag functionality is only available to the CLI. The set of shared flags that work in both node and CLI can be found [in our typedefs](https://github.com/GoogleChrome/lighthouse/blob/8f500e00243e07ef0a80b39334bedcc8ddc8d3d0/typings/externs.d.ts#L68). In most cases, the functionality is not offered in the node module simply because it is easier and more flexible to do it yourself.
Note that some flag functionality is only available to the CLI. The set of shared flags that work in both node and CLI can be found [in our typedefs](https://github.com/GoogleChrome/lighthouse/blob/888bd6dc9d927a734a8e20ea8a0248baa5b425ed/typings/externs.d.ts#L82-L119). In most cases, the functionality is not offered in the node module simply because it is easier and more flexible to do it yourself.

| CLI Flag | Differences in Node |
| - | - |
Expand Down
2 changes: 1 addition & 1 deletion docs/understanding-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The result object contains all the audit information Lighthouse determined about

The top-level Lighthouse Result object (LHR) is what the lighthouse node module returns and the entirety of the JSON output of the CLI. It contains some metadata about the run and the results in the various subproperties below.

For an always up-to-date definition of the LHR, take a look [at our typedefs](https://github.com/GoogleChrome/lighthouse/blob/master/typings/lhr.d.ts).
For an always up-to-date definition of the LHR, take a look [at our typedefs](https://github.com/GoogleChrome/lighthouse/blob/master/types/lhr.d.ts).

### Properties

Expand Down
4 changes: 2 additions & 2 deletions lighthouse-viewer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"compilerOptions": {
"typeRoots": [
"@types",
"../typings",
"../types",
"./types",
],
},
"include": [
"app/src/**/*.js",
"../typings/*.d.ts",
"../types/*.d.ts",
"./types/*.d.ts",
],
}
2 changes: 1 addition & 1 deletion proto/lighthouse-result.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ enum LighthouseError {
}

// The overarching Lighthouse Response object (LHR)
// https://github.com/GoogleChrome/lighthouse/blob/master/typings/lhr.d.ts
// https://github.com/GoogleChrome/lighthouse/blob/master/types/lhr.d.ts
message LighthouseResult {
// The timestamp of when the results were generated.
google.protobuf.Timestamp fetch_time = 1;
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// "noErrorTruncation": true,
"typeRoots": [
"@types",
"./typings"
"./types"
],

"resolveJsonModule": true,
Expand All @@ -21,7 +21,7 @@
"lighthouse-core/**/*.js",
"clients/**/*.js",
"build/**/*.js",
"./typings/*.d.ts",
"./types/*.d.ts",
],
"exclude": [
"lighthouse-cli/test/**/*.js",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.