Socket
Socket
Sign inDemoInstall

laravel-mix-tweemotional

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

laravel-mix-tweemotional - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

27

index.js

@@ -9,5 +9,3 @@ const mix = require('laravel-mix')

dependencies() {
this.requiresReload = `
Dependencies have been installed. Please run again.
`
this.requiresReload = `👩🏼‍🎤 Dependencies have been installed.`

@@ -21,3 +19,3 @@ return [

'babel-plugin-macros',
'tailwind.macro',
'tailwind.macro@next',
'tailwindcss',

@@ -27,11 +25,6 @@ ]

register(options) {
register({ tailwindConfig, emotionFormat }) {
this.config = {
tailwind: options && options.tailwindConfig ?
options.tailwindConfig :
'tailwind.config.js',
emotionFormat: options && options.emotionFormat ?
options.emotionFormat
: '[local]',
tailwind: tailwindConfig ? tailwindConfig : 'tailwind.config.js',
emotionFormat: emotionFormat ? emotionFormat : '[local]'
}

@@ -42,6 +35,8 @@ }

return {
presets: [['@emotion/babel-preset-css-prop', {
autoLabel: true,
labelFormat: this.config.emotionFormat,
}]],
presets: [
['@emotion/babel-preset-css-prop', {
autoLabel: true,
labelFormat: this.config.emotionFormat,
}]
],
plugins: [

@@ -48,0 +43,0 @@ ['macros', {

{
"name": "laravel-mix-tweemotional",
"version": "0.1.0",
"version": "0.2.0",
"description": "Laravel mix extension that combines the best of Emotion and Tailwind.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,7 +11,7 @@ # Tweemotional

2. Add `require('laravel-mix-tweemotional')` to your `webpack.mix.js` config file. Initialize using `mix.tweemotional()`.
2. Add `require('laravel-mix-tweemotional')` to your `webpack.mix.js` config file. Once the extension is included you initialize it using `mix.tweemotional()`.
## Basic usage
Creating a `<Backsplash />` styled component using Tailwind classes generated by your `tailwind.config.js` file
Creating a `<Backsplash />` styled component using Tailwind classes generated by your `tailwind.config.js` file:

@@ -24,3 +24,3 @@ ```js

Creating a styled component that takes a combination of preset Tailwind utilities and props (example: `<Backsplash color={hotpink} />`)
Creating a styled component that takes a combination of preset Tailwind utilities and props (example: `<Backsplash color={hotpink} />`):

@@ -40,8 +40,4 @@ ```js

Tweemotional takes two configuration parameters. passed when initializing the extension:
Tweemotional takes two configuration paramters which are passed when initializing the extension: `tailwindConfig` allows you to specify the path to your `tailwind.config.js` file (if it is in a non-standard location, for example). `emotionFormat` allows you to specify formatting instructions for Emotion generated classnames.
1. `tailwindConfig` allows you to specify the path to your `tailwind.config.js` file (if it is in a non-standard location, for example).
2. `emotionFormat` allows you to specify formatting instructions for Emotion generated classnames.
```js

@@ -48,0 +44,0 @@ mix.tweemotional({

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc