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

docs(releasing): minor updates #5345

Merged
merged 4 commits into from
Sep 27, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
16 changes: 5 additions & 11 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assets/
build/
coverage/

lighthouse-core/scripts/
lighthouse-core/scripts/*
lighthouse-core/test/
lighthouse-core/third_party/src/
lighthouse-viewer/
Expand All @@ -18,23 +18,17 @@ lighthouse-logger/
# keep the chrome launcher script
!lighthouse-core/scripts/manual-chrome-launcher.js

# excluding cli/test minus smokehouse
lighthouse-cli/test
!lighthouse-cli/test/smokehouse
!lighthouse-cli/test/fixtures/

!lighthouse-cli/index.js
lighthouse-cli/*.map
lighthouse-cli/commands/*.map
lighthouse-cli/types/*.js
lighthouse-cli/types/*.map
# keep smokehouse tests, etc
!lighthouse-cli/test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how much bigger does our package end up?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh this was not fun. turns out yarn pack builds things VERY differently than npm pack.
and npm pack gives basically the same package before and after this PR. wonderful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turns out it's smaller now. because the npmignore in master includes all of lighthouse-cli already.

so aint that somethin


node_modules/
results/
lantern-data/

plots/

latest-run/

# generated files
**/pages/scripts/lighthouse-report.js
*.report.html
Expand Down
5 changes: 2 additions & 3 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ cd ..; rm -rf tmp; mkdir tmp; cd tmp
npm init -y
npm install ../lighthouse-pristine/lighthouse-*.tgz
npm explore lighthouse -- npm run smoke
npm explore lighthouse -- npm run smokehouse
npm explore lighthouse -- npm run chrome # try the manual launcher
npm explore lighthouse -- npm run fast -- http://example.com
cd ..; rm -rf ./tmp;
Expand Down Expand Up @@ -100,8 +99,8 @@ echo "Go here: https://chrome.google.com/webstore/developer/edit/blipmdconlkpine
echo "Upload the package zip to CWS dev dashboard"

echo "Verify the npm package won't include unncessary files"
yarn global add pkgfiles
pkgfiles # publishable size should be ~2MB
npm pack --dry-run
npx pkgfiles

echo "ship it"
npm publish
Expand Down
4 changes: 2 additions & 2 deletions lighthouse-cli/test/fixtures/static-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ function requestHandler(request, response) {
const zonePath = '../../../node_modules/zone.js';
absoluteFilePath = path.join(__dirname, `${zonePath}/dist/zone.js`);
} else {
// Otherwise, disallow file requests outside of LH folder or from node_modules
// Otherwise, disallow file requests outside of LH folder
const filePathDir = path.parse(absoluteFilePath).dir;
if (!filePathDir.startsWith(lhRootDirPath) || filePathDir.includes('node_modules')) {
if (!filePathDir.startsWith(lhRootDirPath)) {
return readFileCallback(new Error('Disallowed path'));
}
}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"compile-devtools": "bash lighthouse-core/scripts/compile-against-devtools.sh",
"chrome": "node lighthouse-core/scripts/manual-chrome-launcher.js",
"fast": "yarn start --disable-device-emulation --throttlingMethod=provided",
"smokehouse": "node lighthouse-cli/test/smokehouse/smokehouse.js",
"deploy-viewer": "cd lighthouse-viewer && gulp deploy",
"bundlesize": "bundlesize",
"plots-smoke": "bash plots/test/smoke.sh",
Expand Down