Skip to content
Open
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@ package-lock.json
/public/sitemap.xml.gz

# Development Docker storage location
_docker-storage/
_docker-storage/

/browsertime-results
/sitespeed-result/localhost
6 changes: 3 additions & 3 deletions Envfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ variable :AIRBRAKE_PROJECT_ID, :integer, default: 00000

# Algolia for search (not optional)
only_in_test = proc { ENV['RACK_ENV'] == "test" ? "test-test" : nil}
variable :ALGOLIASEARCH_API_KEY, :String, default: only_in_test
variable :ALGOLIASEARCH_APPLICATION_ID, :String, default: only_in_test
variable :ALGOLIASEARCH_SEARCH_ONLY_KEY, :String, default: only_in_test
variable :ALGOLIASEARCH_API_KEY, :String, default: '5c7ff235fb6e8f8b735904919e0d8e17'
Copy link
Owner

Choose a reason for hiding this comment

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

Nope, ключи нельзя коммитить.

variable :ALGOLIASEARCH_APPLICATION_ID, :String, default: 'Q7HQKBY3X3'
variable :ALGOLIASEARCH_SEARCH_ONLY_KEY, :String, default: 'dc58947baa391de46564823a5f2abe39'

# AWS for images storages
variable :AWS_ID, :String, default: "Optional"
Expand Down
53 changes: 42 additions & 11 deletions config/webpack/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,58 @@

// module.exports = environment;

const { environment } = require('@rails/webpacker');
const webpack = require('webpack');

const { environment } = require('@rails/webpacker')
const webpack = require('webpack')
environment.plugins.append(
'Chart',
new webpack.optimize.CommonsChunkPlugin({
name: 'chart',
filename: 'chart.js',
}),
);

environment.plugins.append(
'CommonsChunkVendor',
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: (module) => {
minChunks: module => {
// this assumes your vendor imports exist in the node_modules directory
return module.context && module.context.indexOf('node_modules') !== -1
}
})
)
return module.context && module.context.indexOf('node_modules') !== -1;
},
}),
);

environment.plugins.append(
'CommonsChunkManifest',
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
minChunks: Infinity
})
)
minChunks: Infinity,
}),
);

const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
environment.plugins.append(
'BundleAnalyzer',
new BundleAnalyzerPlugin({
analyzerMode: 'static',
openAnalyzer: true,
}),
);

environment.plugins.append(
'',
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
);

config = {
resolve: {
alias: {
'chart.js': 'chart.js/dist/Chart.min.js',
},
},
};

module.exports = environment
environment.config.merge(config);
module.exports = environment;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"preact-render-spy": "^1.3.0",
"preact-render-to-json": "^3.6.6",
"prettier": "^1.16.4",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-dev-server": "^2.11.3"
},
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions sitespeed-result/budget.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Performance budget for http://localhost:3000/ with 1 working and 0 failing budgets.</title><meta name="description" content="The list of failing and working performance budgets."><meta name="robots" content="noindex"><link rel="stylesheet" href="css/index.min.css"><style type="text/css">
</style><link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/ico/sitespeed.io-144.png"><link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/ico/sitespeed.io-114.png"><link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/ico/sitespeed.io-72.png"><link rel="apple-touch-icon-precomposed" href="img/ico/sitespeed.io-57.png"><link rel="shortcut icon" href="img/ico/sitespeed.io.ico"></head><body><div class="darkblue nav"><div class="navgrid"><div class="logo"><a href="https://www.sitespeed.io"><img class="navbar-brand" src="img/sitespeed.io-logo.png" width="162" height="50" alt="sitespeed.io logo"></a></div><ul><li><a href="index.html">Summary</a></li><li><a href="detailed.html">Detailed Summary</a></li><li><a href="pages.html">Pages</a></li><li><a href="domains.html">Domains</a></li><li><a href="toplist.html">Toplist</a></li><li><a href="assets.html">Assets</a></li><li><a class="active" href="budget.html">Budget</a></li></ul></div></div><div class="container"><h2>The budget</h2><p>The result of the performance budget. We got 0 failing and 1 working.</p><h3>Failing budgets [0]</h3><h3>Working budgets [1]</h3><table><thead><tr><th>url</th><th>result</th></tr></thead><tr><td><a href="http://localhost:3000/">http://localhost:3000/</a><td>transferSize.javascript with value 399907 limit max 460000</td></td></tr></table><footer><hr><p><a href="https://www.sitespeed.io">sitespeed.io</a> 8.15.1 by <a href="https://www.sitespeed.io/aboutus/">the sitespeed.io team</a> and <a href="https://github.com/sitespeedio/sitespeed.io/blob/master/CONTRIBUTORS.md">contributors</a></p></footer></div><script src="js/sortable.min.js"></script><script src="js/chartist.min.js"></script><script src="js/chartist-plugin-axistitle.min.js"></script><script src="js/chartist-plugin-tooltip.min.js"></script></body></html>
1 change: 1 addition & 0 deletions sitespeed-result/fast.har

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions sitespeed-result/homeBudget.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"budget": {
"transferSize": {
"javascript": 460000
}
}
}
5 changes: 5 additions & 0 deletions sitespeed-result/sitespeed_on_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# run sitespeed check to check budget
docker run --rm -v "$(pwd)":/sitespeed.io --network=host sitespeedio/sitespeed.io:8.15.1 http://localhost:3000/ -n 1 --budget.configPath homeBudget.json

#run browsertime to collect HAR
docker run --rm -v "$(pwd)":/browsertime --network=host sitespeedio/browsertime:4.9.2 http://localhost:3000/ -n 5
1 change: 1 addition & 0 deletions sitespeed-result/slow.har

Large diffs are not rendered by default.

86 changes: 85 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ acorn-jsx@^5.0.0:
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e"
integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==

acorn-walk@^6.0.1:
acorn-walk@^6.0.1, acorn-walk@^6.1.1:
version "6.1.1"
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913"
integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==
Expand Down Expand Up @@ -2247,6 +2247,16 @@ bcrypt-pbkdf@^1.0.0:
dependencies:
tweetnacl "^0.14.3"

bfj@^6.1.1:
version "6.1.1"
resolved "https://registry.yarnpkg.com/bfj/-/bfj-6.1.1.tgz#05a3b7784fbd72cfa3c22e56002ef99336516c48"
integrity sha512-+GUNvzHR4nRyGybQc2WpNJL4MJazMuvf92ueIyA0bIkPRwhhQu3IfZQ2PSoVPpCBJfmoSdOxu5rnotfFLlvYRQ==
dependencies:
bluebird "^3.5.1"
check-types "^7.3.0"
hoopy "^0.1.2"
tryer "^1.0.0"

big.js@^3.1.3:
version "3.2.0"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e"
Expand Down Expand Up @@ -2723,6 +2733,11 @@ chartjs-color@^2.1.0:
chartjs-color-string "^0.5.0"
color-convert "^0.5.3"

check-types@^7.3.0:
version "7.4.0"
resolved "https://registry.yarnpkg.com/check-types/-/check-types-7.4.0.tgz#0378ec1b9616ec71f774931a3c6516fad8c152f4"
integrity sha512-YbulWHdfP99UfZ73NcUDlNJhEIDgm9Doq9GhpyXbF+7Aegi3CVV7qqMCKTTqJxlvEvnQBp9IA+dxsGN6xK/nSg==

chokidar@^2.0.0, chokidar@^2.0.2:
version "2.0.4"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26"
Expand Down Expand Up @@ -2996,6 +3011,11 @@ commander@^2.11.0, commander@^2.14.1, commander@^2.15.0, commander@^2.19.0, comm
resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==

commander@^2.18.0:
version "2.20.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==

commander@~2.13.0:
version "2.13.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
Expand Down Expand Up @@ -3842,6 +3862,11 @@ ee-first@1.1.1:
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=

ejs@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0"
integrity sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==

electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30, electron-to-chromium@^1.3.47:
version "1.3.96"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.96.tgz#25770ec99b8b07706dedf3a5f43fa50cb54c4f9a"
Expand Down Expand Up @@ -4664,6 +4689,11 @@ filesize@3.5.11:
resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee"
integrity sha512-ZH7loueKBoDb7yG9esn1U+fgq7BzlzW6NRi5/rMdxIZ05dj7GFD/Xc5rq2CDt5Yq86CyfSYVyx4242QQNZbx1g==

filesize@^3.6.1:
version "3.6.1"
resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317"
integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==

fill-range@^2.1.0:
version "2.2.4"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565"
Expand Down Expand Up @@ -5147,6 +5177,14 @@ gzip-size@3.0.0:
dependencies:
duplexer "^0.1.1"

gzip-size@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.0.tgz#2db0396c71f5c902d5cf6b52add5030b93c99bd2"
integrity sha512-wfSnvypBDRW94v5W3ckvvz/zFUNdJ81VgOP6tE4bPpRUcc0wGqU+y0eZjJEvKxwubJFix6P84sE8M51YWLT7rQ==
dependencies:
duplexer "^0.1.1"
pify "^4.0.1"

handle-thing@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4"
Expand Down Expand Up @@ -5328,6 +5366,11 @@ homedir-polyfill@^1.0.1:
dependencies:
parse-passwd "^1.0.0"

hoopy@^0.1.2:
version "0.1.4"
resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d"
integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==

hosted-git-info@^2.1.4:
version "2.7.1"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
Expand Down Expand Up @@ -7980,6 +8023,11 @@ onetime@^2.0.0:
dependencies:
mimic-fn "^1.0.0"

opener@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed"
integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==

opn@5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/opn/-/opn-5.2.0.tgz#71fdf934d6827d676cecbea1531f95d354641225"
Expand Down Expand Up @@ -8316,6 +8364,11 @@ pify@^3.0.0:
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=

pify@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==

pinkie-promise@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
Expand Down Expand Up @@ -11174,6 +11227,11 @@ trim@0.0.1:
dependencies:
glob "^7.1.2"

tryer@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8"
integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==

tslib@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
Expand Down Expand Up @@ -11579,6 +11637,25 @@ webidl-conversions@^4.0.2:
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==

webpack-bundle-analyzer@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.3.2.tgz#3da733a900f515914e729fcebcd4c40dde71fc6f"
integrity sha512-7qvJLPKB4rRWZGjVp5U1KEjwutbDHSKboAl0IfafnrdXMrgC0tOtZbQD6Rw0u4cmpgRN4O02Fc0t8eAT+FgGzA==
dependencies:
acorn "^6.0.7"
acorn-walk "^6.1.1"
bfj "^6.1.1"
chalk "^2.4.1"
commander "^2.18.0"
ejs "^2.6.1"
express "^4.16.3"
filesize "^3.6.1"
gzip-size "^5.0.0"
lodash "^4.17.10"
mkdirp "^0.5.1"
opener "^1.5.1"
ws "^6.0.0"

webpack-dev-middleware@1.12.2, webpack-dev-middleware@^1.12.2:
version "1.12.2"
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e"
Expand Down Expand Up @@ -11839,6 +11916,13 @@ ws@^5.2.0:
dependencies:
async-limiter "~1.0.0"

ws@^6.0.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb"
integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==
dependencies:
async-limiter "~1.0.0"

ws@^6.1.2:
version "6.1.2"
resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.2.tgz#3cc7462e98792f0ac679424148903ded3b9c3ad8"
Expand Down