Skip to content

✍️ Configuraciones entorno de trabajo

Notifications You must be signed in to change notification settings

jssgarcia/setup-fronted

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Configuraciones para desarrollo Front-End

Idea de repositorio a partir de la charla de Bash de Jorge Aznar que dio en el TheAntiEvent17.

Estructura del README basada en el setup de Tania Rascia.

Contenidos

Config

Configuracion de librerias Fronted

Firebase

Multi-hosting by Project.

Git

Nota: Acordeón para notas de Git

Algunos comandos usados en proyectos
Operaciones locales:
working directory -> staging area -> git repository

Crear rama en local

# Situarte en la rama desde donde quieres crear la rama
git checkout develop

# Comprobar que se tienen los últimos cambios
git fetch
git pull

# Crear la rama
git checkout -b feat/new-feature

Añadir al staging area todos los ficheros

# Ver el estado actual de los cambios (qué está en el índice para subir)
git status

# Comprobar en VS Code las diferencias de los ficheros para asegurar que lo que subes es lo que quieres subir

git add .

Quitar un fichero del staging area

git reset HEAD -- <file>

Deshacer cambios de los ficheros que están en el working directory (todavía no subidos al staging area)

git checkout .

Commit para subir ficheros del staging area al git directory

git commit -m "Commit message"

Subir a la misma rama en remoto

git push origin HEAD

Rebase de master a tu rama

# Asegurarte que estás en tu rama

git status

# Sincronizarte con el remoto

git fetch

git rebase origin/master

# resolver conflictos si los hubiera

git add .

git rebase —continue

# subir la rama rebasada a remoto con -f

git push origin "feature-branch" -f

Squash

http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html

Ejemplo: Combinar los últimos 4 commits tuyos en el primer commit de la lista:

git rebase -i HEAD~4

# Ejemplo (:wq al final para guardar como en vi)
pick 01d1124 Adding license
squash 6340aaa Moving license into its own file
squash ebfd367 Jekyll has become self-aware.
squash 30e0ccb Changed the tagline in the binary, too.

git add <file1> <file2>  # si conflictos

git rebase —continue # si conflictos

git push origin <branchname> -f

Git amend

Ejemplo: quieres añadir algo al último commit

# Haces los cambios

git add <file1> <file2>

git commit --amend

git push origin <branchname> -f

Dejar tu rama como en remoto

git reset —hard origin/rama

ó

git checkout -B master origin/master

Borrar rama remota y local

git push -d origin feat/feature-branch
git branch -D feat/feature-branch

Borrar todas las ramas locales excepto master

git branch | grep -v "master" | xargs git branch -D

Cambiar rama local y remota

https://multiplestates.wordpress.com/2015/02/05/rename-a-local-and-remote-branch-in-git/

git branch -m feat/MHF-725-params
git push origin :feat/MHF-841-params feat/MHF-725-params
git push origin -u  feat/MHF-725-params

Guardar cambios en stash y recuperarlos

# Guardar
git stash

# Recuperar borrando el stash
git stash pop

# Recuperar manteniendo el stash
git stash apply

Buscar git commit por mensaje

git log --all --grep='Build 0051'

Borrar tags

# Remote:
git push --delete origin tagname

# Local:
git tag --delete tagname

Crear tags

git tag -a 3.26.0 -m "Version 3.26.0”

git push origin 3.26.0

Navegador

  • Wrap your console.log arguments in an object literal to print the variable name along with its value: console.log({ isLoggedIn }).

  • Tip: Run keys(object) and values(object) in the Console to see an object's keys and values.

  • Tip: Run copy(obj) in the Console to copy an object to your clipboard

  • Tip: Type $_ in the Console to return the value of the last evaluated expression.

  • Option + Cmd + J: Open Console JS.

  • Local storage: https://developers.google.com/web/tools/chrome-devtools/manage-data/local-storage.

Extensiones

Editor Texto

Previamente usé: Atom y Brackets.

  • Abrir editor desde consola.

  • Mantener varios ficheros abiertos en pestañas: Preferencias -> Configuración: "workbench.editor.showTabs": true

  • Atajos de teclado Mac.

    • Cmd + P: Abrir fichero.

    • Control + r: Cambiar de proyecto (workspace).

    • Cmd + d: Seleccionar la palabra y al dar a Cmd + d va al siguiente. Así puedes reemplazar un grupo de palabras a la vez.

    • Cmd + b: Abrir/cerrar menú de la izquierda.

    • Control + g: Ir a la línea.

    • Cmd + F: Buscar.

    • Option + Cmd + F: Reemplazar.

    • Shift + Cmd + F: Buscar en todos los archivos.

    • Shift + Cmd + H: Reemplazar en todos los archivos.

    • Cmd + Shift + p: Buscador de comandos (Command palette).

  • Atajos de teclado Windows.

  • Atajos de teclado Linux.

  • Ejecutar ESLint al guardar un fichero en VS Code: https://medium.com/@netczuk/even-faster-code-formatting-using-eslint-22b80d061461.

  • Instalar extensión ESLint

  • Habilitar autofix con fix para Vue:

    { "eslint.autoFixOnSave": true, "eslint.validate": [ { "language": "vue", "autoFix": true } ] }

Extensiones

Terminal

Inicialmente he usado el terminal de Mac con el tema Homebrew. A partir de ahora quiero usar iTerm2.

Sistema Operativo

Uso (trabajo): macOS (Apple). Uso (personal): Windows 10

  • Bloquear ordenador Mac: Ctrl + Command + Q

Cambios en Windows 10:

  • Eliminar todos los programas preinstalados de Windows 10 con Remove-AppxPackage.

  • Deshabilitar que las aplicaciones nuevas instaladas se ejecuten al inicio.

  • Instalar Linux Bash Shell en Windows 10. Creados los proyectos en /mnt/c/Projects (C:/Projects).

    • Nota @ethomson: Pro-tip: you don't have to use bash in Windows Subsystem for Linux. If you run wsl, it will use your login shell, so you can use zsh!

Automatización

¿Qué cosas repetitivas puedo automatizar?

Virtual box

Para probar IE en un mac (ejemplo generando versión producción y con http-server para probar en local)

Herramientas organización

Edición imágenes

Screenshots

Gifs

Videoconferencia

Firma

  • Editar y firmar documentos PDF con Acrobe Acrobar Reader DC.

  • Aplicación móvil firmar PDFs: docusign.

Traducción

  • Deepl

Enlaces interesantes

About

✍️ Configuraciones entorno de trabajo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 68.7%
  • Shell 31.3%