As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
#!/usr/bin/env php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* | |
* This pre-commit hooks will check for PHP errors (lint), and make sure the | |
* code is PSR-2 compliant. | |
* | |
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) | |
*/ |
<IfModule mod_headers.c> | |
Header set Connection keep-alive | |
# Cache-control headers | |
# 2 HOURS | |
#<filesMatch "*"> | |
Header set Cache-Control "max-age=7200, must-revalidate" | |
#</filesMatch> | |
# 480 weeks - 290304000 |
// NB: This is a proof of concept and needs work before using in production. | |
// https://github.com/turbolinks/turbolinks/issues/196#issuecomment-320610483 | |
// Copy paste the javascript below to somewhere that loads after turbolinks.js. | |
// Source: Converted coffee to JS with: https://awsm-tools.com/code/coffee2js | |
// https://github.com/turbolinks/turbolinks/blob/master/src/turbolinks/snapshot.coffee | |
Turbolinks.Snapshot.fromHTMLElement = function (htmlElement) { | |
var bodyElement, headDetails, headElement, _ref; |
// Share for educationnal purpose only | |
// -------------------- | |
// To remove ads or sidebar from twitter, just inject this code (via cjs for example) : | |
// Current code work for the new Twitter TL from you favorite navigator (january 2019) | |
// -------------------- | |
function removeSidebar() { | |
var elem = document.querySelector('[data-testid=sidebarColumn]'); | |
if (elem) elem.parentNode.removeChild(elem); | |
} |
license: mit |
const Encore = require('@symfony/webpack-encore'); | |
const tailwindcss = require('tailwindcss'); | |
const autoprefixer = require('autoprefixer'); | |
const purgecss = require('@fullhuman/postcss-purgecss')({ | |
content: [ | |
'./templates/**/*.twig', | |
'./assets/js/**/*.vue', | |
'./assets/js/**/*.js', |
// NOTE: AS REQUESTED, TAILWIND CSS 3.0 HAS FULL SUPPORT FOR ALL COLORS BY DEFAULT | |
// SEE https://tailwindcss.com/blog/tailwindcss-v3#every-color-out-of-the-box. | |
// As of 2020-12-22, this tailwind.config.js file includes all colors | |
// from the Tailwind CSS color palette reference laid out in full at this | |
// link: https://tailwindcss.com/docs/customizing-colors#color-palette-reference. | |
// Note that this will increase your unpurged Tailwind CSS file size immensely, | |
// for me it went from 3.64MB to 7.62MB! Be sure to purge your CSS in production! | |
// First we import the tailwindcss/colors dependency, as referenced |