Skip to content

Commit

Permalink
feat: Add Stack Pack for Next.js
Browse files Browse the repository at this point in the history
This commit adds a Lighthouse Stack Pack for Next.js based on
documentation and recommendations on Next.js website.
  • Loading branch information
Keen Yee Liau committed Nov 16, 2021
1 parent 85e65c0 commit f5639f6
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Want to submit a brand new stack pack? Awesome! In order for a stack pack to be
- 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.
If all of these are met, submit a PR for review! Copy the `general.js` 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

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Many developers today use different technologies (backend/CMS/JavaScript framewo
* Angular
* AMP
* Magento
* Next.js

## Contributing

Expand Down
2 changes: 2 additions & 0 deletions general.js

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

11 changes: 6 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const stackPacks = [
require('./packs/wordpress.js'),
require('./packs/drupal.js'),
require('./packs/react.js'),
require('./packs/angular.js'),
require('./packs/amp.js'),
require('./packs/magento.js'),
require('./packs/angular.js'),
require('./packs/drupal.js'),
require('./packs/joomla.js'),
require('./packs/magento.js'),
require('./packs/next.js'),
require('./packs/octobercms.js'),
require('./packs/react.js'),
require('./packs/wordpress.js'),
];

module.exports = stackPacks;
22 changes: 22 additions & 0 deletions packs/next.js

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

0 comments on commit f5639f6

Please sign in to comment.