Skip to content

Instantly share code, notes, and snippets.

@ShepetaAndrey
ShepetaAndrey / README.md
Created April 27, 2022 20:24
Vue 3 + Vite + Bootstrap + PurgeCSS

Setup

Bootstrap

  1. Install package
npm i bootstrap
  1. Create bootstrap.sass [css, scss, ...] file in assets/ folder and import Bootstrap styles
@import '../../node_modules/bootstrap/scss/bootstrap'
@ShepetaAndrey
ShepetaAndrey / README.md
Created April 27, 2022 19:05
Husky, lint-staged, commitlint, Vue JS

Husky + commitlint + lint-staged

husky

husky docs

This command will add husky "prepare": "husky install" npm lifecycle hook script that will be executed automatically during npm install command run.

npx husky-init

extend git hooks:

@ShepetaAndrey
ShepetaAndrey / .eslintrc.js
Last active September 22, 2022 03:09
Vite + Vue 3 + Pug with ESLint and Prettier
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: ["plugin:vue/vue3-recommended", "airbnb-base", "prettier"],
parserOptions: {
sourceType: "module",
ecmaVersion: 12,
@ShepetaAndrey
ShepetaAndrey / declension.js
Created November 5, 2021 13:21
Word declension in JS
/**
* Defines the right word form suitable for number provided
* @param {Number} number
* @param {[String]} declensions
* @param {[Number]} cases
* @returns {String}
* @example
* const result = declension(10, ['монета', 'монеты', 'монет'])
* console.log(result) // 'монет'
*/