This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {mix} = require('laravel-mix'); | |
const tailwindcss = require('tailwindcss'); | |
const glob = require('glob-all'); | |
const PurgecssPlugin = require('purgecss-webpack-plugin'); | |
mix | |
.js('js/src/theme-name.js', 'js/theme-name.js') | |
.sass('sass/theme-name.scss', 'css') | |
.options({ | |
processCssUrls: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mix = require('laravel-mix'); | |
const tailwindcss = require('tailwindcss'); | |
require('laravel-mix-purgecss'); | |
mix.postCss('src-css/themename.css', 'css') | |
.options({ | |
postCss: [tailwindcss('tailwind.js')], | |
processCssUrls: false, | |
}) | |
.js([ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp'); | |
const tailwindConfig = "tailwind.js"; /* Path to Tailwind config */ | |
const mainCSS = "src/style.css"; /* Path to main stylesheet */ | |
/** | |
* Custom PurgeCSS Extractor | |
* https://github.com/FullHuman/purgecss | |
*/ | |
class TailwindExtractor { | |
static extract(content) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mix = require('laravel-mix'); | |
const tailwindcss = require('tailwindcss'); | |
require('laravel-mix-purgecss'); | |
mix.setPublicPath('./web') | |
.postCss('src/css/main.css', 'css') | |
.options({ | |
postCss: [tailwindcss('tailwind.config.js'), require('autoprefixer')], | |
processCssUrls: false, | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mix = require('laravel-mix'); | |
const tailwindcss = require('tailwindcss'); | |
require('laravel-mix-purgecss'); | |
mix.setPublicPath('./public/themes/themename') | |
mix.postCss('src/default-src.css', 'css/themename.css') | |
.options({ | |
postCss: [tailwindcss('tailwind.config.js')], | |
processCssUrls: false, | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qs from 'qs'; | |
import Axios from 'axios'; | |
Axios.defaults.baseURL = Craft.baseUrl; | |
Axios.defaults.headers.common['Accept'] = 'application/json'; | |
Axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; | |
Axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; | |
Axios.interceptors.request.use(config => { | |
if (config.data instanceof FormData) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<form method="post" accept-charset="UTF-8"> | |
<h3><label for="username">Username</label></h3> | |
<input v-model="username" id="username" type="text" name="username" /> | |
<h3><label for="email">Email</label></h3> | |
<input v-model="email" id="email" type="text" name="email" /> | |
<h3><label for="password">Password</label></h3> | |
<input v-model="password" id="password" type="password" name="password" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if cart.paymentMethodId %} | |
<form method="POST" class="form" {% if cart.paymentMethod.class == 'Stripe' %}id="payment-form"{% endif %}> | |
<input type="hidden" name="action" value="commerce/payments/pay"/> | |
<input type="hidden" name="redirect" value="/checkout/complete?number={number}"/> | |
<input type="hidden" name="cancelUrl" value="/checkout/cancelled"/> | |
{{ getCsrfInput() }} | |
{% if errors is defined %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mix = require('laravel-mix'); | |
const tailwindcss = require('tailwindcss'); | |
const rootPath = Mix.paths.root.bind(Mix.paths); | |
const tailwindPlugins = function(configFile, paths) { | |
const pluginList = [tailwindcss(configFile)]; | |
if (mix.inProduction()) { | |
pluginList.push(require('@fullhuman/postcss-purgecss')({ |
OlderNewer