Skip to content

optimize images test #1

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

Open
wants to merge 10 commits into
base: main
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 26 additions & 0 deletions .github/workflows/optimize-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Optimize Images
on:
pull_request:
paths:
- '42-optimize-images/**/*.jpg'
- '42-optimize-images/**/*.jpeg'
- '42-optimize-images/**/*.png'
- '42-optimize-images/**/*.webp'
jobs:
build:
# Only run on Pull Requests within the same repository, and not from forks.
if: github.event.pull_request.head.repo.full_name == github.repository
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Compress Images
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
jpegQuality: '80'
jpegProgressive: false
pngQuality: '80'
webpQuality: '80'
29 changes: 29 additions & 0 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Performance check
on: [push]
jobs:
lighthouseci:
runs-on: ubuntu-latest

env:
working-directory: ./22-lighthouse

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 14
cache: 'npm'
cache-dependency-path: ./22-lighthouse/package-lock.json

- name: Install Dependencies
run: npm install && npm install -g @lhci/[email protected]
working-directory: ${{env.working-directory}}

- name: Build app
run: npm run build
working-directory: ${{env.working-directory}}

- name: Run lighthouse
run: lhci autorun
working-directory: ${{env.working-directory}}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/agenda-codelytv-pro.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/bbva.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/codium-team.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/ddd-barcelona.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/devops-barcelona.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/malaga-scala.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/murcia-frontend.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/office.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/plant-dark.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/plant.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/rockndroid.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/seedrocket.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/testing-tdd-php.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/bg/tourism.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/codelytv/equipazo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/codelytv/icon-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/codelytv/logo-180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/codelytv/logo-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/codelytv/logo-270.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/codelytv/logo-80.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-bad-performance/src/assets/images/companies/airbus.png
Binary file modified 00-bad-performance/src/assets/images/companies/atrapalo.png
Binary file modified 00-bad-performance/src/assets/images/companies/audiense.png
Binary file modified 00-bad-performance/src/assets/images/companies/exoticca.png
Binary file modified 00-bad-performance/src/assets/images/companies/freepik.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/adevinta.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/deiser.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/genially.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/habitissimo.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/isalud.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/kariosds.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/km77.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/leadtech.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/lean-mind.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/packlink.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/shopery.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/uptodown.png
Binary file modified 00-bad-performance/src/assets/images/companies/new/veepee.png
Binary file modified 00-bad-performance/src/assets/images/companies/signaturit.png
Binary file modified 00-bad-performance/src/assets/images/companies/softonic.png
Binary file modified 00-bad-performance/src/assets/images/companies/wallapop.png
Binary file modified 00-bad-performance/src/assets/images/comunidades/adalab.jpg
Binary file modified 00-bad-performance/src/assets/images/comunidades/codenares.jpg
Binary file modified 00-bad-performance/src/assets/images/comunidades/codenoobs.jpg
Binary file modified 00-bad-performance/src/assets/images/comunidades/scbcn.png
Binary file modified 00-bad-performance/src/assets/images/cursos/arquitectura-css.jpg
100755 → 100644
Binary file modified 00-bad-performance/src/assets/images/cursos/bash.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/css-grid.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/curso-aws-ec2.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/curso-cqrs.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/ddd-en-php.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/ddd-java.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/docker-desde-0.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/dotfiles.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/elastic-stack.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/go-primera-app.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/intellij.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/js-moderno.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/karabiner.jpg
100755 → 100644
Binary file modified 00-bad-performance/src/assets/images/cursos/layouts-css.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/light-dark-themes.jpg
100755 → 100644
Binary file modified 00-bad-performance/src/assets/images/cursos/makefiles.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/migracion-vuejs.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/notion.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/novedades-vue-3.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/php-8.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/prometheus.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/refactoring-change_preventers.jpg
100755 → 100644
Binary file modified 00-bad-performance/src/assets/images/cursos/setup-linux.jpg
100755 → 100644
Binary file modified 00-bad-performance/src/assets/images/cursos/solid.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/terminal-zsh.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/testing-vuex.jpg
Binary file modified 00-bad-performance/src/assets/images/cursos/vistas-android.jpg
Binary file modified 00-bad-performance/src/assets/images/landings/proposito20.jpg
Binary file modified 00-bad-performance/src/assets/images/logo-codelytv-light.png
Binary file modified 21-webpack-performance-tools/src/assets/images/bg/bbva.jpg
Binary file modified 21-webpack-performance-tools/src/assets/images/bg/office.jpg
Binary file modified 21-webpack-performance-tools/src/assets/images/bg/plant.jpg
Binary file modified 21-webpack-performance-tools/src/assets/images/bg/tourism.jpg
Binary file modified 21-webpack-performance-tools/src/assets/images/cursos/arquitectura-css.jpg
100755 → 100644
Binary file modified 21-webpack-performance-tools/src/assets/images/cursos/bash.jpg
Binary file modified 21-webpack-performance-tools/src/assets/images/cursos/karabiner.jpg
100755 → 100644
Binary file modified 21-webpack-performance-tools/src/assets/images/cursos/light-dark-themes.jpg
100755 → 100644
Binary file modified 21-webpack-performance-tools/src/assets/images/cursos/php-8.jpg
Binary file modified ...ck-performance-tools/src/assets/images/cursos/refactoring-change_preventers.jpg
100755 → 100644
Binary file modified 21-webpack-performance-tools/src/assets/images/cursos/setup-linux.jpg
100755 → 100644
Binary file modified 21-webpack-performance-tools/src/assets/images/cursos/solid.jpg
33 changes: 33 additions & 0 deletions 22-lighthouse/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": [
"eslint-plugin-html",
"simple-import-sort",
"import"
],
"extends": [
"eslint:recommended",
"plugin:prettier/recommended"
],
"rules": {
"no-console": ["error", { "allow": ["error"] }],
"no-var": "error",
"object-shorthand": "error",
"prefer-const": "error",
"prefer-template": "error",
"prefer-destructuring": "warn",
"prefer-rest-params": "warn",
"prefer-spread": "warn",
"yoda": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error"
}
}
28 changes: 28 additions & 0 deletions 22-lighthouse/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# Build output
dist
1 change: 1 addition & 0 deletions 22-lighthouse/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
21 changes: 21 additions & 0 deletions 22-lighthouse/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 CodelyTV

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
64 changes: 64 additions & 0 deletions 22-lighthouse/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# JavaScript Bootstrap (base / project starter)

This is a repository intended to serve as a starting point if you want to bootstrap a project in modern vanilla JavaScript.

## Features

- [Webpack](https://webpack.js.org/) (v5)
- [Babel](https://babeljs.io/) with [preset-env](https://babeljs.io/docs/en/babel-preset-env)
- [Prettier](https://prettier.io/)
- [ESLint](https://eslint.org/) with:
- [Simple Import Sort](https://github.com/lydell/eslint-plugin-simple-import-sort/)
- [Import plugin](https://github.com/benmosher/eslint-plugin-import/)
- [HTML plugin](https://github.com/BenoitZugmeyer/eslint-plugin-html)
- And a few other ES2015+ related rules
- [Jest](https://jestjs.io) with [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro)
- [Cypress](https://www.cypress.io/) with [Testing Library](https://testing-library.com/docs/cypress-testing-library/)
- [GitHub Action workflows](https://github.com/features/actions) set up to run tests and linting on push

## Running the app

```
# install dependencies
npm install

# run in dev mode on port 8080
npm run dev

# generate production build
npm run build

# run generated content in dist folder on port 8080
npm run start
```

## Testing

### Jest with Testing Library

```
npm run test
```

### Cypress

```
# run in dev mode on port 8080
npm run dev

# open Cypress to run tests on dev mode
npm run cy:open

# open Cypress on CLI
npm run cy:run
```

## Linting

```
# run linter
npm run lint

# fix lint issues
npm run lint:fix
```
11 changes: 11 additions & 0 deletions 22-lighthouse/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": "3.9.1"
}
]
]
}
Loading