Skip to content

Instantly share code, notes, and snippets.

View frankyonnetti's full-sized avatar

Frank Yonnetti frankyonnetti

View GitHub Profile

Webpack Drupal Theming

Install

Install the following node modules (npm), in the same directory as this readme file, for compiling and linting our code.

npm i -D @babel/core @babel/preset-env autoprefixer babel-loader browser-sync browser-sync-webpack-plugin css-loader mini-css-extract-plugin postcss-loader postcss-pxtorem sass sass-loader standard stylelint stylelint-config-sass-guidelines stylelint-order webpack webpack-cli
# [NPM Check Updates](https://www.npmjs.com/package/npm-check-updates)
- Install the tool `npm i -D npm-check-updates`
- Update the package.json `npx ncu --upgrade`
- Install the new packages npm install
!.eslintrc.json
!README.md
node_modules
bsync-config.js
> 0.2%
last 2 version
Firefox ESR
not dead
@frankyonnetti
frankyonnetti / jQuery to vanilla JavaScript.md
Last active March 6, 2022 19:34
Cheat sheet for moving from jQuery to vanilla JavaScript https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript #javascript #vanilla
@frankyonnetti
frankyonnetti / gen-d8-salt.sh
Created February 24, 2022 16:24 — forked from pfaocle/gen-d8-salt.sh
Generate Drupal 8 hash salt
drush eval "var_dump(Drupal\Component\Utility\Crypt::randomBytesBase64(55))"
@frankyonnetti
frankyonnetti / CSS Triangle.css
Created September 17, 2021 18:08
#CSS #triangle
https://css-tricks.com/snippets/css/css-triangle/
.arrow-up {
content: "";
border-right: 15px solid transparent;
border-bottom: 15px solid black;
border-left: 15px solid transparent;
width: 0;
height: 0;
}
@frankyonnetti
frankyonnetti / Vimeo image.php
Created July 13, 2021 15:41
#video #vimeo Get image for video
// example: https://vimeo.com/api/oembed.json?url=https://vimeo.com/387724556
<?php
$vimeo_url = 'https://vimeo.com/387724556';
$data = json_decode(file_get_contents('http://vimeo.com/api/oembed.json?url=' . $vimeo_url));
echo '<img class="vimeo-video" src="' . $data->thumbnail_url . '" alt="Video: ' . $data->title . '">';
@frankyonnetti
frankyonnetti / MAMP - zshrc PATH.sh
Created June 1, 2021 21:26
MAMP - zshrc PATH #terminal #php #mysql
PATH="/usr/local/bin:/usr/local/sbin:$PATH"
PATH="/Applications/MAMP/bin/php/php7.x.x/bin:$PATH"
PATH="/Applications/MAMP/Library/bin:$PATH"
PATH="/usr/local/share:$PATH"
PATH="$HOME/.composer/vendor/bin:$PATH"
export PATH