Skip to content

Commit

Permalink
Merge pull request #38 from wardpeet/feat/stack-packs-lighthouse
Browse files Browse the repository at this point in the history
chore: convert json packs to js packs for better LH integration
  • Loading branch information
housseindjirdeh authored Mar 16, 2020
2 parents 36e4e2f + 1ff4d2c commit aeddd1d
Show file tree
Hide file tree
Showing 19 changed files with 880 additions and 121 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
**/*.d.ts
Binary file added .package.json.un~
Binary file not shown.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ again.

Want to submit a brand new stack pack? Awesome! In order for a stack pack to be considered however, the following must be met:

* There should be a simple way to detect the stack via JS/DOM properties
* At least 6 of the performance audits should have stack-specific recommendations
* A significant number of websites (~ in the 10's of thousands) should be using the stack. Consider using [HTTP Archive](https://discuss.httparchive.org/t/javascript-library-detection/955/2) to detect the number sites used by the particular tool.
* There must be a minimum of two maintainers for each stack from the community who can help review and provide suggestions. We (Google) should not be the ones to decide what the audit recommendations should be.
- There should be a simple way to detect the stack via JS/DOM properties
- At least 6 of the performance audits should have stack-specific recommendations
- A significant number of websites (~ in the 10's of thousands) should be using the stack. Consider using [HTTP Archive](https://discuss.httparchive.org/t/javascript-library-detection/955/2) to detect the number sites used by the particular tool.
- There must be a minimum of two maintainers for each stack from the community who can help review and provide suggestions. We (Google) should not be the ones to decide what the audit recommendations should be.

If all of these are met, submit a PR for review! Copy the `general.json` file into the `packs/` directory and change each audit string to a specific recommendation regarding your stack. If you can't provide a recommendation for a particular audit, change it to an empty string. However, you will need to provide at least 6 audit strings as mentioned earlier.

## Submitting changes to audit strings

Do you notice a specific audit string for a particular pack that is wrong or could be a little better? Please submit a PR!
Do you notice a specific audit string for a particular pack that is wrong or could be a little better? Please submit a PR!

## FAQ

Expand Down
10 changes: 9 additions & 1 deletion general.json → general.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const stackPacks = [
require('./packs/wordpress.js'),
require('./packs/react.js'),
require('./packs/angular.js'),
require('./packs/amp.js'),
require('./packs/magento.js')
];

module.exports = stackPacks;
30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "lighthouse-stack-packs",
"version": "0.0.1-0",
"description": "Lighthouse Stack Packs",
"repository": "GoogleChrome/lighthouse-stack-packs",
"keywords": [
"google",
"chrome",
"lighthouse"
],
"author": "The Chromium Authors",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/GoogleChrome/lighthouse-stack-packs/issues"
},
"homepage": "https://github.com/GoogleChrome/lighthouse-stack-packs#readme",
"main": "index.js",
"devDependencies": {
"del-cli": "^3.0.0",
"typescript": "^3.8.2"
},
"scripts": {
"prepublishOnly": "del-cli \"*.d.ts\" \"packs/*.d.ts\" && npm run generate-types",
"generate-types": "tsc -p ."
},
"files": [
"packs/*",
"index.d.ts"
]
}
30 changes: 30 additions & 0 deletions package.json~
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "lighthouse-stack-packs",
"version": "0.0.1",
"description": "Lighthouse Stack Packs",
"repository": "GoogleChrome/lighthouse-stack-packs",
"keywords": [
"google",
"chrome",
"lighthouse"
],
"author": "The Chromium Authors",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/GoogleChrome/lighthouse-stack-packs/issues"
},
"homepage": "https://github.com/GoogleChrome/lighthouse-stack-packs#readme",
"main": "index.js",
"devDependencies": {
"del-cli": "^3.0.0",
"typescript": "^3.8.2"
},
"scripts": {
"prepublishOnly": "del-cli \"*.d.ts\" \"packs/*.d.ts\" && npm run generate-types",
"generate-types": "tsc -p ."
},
"files": [
"packs/*",
"index.d.ts"
]
}
24 changes: 24 additions & 0 deletions packs/amp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 0 additions & 23 deletions packs/amp.json

This file was deleted.

24 changes: 24 additions & 0 deletions packs/angular.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 0 additions & 23 deletions packs/angular.json

This file was deleted.

Loading

0 comments on commit aeddd1d

Please sign in to comment.