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

Efremov Homework 6 #82

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
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
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: checkout code
uses: actions/checkout@v3
- name: run sitespeedio test
uses: docker://sitespeedio/sitespeed.io:9.8.1-action
Copy link
Collaborator

Choose a reason for hiding this comment

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

старое

with:
args: https://d596-18-135-4-161.eu.ngrok.io -n 1 --budget.configPath ./homeBudget.json
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ coverage

# Ignore node_modules
node_modules/

screenshots
# Generated js bundles
/app/assets/javascripts/generated/*
latest.dump
Expand All @@ -44,6 +44,7 @@ config/database.yml
# Ignore storybook static site generation
storybook-static/
yarn-error.log
sitespeed-result

# Ignore package-lock.json because we use yarn
package-lock.json
Expand All @@ -52,4 +53,4 @@ package-lock.json
.idea/

#sitemap
/public/sitemap.xml.gz
/public/sitemap.xml.gz
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ end
gem "actionpack-action_caching", "~> 1.2"
gem "active_record_union", "~> 1.3"
gem "acts-as-taggable-on", "~> 5.0"
gem "acts_as_follower", github: "thepracticaldev/acts_as_follower", branch: "master"
gem "acts_as_follower", github: "forem/acts_as_follower", branch: "master"
gem "addressable", "~> 2.5", ">= 2.5.2"
gem "administrate", "~> 0.11"
gem "ahoy_email", "~> 0.5"
Expand Down Expand Up @@ -122,7 +122,7 @@ group :development, :test do
gem "derailed", "~> 0.1"
gem "erb_lint", "~> 0.0", require: false
gem "faker", git: "https://github.com/stympy/faker.git", branch: "master"
gem "fix-db-schema-conflicts", github: "thepracticaldev/fix-db-schema-conflicts", branch: "master"
gem "fix-db-schema-conflicts", github: "jakeonrails/fix-db-schema-conflicts", branch: "master"
gem "memory_profiler", "~> 0.9"
gem "parallel_tests", "~> 2.27"
gem "pry-byebug", "~> 3.7"
Expand Down
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
GIT
remote: https://github.com/stympy/faker.git
revision: 9910aa58d92c018abab25d491191576fcc1a7707
remote: https://github.com/forem/acts_as_follower.git
revision: 06393d3693a1a3d4b390aec4976c8b8f3a81cf01
branch: master
specs:
faker (1.9.1)
i18n (>= 0.7)
acts_as_follower (0.2.1)
activerecord (>= 4.0)

GIT
remote: https://github.com/thepracticaldev/acts_as_follower.git
revision: 288690cd99bc470eaee493fce5bfa9fe23157692
remote: https://github.com/jakeonrails/fix-db-schema-conflicts.git
revision: 1e94f518503f1d1addd6ed052454efcbec0b3c6a
branch: master
specs:
acts_as_follower (0.2.1)
activerecord (>= 4.0)
fix-db-schema-conflicts (3.1.0)
rubocop (>= 0.38.0)

GIT
remote: https://github.com/thepracticaldev/fix-db-schema-conflicts.git
revision: 4172392392e1a8d907f7ab673cb5ddd9a4a31940
remote: https://github.com/stympy/faker.git
revision: 9910aa58d92c018abab25d491191576fcc1a7707
branch: master
specs:
fix-db-schema-conflicts (3.0.2)
rubocop (>= 0.38.0)
faker (1.9.1)
i18n (>= 0.7)

GEM
remote: https://rubygems.org/
Expand Down
10 changes: 10 additions & 0 deletions app/javascript/packs/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint no-console:0 */
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
//
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
// layout file, like app/views/layouts/application.html.erb

console.log('Hello World from Webpacker');
31 changes: 19 additions & 12 deletions config/webpack/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,34 @@

// module.exports = environment;


const { environment } = require('@rails/webpacker')
const webpack = require('webpack')
const { environment } = require('@rails/webpacker');
const webpack = require('webpack');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');

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 &&
module.context.indexOf('moment') === -1 &&
module.context.indexOf('chart.js') === -1
);
},
}),
);

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

environment.plugins.append('BundleAnalyzer', new BundleAnalyzerPlugin());

module.exports = environment
module.exports = environment;
7 changes: 7 additions & 0 deletions homeBudget.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"budget": {
"transferSize": {
"javascript": 460000
}
}
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@
"preact-render-spy": "^1.3.0",
"preact-render-to-json": "^3.6.6",
"prettier": "^1.16.4",
"webpack-dev-server": "^2.11.3"
"webpack-dev-server": "2.11.2"
},
"dependencies": {
"@rails/webpacker": "^3.5.5",
"@rails/webpacker": "3.5",
"babel-plugin-transform-react-jsx": "^6.24.1",
"babel-preset-preact": "^1.1.0",
"chart.js": "^2.7.3",
Expand All @@ -99,7 +99,8 @@
"prop-types": "^15.7.2",
"pusher-js": "^4.4.0",
"twilio-video": "^1.15.2",
"web-share-wrapper": "^0.2.1"
"web-share-wrapper": "^0.2.1",
"webpack-bundle-analyzer": "^4.5.0"
},
"jest": {
"setupFiles": [
Expand Down
Loading