├── .npmrc
├── examples
├── nuxt
│ ├── .npmrc
│ ├── static
│ │ ├── favicon.ico
│ │ └── README.md
│ ├── components
│ │ ├── README.md
│ │ ├── Feature.vue
│ │ └── Logo.vue
│ ├── .editorconfig
│ ├── layouts
│ │ ├── README.md
│ │ └── default.vue
│ ├── pages
│ │ ├── README.md
│ │ ├── typography.vue
│ │ └── index.vue
│ ├── assets
│ │ └── README.md
│ ├── plugins
│ │ └── README.md
│ ├── middleware
│ │ └── README.md
│ ├── README.md
│ ├── store
│ │ └── README.md
│ ├── package.json
│ └── nuxt.config.js
├── vue
│ ├── .npmrc
│ ├── babel.config.js
│ ├── public
│ │ ├── favicon.ico
│ │ └── index.html
│ ├── src
│ │ ├── main.js
│ │ ├── App.vue
│ │ ├── components
│ │ │ ├── Feature.vue
│ │ │ └── HelloWorld.vue
│ │ └── assets
│ │ │ └── logo.svg
│ ├── .gitignore
│ ├── README.md
│ ├── vue.config.js
│ └── package.json
└── nuxt-ca-ts
│ ├── .npmrc
│ ├── tailwind.config.js
│ ├── layouts
│ └── default.vue
│ ├── tsconfig.json
│ ├── nuxt.config.ts
│ ├── pages
│ ├── nested.vue
│ └── index.vue
│ └── package.json
├── pnpm-workspace.yaml
├── .gitattributes
├── .gitignore
├── src
├── tsconfig.json
├── interfaces.ts
├── utils.ts
├── parser.ts
└── index.ts
├── tsconfig.json
├── .github
└── workflows
│ └── publish.yml
├── LICENSE
├── package.json
├── docs
└── using-tailwind-configuration.md
├── rollup.config.js
├── README.md
└── pnpm-lock.yaml
/.npmrc:
--------------------------------------------------------------------------------
1 | shared-workspace-lockfile=false
--------------------------------------------------------------------------------
/examples/nuxt/.npmrc:
--------------------------------------------------------------------------------
1 | shamefully-hoist=true
--------------------------------------------------------------------------------
/examples/vue/.npmrc:
--------------------------------------------------------------------------------
1 | shamefully-hoist=true
--------------------------------------------------------------------------------
/examples/nuxt-ca-ts/.npmrc:
--------------------------------------------------------------------------------
1 | shamefully-hoist=true
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - examples/*
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | example/** -linguist-detectable
2 | site/** -linguist-detectable
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | /public/build/
3 |
4 | /src/**/*.js
5 | /src/**/*.d.ts
6 |
7 | .DS_Store
8 | .nuxt/
9 | dist
--------------------------------------------------------------------------------
/examples/vue/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/examples/nuxt-ca-ts/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [require('windicss/plugin/scroll-snap')],
3 | }
4 |
--------------------------------------------------------------------------------
/examples/nuxt/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/windicss/vue-windicss-preprocess/HEAD/examples/nuxt/static/favicon.ico
--------------------------------------------------------------------------------
/examples/vue/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/windicss/vue-windicss-preprocess/HEAD/examples/vue/public/favicon.ico
--------------------------------------------------------------------------------
/examples/vue/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 |
4 | createApp(App).mount('#app')
5 |
--------------------------------------------------------------------------------
/examples/nuxt-ca-ts/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": ".",
5 | "declaration": true,
6 | "declarationDir": "../dist/types"
7 | },
8 | "include": ["."]
9 | }
10 |
--------------------------------------------------------------------------------
/examples/nuxt/components/README.md:
--------------------------------------------------------------------------------
1 | # COMPONENTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | The components directory contains your Vue.js Components.
6 |
7 | _Nuxt.js doesn't supercharge these components._
8 |
--------------------------------------------------------------------------------
/examples/vue/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
15 |
--------------------------------------------------------------------------------
/examples/nuxt/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/examples/nuxt/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Application Layouts.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
8 |
--------------------------------------------------------------------------------
/examples/nuxt/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/examples/nuxt/assets/README.md:
--------------------------------------------------------------------------------
1 | # ASSETS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).
8 |
--------------------------------------------------------------------------------
/examples/nuxt/plugins/README.md:
--------------------------------------------------------------------------------
1 | # PLUGINS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
8 |
--------------------------------------------------------------------------------
/examples/vue/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "rootDir": ".",
4 | "target": "es2017",
5 | "module": "esnext",
6 | "moduleResolution": "node",
7 | "lib": ["dom", "esnext", "dom.iterable"],
8 | "strict": true,
9 | "strictNullChecks": true,
10 | "esModuleInterop": true,
11 | "forceConsistentCasingInFileNames": true,
12 | "resolveJsonModule": true
13 | },
14 | "exclude": ["**/dist", "**/examples"]
15 | }
16 |
--------------------------------------------------------------------------------
/examples/nuxt/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your application middleware.
6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7 |
8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
9 |
--------------------------------------------------------------------------------
/examples/vue/README.md:
--------------------------------------------------------------------------------
1 | # vuets
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/examples/nuxt/README.md:
--------------------------------------------------------------------------------
1 | # nuxt_example
2 |
3 | ## Build Setup
4 |
5 | ```bash
6 | # install dependencies
7 | $ npm install
8 |
9 | # serve with hot reload at localhost:3000
10 | $ npm run dev
11 |
12 | # build for production and launch server
13 | $ npm run build
14 | $ npm run start
15 |
16 | # generate static project
17 | $ npm run generate
18 | ```
19 |
20 | For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
21 |
--------------------------------------------------------------------------------
/examples/nuxt/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Vuex Store files.
6 | Vuex Store option is implemented in the Nuxt.js framework.
7 |
8 | Creating a file in this directory automatically activates the option in the framework.
9 |
10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
11 |
--------------------------------------------------------------------------------
/examples/nuxt/static/README.md:
--------------------------------------------------------------------------------
1 | # STATIC
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your static files.
6 | Each file inside this directory is mapped to `/`.
7 | Thus you'd want to delete this README.md before deploying to production.
8 |
9 | Example: `/static/robots.txt` is mapped as `/robots.txt`.
10 |
11 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
12 |
--------------------------------------------------------------------------------
/examples/nuxt-ca-ts/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2018",
4 | "module": "ESNext",
5 | "moduleResolution": "Node",
6 | "lib": ["ESNext", "ESNext.AsyncIterable", "DOM"],
7 | "esModuleInterop": true,
8 | "allowJs": true,
9 | "sourceMap": true,
10 | "strict": true,
11 | "noEmit": true,
12 | "baseUrl": ".",
13 | "paths": {
14 | "~/*": ["./*"],
15 | "@/*": ["./*"]
16 | },
17 | "types": ["@types/node", "@nuxt/types"]
18 | },
19 | "exclude": ["node_modules"]
20 | }
21 |
--------------------------------------------------------------------------------
/examples/nuxt/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nuxt_example",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "cross-env DEBUG='nuxt:*' nuxt --port 3333",
7 | "build": "nuxt build",
8 | "start": "nuxt start --port 3333",
9 | "generate": "nuxt generate"
10 | },
11 | "dependencies": {
12 | "core-js": "^3.6.5",
13 | "nuxt": "^2.14.6"
14 | },
15 | "devDependencies": {
16 | "cross-env": "^7.0.3",
17 | "vue-windicss-preprocess": "workspace:../../dist",
18 | "windicss": "^2.2.0"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/examples/nuxt/components/Feature.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/nuxt-ca-ts/nuxt.config.ts:
--------------------------------------------------------------------------------
1 | import { defineNuxtConfig } from '@nuxtjs/composition-api'
2 |
3 | export default defineNuxtConfig({
4 | buildModules: ['@nuxt/typescript-build', '@nuxtjs/composition-api'],
5 | build: {
6 | extend(config) {
7 | config.module?.rules.push({
8 | test: /\.vue$/,
9 | loader: 'vue-windicss-preprocess',
10 | options: {
11 | config: 'tailwind.config.js',
12 | compile: process.env.NODE_ENV === 'production',
13 | globalPreflight: true,
14 | globalUtility: true,
15 | },
16 | })
17 | },
18 | },
19 | })
20 |
--------------------------------------------------------------------------------
/examples/vue/vue.config.js:
--------------------------------------------------------------------------------
1 | // vue.config.js
2 | module.exports = {
3 | configureWebpack: (config) => {
4 | config.resolve.symlinks = true
5 | config.module.rules.push({
6 | test: /\.vue$/,
7 | use: [{
8 | loader: 'vue-windicss-preprocess',
9 | options: {
10 | // config: 'tailwind.config.js',
11 | compile: false,
12 | globalPreflight: true,
13 | globalUtility: true,
14 | prefix: 'windi-',
15 | }
16 | }]
17 | });
18 | }
19 | }
--------------------------------------------------------------------------------
/examples/vue/src/components/Feature.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/nuxt-ca-ts/pages/nested.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
19 |
20 |
35 |
--------------------------------------------------------------------------------
/examples/vue/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/interfaces.ts:
--------------------------------------------------------------------------------
1 | export interface Node {
2 | start: number,
3 | end: number,
4 | type: string,
5 | value?: Text | Expression | ( Text | Expression)[],
6 | }
7 |
8 | export interface Attribute extends Node {
9 | type: 'Attribute',
10 | name: string,
11 | value: Text | Expression | ( Text | Expression)[],
12 | }
13 |
14 | export interface Directive extends Node {
15 | type: 'Directive',
16 | name: string,
17 | value: Text | Expression | ( Text | Expression)[],
18 | }
19 |
20 | export interface Expression extends Node {
21 | type: 'Expression',
22 | data: string
23 | }
24 |
25 | export interface Text extends Node {
26 | type: 'Text',
27 | data: string
28 | }
29 |
30 | export interface Tag {
31 | start: number,
32 | end: number,
33 | name: string,
34 | value: (Attribute | Directive)[]
35 | }
--------------------------------------------------------------------------------
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish Package
2 |
3 | on:
4 | push:
5 | tags:
6 | - v*
7 |
8 | jobs:
9 | publish-npm:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v1
13 | - uses: actions/setup-node@v1
14 | with:
15 | node-version: 12
16 | registry-url: https://registry.npmjs.org/
17 | - run: mkdir dist && cp package.json dist/package.json
18 | - run: npm i -g pnpm
19 | - run: pnpm install --frozen-lockfile
20 | - run: pnpm build:prod
21 | - run: pnpm test --if-present
22 | - run: cd dist && npm publish
23 | env:
24 | NODE_AUTH_TOKEN: ${{secrets.NPM_SECRET}}
25 | - run: npx conventional-github-releaser -p angular
26 | env:
27 | CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}}
--------------------------------------------------------------------------------
/examples/nuxt-ca-ts/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nuxt-windicss-example",
3 | "version": "1.0.0",
4 | "description": "",
5 | "scripts": {
6 | "dev": "nuxt",
7 | "build": "nuxt build"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "MIT",
12 | "dependencies": {
13 | "nuxt": "^2.15.0"
14 | },
15 | "devDependencies": {
16 | "@nuxt/types": "^2.15.0",
17 | "@nuxt/typescript-build": "^2.0.4",
18 | "@nuxt/vue-app": "^2.15.2",
19 | "@nuxtjs/composition-api": "^0.20.2",
20 | "css-loader": "^5.0.2",
21 | "fs-extra": "^9.1.0",
22 | "postcss": "^8.2.6",
23 | "postcss-import": "^13.0.0",
24 | "postcss-loader": "^4.2.0",
25 | "postcss-nested": "^5.0.3",
26 | "postcss-url": "^10.1.1",
27 | "vue-windicss-preprocess": "workspace:../../dist",
28 | "windicss": "^2.1.13"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/examples/vue/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue_example",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "core-js": "^3.9.0",
12 | "vue": "^3.0.5"
13 | },
14 | "devDependencies": {
15 | "@babel/eslint-parser": "^7.13.4",
16 | "@vue/cli-plugin-babel": "^4.5.11",
17 | "@vue/cli-plugin-eslint": "^4.5.11",
18 | "@vue/cli-service": "^4.5.11",
19 | "@vue/compiler-sfc": "^3.0.5",
20 | "eslint": "^7.20.0",
21 | "eslint-plugin-vue": "^7.6.0"
22 | },
23 | "eslintConfig": {
24 | "root": true,
25 | "env": {
26 | "node": true
27 | },
28 | "extends": [
29 | "plugin:vue/vue3-essential",
30 | "eslint:recommended"
31 | ],
32 | "parser": "@babel/eslint-parser",
33 | "rules": {}
34 | },
35 | "browserslist": [
36 | "> 1%",
37 | "last 2 versions",
38 | "not dead"
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Veritas Raven
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/examples/nuxt/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
63 |
--------------------------------------------------------------------------------
/examples/nuxt/pages/typography.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Garlic bread with cheese: What the science tells us
10 |
11 | For years parents have espoused the health benefits of eating garlic bread with cheese to their
12 | children, with the food earning such an iconic status in our culture that kids will often dress
13 | up as warm, cheesy loaf for Halloween.
14 |
15 |
16 | But a recent study shows that the celebrated appetizer may be linked to a series of rabies cases
17 | springing up around the country.
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-windicss-preprocess",
3 | "version": "2.2.0",
4 | "description": "A vue loader to compile tailwindcss at build time based on windicss compiler.",
5 | "main": "index.js",
6 | "types": "index.d.ts",
7 | "browser": "browser.js",
8 | "directories": {
9 | "examples": "examples"
10 | },
11 | "scripts": {
12 | "dev": "rollup -cw",
13 | "tsd": "tsc -p ./src --emitDeclarationOnly",
14 | "build": "rollup -c && npm run tsd",
15 | "build:prod": "PUBLISH=true rollup -c && npm run tsd",
16 | "release": "npx git-ensure -a && npx bumpp --commit --tag --push"
17 | },
18 | "repository": {
19 | "type": "git",
20 | "url": "https://github.com/voorjaar/vue-windicss-preprocess.git"
21 | },
22 | "keywords": [
23 | "vue",
24 | "vue-loader",
25 | "tailwindcss",
26 | "css",
27 | "compiler"
28 | ],
29 | "author": "Veritas Raven",
30 | "license": "MIT",
31 | "homepage": "https://github.com/voorjaar/vue-windicss-preprocess",
32 | "dependencies": {
33 | "loader-utils": "^2.0.0",
34 | "magic-string": "^0.25.7",
35 | "windicss": "^2.3.0"
36 | },
37 | "devDependencies": {
38 | "@rollup/plugin-node-resolve": "^11.2.0",
39 | "@rollup/plugin-replace": "^2.4.1",
40 | "@rollup/plugin-sucrase": "^3.1.0",
41 | "@rollup/plugin-typescript": "^8.2.0",
42 | "@types/loader-utils": "^2.0.1",
43 | "@types/node": "^14.14.32",
44 | "rollup": "^2.40.0",
45 | "rollup-plugin-terser": "^7.0.2",
46 | "tslib": "^2.1.0",
47 | "typescript": "^4.2.3"
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/examples/nuxt/nuxt.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | // Global page headers (https://go.nuxtjs.dev/config-head)
3 | head: {
4 | title: 'nuxt_example',
5 | meta: [
6 | { charset: 'utf-8' },
7 | { name: 'viewport', content: 'width=device-width, initial-scale=1' },
8 | { hid: 'description', name: 'description', content: '' }
9 | ],
10 | link: [
11 | { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
12 | ]
13 | },
14 |
15 | // Global CSS (https://go.nuxtjs.dev/config-css)
16 | css: [
17 | ],
18 |
19 | // Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
20 | plugins: [
21 | ],
22 |
23 | // Auto import components (https://go.nuxtjs.dev/config-components)
24 | components: true,
25 |
26 | // Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
27 | buildModules: [
28 | ],
29 |
30 | // Modules (https://go.nuxtjs.dev/config-modules)
31 | modules: [
32 | ],
33 |
34 | // Build Configuration (https://go.nuxtjs.dev/config-build)
35 | build: {
36 | extend(config) {
37 | const { buildContext } = this
38 | config.module.rules.push({
39 | test: /\.vue$/,
40 | loader: 'vue-windicss-preprocess',
41 | options: {
42 | config: {
43 | plugins: [
44 | require('windicss/plugin/typography')
45 | ]
46 | },
47 | compile: !buildContext.nuxt.options.dev, // false: interpretation mode; true: compilation mode
48 | globalPreflight: true, // preflight style is global or scoped
49 | globalUtility: true, // utility style is global or scoped
50 | // prefix: 'windi-',
51 | }
52 | })
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/examples/nuxt-ca-ts/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 | Windicss Scroll-snap
8 |
9 |
10 |
11 |
12 |
snap snap-x
13 |
snap-center
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
49 |
50 |
55 |
--------------------------------------------------------------------------------
/docs/using-tailwind-configuration.md:
--------------------------------------------------------------------------------
1 | # Using tailwind configuration
2 |
3 | ## Create configuration file
4 |
5 | Basically it is a simple tailwind configuration file, you need to replace tailwindcss with windicss, if you need to call the default colors. All tailwindcss v2.0 utilities should be customizable, except for variants and plugins which are not currently supported. For detailed configuration, please refer to the [tailwindcss documentation](https://tailwindcss.com/docs/configuration).
6 |
7 | ```js
8 | // tailwind.config.js
9 | const colors = require('windicss/colors')
10 |
11 | module.exports = {
12 | theme: {
13 | screens: {
14 | sm: '480px',
15 | md: '768px',
16 | lg: '976px',
17 | xl: '1440px',
18 | },
19 | colors: {
20 | gray: colors.coolGray,
21 | blue: colors.lightBlue,
22 | red: colors.rose,
23 | pink: colors.fuchsia,
24 | },
25 | fontFamily: {
26 | sans: ['Graphik', 'sans-serif'],
27 | serif: ['Merriweather', 'serif'],
28 | },
29 | extend: {
30 | spacing: {
31 | '128': '32rem',
32 | '144': '36rem',
33 | },
34 | borderRadius: {
35 | '4xl': '2rem',
36 | }
37 | }
38 | }
39 | }
40 | ```
41 |
42 | ## Add your config file to windicss
43 |
44 | Add `config` option to your `rollup.config.js`/`svelte.config.js`.
45 |
46 | ```js
47 | const windicss = require('svelte-windicss-preprocess');
48 | // ...
49 | plugins: [
50 | svelte({
51 | preprocess: {
52 | markup: windicss.preprocess({
53 | config: 'tailwind.config.js', // things like ./src/tailwind.config.js also works
54 | compile: false,
55 | prefix: 'windi-',
56 | globalPreflight: true,
57 | globalUtility: true,
58 | }),
59 | },
60 | // ...
61 | }),
62 | // ...
63 | ]
64 | ```
65 |
66 | Now you can test whether your configuration file is working properly, and welcome feedback if you find any problems.
--------------------------------------------------------------------------------
/src/utils.ts:
--------------------------------------------------------------------------------
1 | import { StyleSheet } from 'windicss/utils/style';
2 | import type { loader } from "webpack";
3 | import { Config as WindicssConfig } from "windicss/types/interfaces";
4 |
5 | export function searchNotEscape(text:string, char = "{") {
6 | if (text.charAt(0) === char) return 0;
7 | const index = text.search(new RegExp(String.raw`([^\\]${char})`));
8 | if (index === -1) return -1;
9 | return index + 1;
10 | }
11 |
12 | export function searchGroup(text: string) {
13 | let level = 1;
14 | let index = 0;
15 | let endBracket = searchNotEscape(text, "}");
16 | while (endBracket !== -1) {
17 | let nextBracket = searchNotEscape(text.slice(index,), "{");
18 | if (endBracket < nextBracket || nextBracket === -1) {
19 | level--;
20 | index = endBracket + 1;
21 | if (level == 0) return endBracket;
22 | } else {
23 | level++;
24 | index = nextBracket + 1;
25 | }
26 | endBracket = searchNotEscape(text.slice(index,), "}");
27 | }
28 | return -1;
29 | }
30 |
31 | export function combineStyleList(stylesheets:StyleSheet[]) {
32 | return stylesheets.reduce((previousValue, currentValue) => previousValue.extend(currentValue), new StyleSheet()).combine();//.sort();
33 | }
34 |
35 | export function writeFileSync(path: string, data: string) {
36 | if (!process.env.BROWSER) return require('fs').writeFileSync(path, data);
37 | }
38 |
39 | /**
40 | * Resolve the WindicssConfig.
41 | * @param config File path to tailwind.config.js or object of WindicssConfig
42 | */
43 | export function resolveConfig(config?: string | WindicssConfig) {
44 | // handle invalid config
45 | if (!config) {
46 | return undefined
47 | }
48 | /*
49 | * A type of string implies a file path to the tailwind.config.js. We check if it's a browser
50 | * context otherwise the load may fail.
51 | */
52 | if (typeof config === 'string' && !process.env.BROWSER) {
53 | return loadConfigFile(config)
54 | }
55 | // if it's already an object we can just return it as is
56 | return config
57 | }
58 |
59 | export function loadConfigFile(config: string) {
60 | return require(require('path').resolve(config));
61 | }
62 |
63 | export function getOptions(root:loader.LoaderContext) {
64 | if (process.env.BROWSER) return {};
65 | return require("loader-utils").getOptions(root);
66 | }
67 |
68 |
69 |
--------------------------------------------------------------------------------
/examples/nuxt/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
An advanced online playground for Tailwind CSS, including support for things like:
14 |
15 |
16 | Customizing your
17 | tailwind.config.js file
18 |
19 |
20 | Extracting classes with
21 | @apply
22 |
23 |
24 | Code completion with instant preview
25 |
26 |
27 |
Perfect for learning how the framework works, prototyping a new idea, or creating a demo to share online.
28 |
29 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
46 |
47 |
61 |
--------------------------------------------------------------------------------
/examples/vue/src/assets/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/vue/src/components/HelloWorld.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 | An advanced online playground for Tailwind CSS, including
23 | support for things like:
24 |
25 |
26 |
27 | Customizing your
28 | tailwind.config.js
31 | file
32 |
33 |
34 | Extracting classes with
35 | @apply
36 |
37 | Code completion with instant preview
38 |
39 |
40 | Perfect for learning how the framework works, prototyping a
41 | new idea, or creating a demo to share online.
42 |
43 |
44 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
75 |
76 |
--------------------------------------------------------------------------------
/examples/nuxt/components/Logo.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
13 |
17 |
18 |
19 |
20 |
32 |
--------------------------------------------------------------------------------
/rollup.config.js:
--------------------------------------------------------------------------------
1 | import fs from "fs";
2 | import path from "path";
3 | import resolve from "@rollup/plugin-node-resolve";
4 | import sucrase from "@rollup/plugin-sucrase";
5 | import replace from "@rollup/plugin-replace";
6 | import typescript from "@rollup/plugin-typescript";
7 | import { terser } from "rollup-plugin-terser";
8 |
9 | const output_dir = "./dist";
10 |
11 | const is_publish = !!process.env.PUBLISH;
12 |
13 | const ts_plugin = is_publish
14 | ? typescript({
15 | target: "es5",
16 | include: "src/**",
17 | outDir: output_dir,
18 | typescript: require("typescript"),
19 | })
20 | : sucrase({
21 | exclude: ['node_modules/**'],
22 | transforms: ["typescript"],
23 | });
24 |
25 | const dump = (file) => path.join(output_dir, file);
26 |
27 | const copy = (files) =>
28 | files.forEach((file) => fs.copyFileSync(file, dump(file)));
29 |
30 | const rmdir = (dir) => {
31 | if (fs.existsSync(dir)) {
32 | const files = fs.readdirSync(dir);
33 |
34 | if (files.length > 0) {
35 | files.forEach((file) => {
36 | if (fs.statSync(path.join(dir, file)).isDirectory()) {
37 | rmdir(dir + "/" + file);
38 | } else {
39 | fs.unlinkSync(path.join(dir, file));
40 | }
41 | });
42 | }
43 | }
44 | };
45 |
46 | const mkdir = (dir) => !(fs.existsSync(dir) && fs.statSync(dir).isDirectory()) && fs.mkdirSync(dir);
47 |
48 |
49 | const types = (dest = "index.d.ts", src = "../types/index", module = "*") => {
50 | return {
51 | writeBundle() {
52 | fs.writeFileSync(dump(dest), `export ${module} from "${src}";`);
53 | },
54 | };
55 | };
56 |
57 | const main = {
58 | input: "src/index.ts",
59 | output: [
60 | {
61 | exports: "default",
62 | file: dump("index.js"),
63 | format: "cjs"
64 | }
65 | ],
66 | plugins: [
67 | ts_plugin,
68 | resolve(),
69 | replace({ "process.env.BROWSER": false }),
70 | rmdir(output_dir),
71 | mkdir(output_dir),
72 | copy(["package.json", "README.md", "LICENSE"]),
73 | types("index.d.ts", "./types/index", "*"),
74 | ],
75 | external: [
76 | "loader-utils",
77 | "magic-string",
78 | "windicss/lib",
79 | "windicss/utils/parser",
80 | "windicss/utils/style",
81 | "postcss",
82 | "postcss-nested"
83 | ]
84 | };
85 |
86 | const browser = {
87 | input: "src/index.ts",
88 | output: [
89 | {
90 | name: "windicss",
91 | file: dump("browser.js"),
92 | format: "umd",
93 | }
94 | ],
95 | plugins: [
96 | ts_plugin,
97 | resolve({ browser: true }),
98 | terser({ module: true, output: { comments: 'some' } }),
99 | replace({
100 | "process.env.BROWSER": true,
101 | "process.env.NODE_ENV": `"publish"`
102 | })
103 | ],
104 | external: [
105 | "postcss",
106 | "postcss-nested"
107 | ]
108 | };
109 |
110 | export default is_publish? [ main, browser ] : main;
--------------------------------------------------------------------------------
/src/parser.ts:
--------------------------------------------------------------------------------
1 | import { searchGroup, searchNotEscape } from "./utils";
2 | import type { Tag, Text, Expression } from "./interfaces";
3 |
4 | export default class Parser {
5 | content: string;
6 | index = 0;
7 | constructor(content: string) {
8 | this.content = content;
9 | }
10 |
11 | _parseTag(): Tag["value"] {
12 | const nodes: Tag["value"] = [];
13 |
14 | while (!this.end) {
15 | const attr = this.food.match(/\S+\s*=\s*/);
16 | const endTag = searchNotEscape(this.food, ">");
17 |
18 | if (!attr || attr.index === undefined) break;
19 | if (endTag === -1 || endTag < attr.index) break;
20 |
21 | const start = this.index + attr.index;
22 | this.eatTo(attr.index + attr[0].length);
23 |
24 | let name = attr[0].replace(/\s*=\s*$/, "");
25 | let type = /^class:\S+/.test(name)
26 | ? "Directive"
27 | : ("Attribute" as "Directive" | "Attribute");
28 | if (type === "Directive") name = name.replace(/^class:/, "");
29 |
30 | const startChar = this.first;
31 | switch (startChar) {
32 | case `"`:
33 | case `'`:
34 | this.eat(startChar);
35 | this.eatSpace();
36 | const children: (Text | Expression)[] = [];
37 |
38 | while (!this.end) {
39 | const nextBracket = searchNotEscape(this.food, "{");
40 | const nextQuote = searchNotEscape(this.food, startChar);
41 |
42 | if (nextQuote < nextBracket || nextBracket === -1) {
43 | let value = this.spitSpace(this.eatTo(nextQuote));
44 | if (value.data) children.push({ ...value, type: "Text" });
45 | break;
46 | }
47 |
48 | // text before group
49 | const value = this.spitSpace(this.eatTo(nextBracket));
50 | if (value.data) children.push({ ...value, type: "Text" });
51 |
52 | // handle group
53 | this.eat("{");
54 | const groupEnd = searchGroup(this.food);
55 | const group = this.eatTo(groupEnd);
56 | this.eat("}");
57 | this.eatSpace();
58 | children.push({ ...group, type: "Expression" });
59 | }
60 |
61 | const endChar = this.eat(startChar); // eat end quote
62 | nodes.push({ start, end: endChar.end, type, name, value: children });
63 | break;
64 |
65 | case "{":
66 | this.eat(startChar);
67 | const groupEnd = searchGroup(this.food);
68 | const value = this.eatTo(groupEnd);
69 | this.eat(startChar); // eat end bracket
70 | nodes.push({
71 | start,
72 | end: value.end + 1,
73 | type,
74 | name,
75 | value: { ...value, type: "Expression" },
76 | });
77 | break;
78 |
79 | default:
80 | const one = this.food.match(/^[^\s>]+/)?.[0];
81 | if (one) {
82 | const value = this.eat(one);
83 | nodes.push({
84 | start,
85 | end: value.end,
86 | type,
87 | name,
88 | value: { ...value, type: "Text" },
89 | });
90 | }
91 | break;
92 | }
93 | }
94 | return nodes;
95 | }
96 |
97 | parse(): Tag[] {
98 | const output: Tag[] = [];
99 | while (!this.end) {
100 | const tag = this.food.match(/<[^\s/]+/);
101 | if (!tag || tag.index === undefined) break;
102 | const decl = this.eat(tag[0]);
103 | const value = this._parseTag();
104 | this.eat(">");
105 | output.push({
106 | start: decl.start,
107 | end: this.index,
108 | name: tag[0].slice(1),
109 | value,
110 | });
111 | }
112 | return output;
113 | }
114 |
115 | slice(start?: number, end?: number): string {
116 | return this.content.slice(start, end);
117 | }
118 |
119 | eat(str: string) {
120 | const start = this.index;
121 | this.index += str.length;
122 | return {
123 | start,
124 | end: this.index,
125 | data: str,
126 | };
127 | }
128 |
129 | eatSpace() {
130 | const spaces = this.food.match(/^\s+/);
131 | if (spaces) this.index += spaces[0].length;
132 | }
133 |
134 | spitSpace({
135 | start,
136 | end,
137 | data,
138 | }: {
139 | start: number;
140 | end: number;
141 | data: string;
142 | }) {
143 | const spaces = data.match(/\s+$/);
144 | if (spaces) {
145 | data = data.slice(0, spaces.index);
146 | end -= spaces[0].length;
147 | }
148 | return { start, end, data };
149 | }
150 |
151 | eatTo(end: number) {
152 | const start = this.index;
153 | const food = this.food.slice(0, end);
154 | this.index += end;
155 | return {
156 | start,
157 | end: this.index,
158 | data: food,
159 | };
160 | }
161 |
162 | get food() {
163 | return this.content.slice(this.index);
164 | }
165 |
166 | get first() {
167 | return this.content.charAt(this.index);
168 | }
169 |
170 | get end() {
171 | return this.index === this.content.length;
172 | }
173 | }
174 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | import MagicString from "magic-string";
2 | import { Processor } from "windicss/lib";
3 | import { CSSParser } from "windicss/utils/parser";
4 | import { StyleSheet } from "windicss/utils/style";
5 | import { default as HTMLParser } from "./parser";
6 | import { getOptions, resolveConfig, combineStyleList } from "./utils";
7 | import type { loader } from "webpack";
8 | import type { Config as WindicssConfig } from "windicss/types/interfaces"
9 |
10 | const OPTIONS: {
11 | config?: string | WindicssConfig;
12 | compile?: boolean;
13 | prefix?: string;
14 | bundle?: string;
15 | globalPreflight?: boolean;
16 | globalUtility?: boolean;
17 | } = {
18 | compile: false,
19 | prefix: "windi-",
20 | globalPreflight: true,
21 | globalUtility: true,
22 | };
23 |
24 | const REGEXP = {
25 | matchStyle: /`;
70 | }
71 |
72 |
73 | export default function (this: loader.LoaderContext, content:string) {
74 | const options = {...OPTIONS, ...(getOptions(this) || {})};
75 | const processor = new Processor(resolveConfig(options.config));
76 | const variants = [
77 | ...Object.keys(processor.resolveVariants()),
78 | ...Object.keys(MODIFIED),
79 | ].filter((i) => !Object.values(MODIFIED).includes(i)); // update variants to make vue happy
80 |
81 | const globalStyles:StyleSheet[] = [];
82 | const scopedStyles:StyleSheet[] = [];
83 |
84 | const template = matchTemplate(content)?.content;
85 | if (!(template && template.data)) return content;
86 |
87 | let styleBlocks = content.match(REGEXP.matchStyle);
88 |
89 | if (styleBlocks) {
90 | styleBlocks.forEach(async style => {
91 | let styleStr = style.replace(/<\/?style[^>]*>/g, "");
92 | (REGEXP.isGlobalStyle.test(style)? globalStyles : scopedStyles).push(new CSSParser(styleStr, processor).parse());
93 | });
94 | content = content.replace(REGEXP.matchStyle, "");
95 | }
96 | const code = new MagicString(content);
97 | const parser = new HTMLParser(content);
98 | parser.parse().forEach(tag => {
99 | let classes: string[] = [];
100 | let conditionClasses: string[] = [];
101 | let classStart: number | undefined;
102 | tag.value.forEach((node) => {
103 | if (node.type === "Attribute") {
104 | if (node.name === "class" || node.name === "tw") {
105 | classStart = node.start;
106 | code.overwrite(node.start, node.end, "");
107 | if (!Array.isArray(node.value)) node.value = [node.value];
108 | classes = [
109 | ...classes,
110 | ...node.value.filter((i) => i.type === "Text").map((i) => i.data),
111 | ];
112 | } else if (variants.includes(node.name)) {
113 | // handle variants attribute
114 | classStart = node.start;
115 | code.overwrite(node.start, node.end, "");
116 | if (!Array.isArray(node.value)) node.value = [node.value];
117 | classes = [
118 | ...classes,
119 | ...node.value
120 | .filter((i) => i.type === "Text")
121 | .map((i) => addVariant(i.data, node.name)),
122 | ];
123 | }
124 | } else if (node.type === "Directive") {
125 | conditionClasses.push(node.name);
126 | }
127 | });
128 |
129 | if (classStart) {
130 | if (options.compile) {
131 | const utility = processor.compile(classes.join(" "), options.prefix, false);
132 | (options.globalUtility && !options.bundle) ? globalStyles.push(utility.styleSheet) : scopedStyles.push(utility.styleSheet);
133 | const className = utility.className ? [utility.className, ...utility.ignored].join(" ") : utility.ignored.join(" ");
134 | code.prependLeft(classStart, `class="${className}"`);
135 | } else {
136 | const className = classes.join(" ");
137 | const utility = processor.interpret(className);
138 | (options.globalUtility && !options.bundle) ? globalStyles.push(utility.styleSheet) : scopedStyles.push(utility.styleSheet);
139 | code.prependLeft(classStart, `class="${className}"`);
140 | }
141 | }
142 |
143 | if (conditionClasses.length > 0) {
144 | const utility = processor.interpret(conditionClasses.join(" "));
145 | globalStyles.push(utility.styleSheet);
146 | }
147 | });
148 |
149 | const preflights = processor.preflight(template.data, true, true, true, true);
150 |
151 | (options.globalPreflight && !options.bundle) ? globalStyles.push(preflights) : scopedStyles.push(preflights);
152 |
153 | const styles:string[] = [];
154 | if(globalStyles[0]) styles.push(compileStyleList(globalStyles, true));
155 | if(scopedStyles[0]) styles.push(compileStyleList(scopedStyles, false));
156 | code.trimEnd().append(styles.join('\n'));
157 |
158 | return code.toString();
159 | };
160 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vue-windicss-preprocess
2 |
3 | > A vue loader to compile [tailwindcss](https://github.com/tailwindlabs/tailwindcss) at build time based on [windicss](https://github.com/windicss/windicss) compiler.
4 |
5 | ```diff
6 | + This package will be archived, we will give up support for it, please switch your project to [windicss-webpack-plugin](https://github.com/windicss/windicss-webpack-plugin)
7 | ```
8 |
9 | ## Installation
10 |
11 | ```sh
12 | npm install vue-windicss-preprocess --save-dev
13 | ```
14 |
15 | ## Configuration
16 |
17 | ### Vue
18 |
19 | Add `vue-windicss-preprocess` to your `webpack.config.js` or `vue.config.js`.
20 |
21 | ```js
22 | // webpack.config.js
23 | module.exports = {
24 | module: {
25 | rules: [
26 | // ... other rules omitted
27 | {
28 | test: /\.vue$/,
29 | use: [{
30 | loader: 'vue-windicss-preprocess',
31 | options: {
32 | config: "tailwind.config.js", // tailwind config file path OR config object (optional)
33 | compile: false, // false: interpretation mode; true: compilation mode
34 | globalPreflight: true, // set preflight style is global or scoped
35 | globalUtility: true, // set utility style is global or scoped
36 | prefix: 'windi-' // set compilation mode style prefix
37 | }
38 | }]
39 | }
40 | ]
41 | },
42 | // plugin omitted
43 | }
44 | ```
45 |
46 | ```js
47 | // vue.config.js
48 | module.exports = {
49 | configureWebpack: (config) => {
50 | config.module.rules.push({
51 | test: /\.vue$/,
52 | use: [{
53 | loader: 'vue-windicss-preprocess',
54 | options: {
55 | config: "tailwind.config.js", // tailwind config file path OR config object (optional)
56 | compile: false, // false: interpretation mode; true: compilation mode
57 | globalPreflight: true, // set preflight style is global or scoped
58 | globalUtility: true, // set utility style is global or scoped
59 | prefix: 'windi-' // set compilation mode style prefix
60 | }
61 | }]
62 | })
63 | }
64 | }
65 | ```
66 |
67 | ### Nuxt
68 |
69 | Add `vue-windicss-preprocess` to your `nuxt.config.js`
70 |
71 | ```js
72 | // nuxt.config.js
73 | export default {
74 | // ... other configurations omitted
75 | // Build Configuration (https://go.nuxtjs.dev/config-build)
76 | build: {
77 | extend(config) {
78 | config.module.rules.push({
79 | test: /\.vue$/,
80 | loader: 'vue-windicss-preprocess',
81 | options: {
82 | config: "tailwind.config.js", // tailwind config file path OR config object (optional)
83 | compile: false, // false: interpretation mode; true: compilation mode
84 | globalPreflight: true, // set preflight style is global or scoped
85 | globalUtility: true, // set utility style is global or scoped
86 | prefix: 'windi-' // set compilation mode style prefix
87 | }
88 | })
89 | }
90 | }
91 | }
92 | ```
93 |
94 | ## Basic Usage
95 |
96 | You can write any [tailwindcss](https://github.com/tailwindlabs/tailwindcss) classes in your `.vue` files.
97 |
98 | ```html
99 |
100 |
101 |
102 |
103 |
104 |
105 | Erin Lindford
106 |
107 |
108 | Product Engineer
109 |
110 |
111 |
Message
112 |
113 |
114 |
115 |
116 |
119 | ```
120 |
121 | ### Compilation mode
122 |
123 | This is not css-in-js, [windicss](https://github.com/windicss/windicss) only merges and compiles the tailwind classes of each line into a new class. You can try to compile (`npm run build`) and check the generated css file.
124 |
125 | ```html
126 |
127 |
128 |
129 |
130 |
Erin Lindford
131 |
Product Engineer
132 |
133 |
Message
134 |
135 |
136 | ```
137 |
138 | ```css
139 | /* ... */
140 | .windi-1q7lotv {
141 | border-radius: 9999px;
142 | display: block;
143 | height: 6rem;
144 | margin-left: auto;
145 | margin-right: auto;
146 | }
147 | /* ... */
148 | @media (min-width: 640px) {
149 | /* ... */
150 | .windi-1q7lotv {
151 | flex-shrink: 0;
152 | margin-left: 0;
153 | margin-right: 0;
154 | }
155 | /* ... */
156 | ```
157 |
158 | ### Interpretation mode
159 |
160 | Interpretation mode will not modify your classes, it will only compile the original tailwind classes just like [tailwindcss](https://github.com/tailwindlabs/tailwindcss), but it is minimized and has native cross-browser support.
161 |
162 | ```css
163 | /* ... */
164 | .py-8 {
165 | padding-top: 2rem;
166 | padding-bottom: 2rem;
167 | }
168 | /* ... */
169 | @media (min-width: 640px) {
170 | /* ... */
171 | .sm\:items-center {
172 | align-items: center;
173 | }
174 | .sm\:mx-0 {
175 | margin-left: 0;
176 | margin-right: 0;
177 | }
178 | .sm\:py-4 {
179 | padding-top: 1rem;
180 | padding-bottom: 1rem;
181 | }
182 | /* ... */
183 | }
184 | ```
185 |
186 | ## Using tailwind directives
187 |
188 | ```css
189 |
200 | ```
201 |
202 | If you are using `Vetur` vscode extension, I believe most people are using it. You will need to add `"vetur.validation.style": false` to your configuration file.
203 |
204 | Hit `ctrl-shift-p` or `cmd-shift-p` on mac, type open settings, and select `Preferences: Open Settings (JSON)`. Add `"vetur.validation.style": false` to `settings.json` then save it.
205 |
206 | ## Features
207 |
208 | - `tw` is an optional replacement attribute of `class`, The className in `tw` will be merged into the `class` attribute after compilation.
209 |
210 | - Group: You can also write groups in all the attributes mentioned above, such as `class="font-meidum sm:hover:(font-bold bg-gray-200)"`. This is a native feature supported by [windicss](https://github.com/windicss/windicss).
211 |
212 | - Unrestricted build: such as `bg-hex-1c1c1e p-3.2 p-3rem p-4px w-10/11 bg-$custom-variable ...`
213 |
214 | - [Using tailwind directives], such as `@apply`, `@screen`, `@variants`.
215 |
216 | - States attribute: such as `sm md lg xl xxl focus hover dark ...` after applid media rules then also will be merged into the `class` attribute. (Attributes like `sm:hover` are not available because they may be rarely used and slow down the parsing speed.)
217 |
218 | - [Customize](https://github.com/windicss/svelte-windicss-preprocess/blob/main/docs/using-tailwind-configuration.md): support `tailwind.config.js`.
219 |
220 | - For more details, please refer to [windicss](https://github.com/windicss/windicss).
221 |
222 | ## Resources
223 |
224 | - [Roadmap](https://github.com/windicss/windicss/projects/1)
225 |
226 | - [Documents](https://windicss.org)
227 |
228 | - [Discussions](https://github.com/windicss/windicss/discussions)
229 |
230 | - [MIT License](https://github.com/windicss/vue-windicss-preprocess/blob/main/LICENSE)
231 |
--------------------------------------------------------------------------------
/pnpm-lock.yaml:
--------------------------------------------------------------------------------
1 | dependencies:
2 | loader-utils: 2.0.0
3 | magic-string: 0.25.7
4 | windicss: 2.3.0
5 | devDependencies:
6 | '@rollup/plugin-node-resolve': 11.2.0_rollup@2.40.0
7 | '@rollup/plugin-replace': 2.4.1_rollup@2.40.0
8 | '@rollup/plugin-sucrase': 3.1.0_rollup@2.40.0
9 | '@rollup/plugin-typescript': 8.2.0_2914f388182fa220278416b3b5c7c400
10 | '@types/loader-utils': 2.0.1
11 | '@types/node': 14.14.32
12 | rollup: 2.40.0
13 | rollup-plugin-terser: 7.0.2_rollup@2.40.0
14 | tslib: 2.1.0
15 | typescript: 4.2.3
16 | lockfileVersion: 5.2
17 | packages:
18 | /@babel/code-frame/7.12.13:
19 | dependencies:
20 | '@babel/highlight': 7.12.13
21 | dev: true
22 | resolution:
23 | integrity: sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==
24 | /@babel/helper-validator-identifier/7.12.11:
25 | dev: true
26 | resolution:
27 | integrity: sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==
28 | /@babel/highlight/7.12.13:
29 | dependencies:
30 | '@babel/helper-validator-identifier': 7.12.11
31 | chalk: 2.4.2
32 | js-tokens: 4.0.0
33 | dev: true
34 | resolution:
35 | integrity: sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==
36 | /@rollup/plugin-node-resolve/11.2.0_rollup@2.40.0:
37 | dependencies:
38 | '@rollup/pluginutils': 3.1.0_rollup@2.40.0
39 | '@types/resolve': 1.17.1
40 | builtin-modules: 3.2.0
41 | deepmerge: 4.2.2
42 | is-module: 1.0.0
43 | resolve: 1.20.0
44 | rollup: 2.40.0
45 | dev: true
46 | engines:
47 | node: '>= 10.0.0'
48 | peerDependencies:
49 | rollup: ^1.20.0||^2.0.0
50 | resolution:
51 | integrity: sha512-qHjNIKYt5pCcn+5RUBQxK8krhRvf1HnyVgUCcFFcweDS7fhkOLZeYh0mhHK6Ery8/bb9tvN/ubPzmfF0qjDCTA==
52 | /@rollup/plugin-replace/2.4.1_rollup@2.40.0:
53 | dependencies:
54 | '@rollup/pluginutils': 3.1.0_rollup@2.40.0
55 | magic-string: 0.25.7
56 | rollup: 2.40.0
57 | dev: true
58 | peerDependencies:
59 | rollup: ^1.20.0 || ^2.0.0
60 | resolution:
61 | integrity: sha512-XwC1oK5rrtRJ0tn1ioLHS6OV5JTluJF7QE1J/q1hN3bquwjnVxjtMyY9iCnoyH9DQbf92CxajB3o98wZbP3oAQ==
62 | /@rollup/plugin-sucrase/3.1.0_rollup@2.40.0:
63 | dependencies:
64 | '@rollup/pluginutils': 3.1.0_rollup@2.40.0
65 | rollup: 2.40.0
66 | sucrase: 3.17.1
67 | dev: true
68 | engines:
69 | node: '>=8.0.0'
70 | peerDependencies:
71 | rollup: ^1.20.0 || ^2.0.0
72 | resolution:
73 | integrity: sha512-PZ70LDNgIj8rL+3pKwKwTBOQ2c9JofXeLbWz+2V4/nCt4LqwYTNqxJJf1riTJsVARVzJdA0woIzUzjKZvL8TfA==
74 | /@rollup/plugin-typescript/8.2.0_2914f388182fa220278416b3b5c7c400:
75 | dependencies:
76 | '@rollup/pluginutils': 3.1.0_rollup@2.40.0
77 | resolve: 1.20.0
78 | rollup: 2.40.0
79 | tslib: 2.1.0
80 | typescript: 4.2.3
81 | dev: true
82 | engines:
83 | node: '>=8.0.0'
84 | peerDependencies:
85 | rollup: ^2.14.0
86 | tslib: '*'
87 | typescript: '>=3.4.0'
88 | resolution:
89 | integrity: sha512-5DyVsb7L+ehLfNPu/nat8Gq3uJGzku4bMFPt90XahtgiSBf7z9YKPLqFUJKMT41W/mJ98SVGDPOhzikGrr/Lhg==
90 | /@rollup/pluginutils/3.1.0_rollup@2.40.0:
91 | dependencies:
92 | '@types/estree': 0.0.39
93 | estree-walker: 1.0.1
94 | picomatch: 2.2.2
95 | rollup: 2.40.0
96 | dev: true
97 | engines:
98 | node: '>= 8.0.0'
99 | peerDependencies:
100 | rollup: ^1.20.0||^2.0.0
101 | resolution:
102 | integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==
103 | /@types/anymatch/1.3.1:
104 | dev: true
105 | resolution:
106 | integrity: sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==
107 | /@types/estree/0.0.39:
108 | dev: true
109 | resolution:
110 | integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
111 | /@types/loader-utils/2.0.1:
112 | dependencies:
113 | '@types/node': 14.14.31
114 | '@types/webpack': 4.41.26
115 | dev: true
116 | resolution:
117 | integrity: sha512-X3jTNi/I2AEd2WrHdSqRppPkYzWkRMNGxJzeMwS0o3hVi8ZB6JCnf/XyQmqpUuCidld5lC/1VxVgTktEweRK+w==
118 | /@types/node/14.14.31:
119 | dev: true
120 | resolution:
121 | integrity: sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==
122 | /@types/node/14.14.32:
123 | dev: true
124 | resolution:
125 | integrity: sha512-/Ctrftx/zp4m8JOujM5ZhwzlWLx22nbQJiVqz8/zE15gOeEW+uly3FSX4fGFpcfEvFzXcMCJwq9lGVWgyARXhg==
126 | /@types/resolve/1.17.1:
127 | dependencies:
128 | '@types/node': 14.14.31
129 | dev: true
130 | resolution:
131 | integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==
132 | /@types/source-list-map/0.1.2:
133 | dev: true
134 | resolution:
135 | integrity: sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==
136 | /@types/tapable/1.0.6:
137 | dev: true
138 | resolution:
139 | integrity: sha512-W+bw9ds02rAQaMvaLYxAbJ6cvguW/iJXNT6lTssS1ps6QdrMKttqEAMEG/b5CR8TZl3/L7/lH0ZV5nNR1LXikA==
140 | /@types/uglify-js/3.12.0:
141 | dependencies:
142 | source-map: 0.6.1
143 | dev: true
144 | resolution:
145 | integrity: sha512-sYAF+CF9XZ5cvEBkI7RtrG9g2GtMBkviTnBxYYyq+8BWvO4QtXfwwR6a2LFwCi4evMKZfpv6U43ViYvv17Wz3Q==
146 | /@types/webpack-sources/2.1.0:
147 | dependencies:
148 | '@types/node': 14.14.31
149 | '@types/source-list-map': 0.1.2
150 | source-map: 0.7.3
151 | dev: true
152 | resolution:
153 | integrity: sha512-LXn/oYIpBeucgP1EIJbKQ2/4ZmpvRl+dlrFdX7+94SKRUV3Evy3FsfMZY318vGhkWUS5MPhtOM3w1/hCOAOXcg==
154 | /@types/webpack/4.41.26:
155 | dependencies:
156 | '@types/anymatch': 1.3.1
157 | '@types/node': 14.14.31
158 | '@types/tapable': 1.0.6
159 | '@types/uglify-js': 3.12.0
160 | '@types/webpack-sources': 2.1.0
161 | source-map: 0.6.1
162 | dev: true
163 | resolution:
164 | integrity: sha512-7ZyTfxjCRwexh+EJFwRUM+CDB2XvgHl4vfuqf1ZKrgGvcS5BrNvPQqJh3tsZ0P6h6Aa1qClVHaJZszLPzpqHeA==
165 | /ansi-styles/3.2.1:
166 | dependencies:
167 | color-convert: 1.9.3
168 | dev: true
169 | engines:
170 | node: '>=4'
171 | resolution:
172 | integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
173 | /any-promise/1.3.0:
174 | dev: true
175 | resolution:
176 | integrity: sha1-q8av7tzqUugJzcA3au0845Y10X8=
177 | /balanced-match/1.0.0:
178 | dev: true
179 | resolution:
180 | integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
181 | /big.js/5.2.2:
182 | dev: false
183 | resolution:
184 | integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==
185 | /brace-expansion/1.1.11:
186 | dependencies:
187 | balanced-match: 1.0.0
188 | concat-map: 0.0.1
189 | dev: true
190 | resolution:
191 | integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
192 | /buffer-from/1.1.1:
193 | dev: true
194 | resolution:
195 | integrity: sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
196 | /builtin-modules/3.2.0:
197 | dev: true
198 | engines:
199 | node: '>=6'
200 | resolution:
201 | integrity: sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==
202 | /chalk/2.4.2:
203 | dependencies:
204 | ansi-styles: 3.2.1
205 | escape-string-regexp: 1.0.5
206 | supports-color: 5.5.0
207 | dev: true
208 | engines:
209 | node: '>=4'
210 | resolution:
211 | integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
212 | /color-convert/1.9.3:
213 | dependencies:
214 | color-name: 1.1.3
215 | dev: true
216 | resolution:
217 | integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
218 | /color-name/1.1.3:
219 | dev: true
220 | resolution:
221 | integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
222 | /commander/2.20.3:
223 | dev: true
224 | resolution:
225 | integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
226 | /commander/4.1.1:
227 | dev: true
228 | engines:
229 | node: '>= 6'
230 | resolution:
231 | integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==
232 | /concat-map/0.0.1:
233 | dev: true
234 | resolution:
235 | integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
236 | /deepmerge/4.2.2:
237 | dev: true
238 | engines:
239 | node: '>=0.10.0'
240 | resolution:
241 | integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
242 | /emojis-list/3.0.0:
243 | dev: false
244 | engines:
245 | node: '>= 4'
246 | resolution:
247 | integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==
248 | /escape-string-regexp/1.0.5:
249 | dev: true
250 | engines:
251 | node: '>=0.8.0'
252 | resolution:
253 | integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
254 | /estree-walker/1.0.1:
255 | dev: true
256 | resolution:
257 | integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==
258 | /fs.realpath/1.0.0:
259 | dev: true
260 | resolution:
261 | integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
262 | /fsevents/2.3.2:
263 | dev: true
264 | engines:
265 | node: ^8.16.0 || ^10.6.0 || >=11.0.0
266 | optional: true
267 | os:
268 | - darwin
269 | resolution:
270 | integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
271 | /function-bind/1.1.1:
272 | dev: true
273 | resolution:
274 | integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
275 | /glob/7.1.6:
276 | dependencies:
277 | fs.realpath: 1.0.0
278 | inflight: 1.0.6
279 | inherits: 2.0.4
280 | minimatch: 3.0.4
281 | once: 1.4.0
282 | path-is-absolute: 1.0.1
283 | dev: true
284 | resolution:
285 | integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
286 | /has-flag/3.0.0:
287 | dev: true
288 | engines:
289 | node: '>=4'
290 | resolution:
291 | integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
292 | /has-flag/4.0.0:
293 | dev: true
294 | engines:
295 | node: '>=8'
296 | resolution:
297 | integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
298 | /has/1.0.3:
299 | dependencies:
300 | function-bind: 1.1.1
301 | dev: true
302 | engines:
303 | node: '>= 0.4.0'
304 | resolution:
305 | integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
306 | /inflight/1.0.6:
307 | dependencies:
308 | once: 1.4.0
309 | wrappy: 1.0.2
310 | dev: true
311 | resolution:
312 | integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
313 | /inherits/2.0.4:
314 | dev: true
315 | resolution:
316 | integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
317 | /is-core-module/2.2.0:
318 | dependencies:
319 | has: 1.0.3
320 | dev: true
321 | resolution:
322 | integrity: sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==
323 | /is-module/1.0.0:
324 | dev: true
325 | resolution:
326 | integrity: sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=
327 | /jest-worker/26.6.2:
328 | dependencies:
329 | '@types/node': 14.14.31
330 | merge-stream: 2.0.0
331 | supports-color: 7.2.0
332 | dev: true
333 | engines:
334 | node: '>= 10.13.0'
335 | resolution:
336 | integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==
337 | /js-tokens/4.0.0:
338 | dev: true
339 | resolution:
340 | integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
341 | /json5/2.2.0:
342 | dependencies:
343 | minimist: 1.2.5
344 | dev: false
345 | engines:
346 | node: '>=6'
347 | hasBin: true
348 | resolution:
349 | integrity: sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==
350 | /lines-and-columns/1.1.6:
351 | dev: true
352 | resolution:
353 | integrity: sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
354 | /loader-utils/2.0.0:
355 | dependencies:
356 | big.js: 5.2.2
357 | emojis-list: 3.0.0
358 | json5: 2.2.0
359 | dev: false
360 | engines:
361 | node: '>=8.9.0'
362 | resolution:
363 | integrity: sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==
364 | /magic-string/0.25.7:
365 | dependencies:
366 | sourcemap-codec: 1.4.8
367 | resolution:
368 | integrity: sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==
369 | /merge-stream/2.0.0:
370 | dev: true
371 | resolution:
372 | integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
373 | /minimatch/3.0.4:
374 | dependencies:
375 | brace-expansion: 1.1.11
376 | dev: true
377 | resolution:
378 | integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
379 | /minimist/1.2.5:
380 | dev: false
381 | resolution:
382 | integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
383 | /mz/2.7.0:
384 | dependencies:
385 | any-promise: 1.3.0
386 | object-assign: 4.1.1
387 | thenify-all: 1.6.0
388 | dev: true
389 | resolution:
390 | integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==
391 | /node-modules-regexp/1.0.0:
392 | dev: true
393 | engines:
394 | node: '>=0.10.0'
395 | resolution:
396 | integrity: sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=
397 | /object-assign/4.1.1:
398 | dev: true
399 | engines:
400 | node: '>=0.10.0'
401 | resolution:
402 | integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
403 | /once/1.4.0:
404 | dependencies:
405 | wrappy: 1.0.2
406 | dev: true
407 | resolution:
408 | integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
409 | /path-is-absolute/1.0.1:
410 | dev: true
411 | engines:
412 | node: '>=0.10.0'
413 | resolution:
414 | integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
415 | /path-parse/1.0.6:
416 | dev: true
417 | resolution:
418 | integrity: sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
419 | /picomatch/2.2.2:
420 | dev: true
421 | engines:
422 | node: '>=8.6'
423 | resolution:
424 | integrity: sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
425 | /pirates/4.0.1:
426 | dependencies:
427 | node-modules-regexp: 1.0.0
428 | dev: true
429 | engines:
430 | node: '>= 6'
431 | resolution:
432 | integrity: sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==
433 | /randombytes/2.1.0:
434 | dependencies:
435 | safe-buffer: 5.2.1
436 | dev: true
437 | resolution:
438 | integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==
439 | /resolve/1.20.0:
440 | dependencies:
441 | is-core-module: 2.2.0
442 | path-parse: 1.0.6
443 | dev: true
444 | resolution:
445 | integrity: sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
446 | /rollup-plugin-terser/7.0.2_rollup@2.40.0:
447 | dependencies:
448 | '@babel/code-frame': 7.12.13
449 | jest-worker: 26.6.2
450 | rollup: 2.40.0
451 | serialize-javascript: 4.0.0
452 | terser: 5.6.0
453 | dev: true
454 | peerDependencies:
455 | rollup: ^2.0.0
456 | resolution:
457 | integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==
458 | /rollup/2.40.0:
459 | dev: true
460 | engines:
461 | node: '>=10.0.0'
462 | hasBin: true
463 | optionalDependencies:
464 | fsevents: 2.3.2
465 | resolution:
466 | integrity: sha512-WiOGAPbXoHu+TOz6hyYUxIksOwsY/21TRWoO593jgYt8mvYafYqQl+axaA8y1z2HFazNUUrsMSjahV2A6/2R9A==
467 | /safe-buffer/5.2.1:
468 | dev: true
469 | resolution:
470 | integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
471 | /serialize-javascript/4.0.0:
472 | dependencies:
473 | randombytes: 2.1.0
474 | dev: true
475 | resolution:
476 | integrity: sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==
477 | /source-map-support/0.5.19:
478 | dependencies:
479 | buffer-from: 1.1.1
480 | source-map: 0.6.1
481 | dev: true
482 | resolution:
483 | integrity: sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
484 | /source-map/0.6.1:
485 | dev: true
486 | engines:
487 | node: '>=0.10.0'
488 | resolution:
489 | integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
490 | /source-map/0.7.3:
491 | dev: true
492 | engines:
493 | node: '>= 8'
494 | resolution:
495 | integrity: sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
496 | /sourcemap-codec/1.4.8:
497 | resolution:
498 | integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==
499 | /sucrase/3.17.1:
500 | dependencies:
501 | commander: 4.1.1
502 | glob: 7.1.6
503 | lines-and-columns: 1.1.6
504 | mz: 2.7.0
505 | pirates: 4.0.1
506 | ts-interface-checker: 0.1.13
507 | dev: true
508 | engines:
509 | node: '>=8'
510 | hasBin: true
511 | resolution:
512 | integrity: sha512-04cNLFAhS4NBG2Z/MTkLY6HdoBsqErv3wCncymFlfFtnpMthurlWYML2RlID4M2BbiJSu1eZdQnE8Lcz4PCe2g==
513 | /supports-color/5.5.0:
514 | dependencies:
515 | has-flag: 3.0.0
516 | dev: true
517 | engines:
518 | node: '>=4'
519 | resolution:
520 | integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
521 | /supports-color/7.2.0:
522 | dependencies:
523 | has-flag: 4.0.0
524 | dev: true
525 | engines:
526 | node: '>=8'
527 | resolution:
528 | integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
529 | /terser/5.6.0:
530 | dependencies:
531 | commander: 2.20.3
532 | source-map: 0.7.3
533 | source-map-support: 0.5.19
534 | dev: true
535 | engines:
536 | node: '>=10'
537 | hasBin: true
538 | resolution:
539 | integrity: sha512-vyqLMoqadC1uR0vywqOZzriDYzgEkNJFK4q9GeyOBHIbiECHiWLKcWfbQWAUaPfxkjDhapSlZB9f7fkMrvkVjA==
540 | /thenify-all/1.6.0:
541 | dependencies:
542 | thenify: 3.3.1
543 | dev: true
544 | engines:
545 | node: '>=0.8'
546 | resolution:
547 | integrity: sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=
548 | /thenify/3.3.1:
549 | dependencies:
550 | any-promise: 1.3.0
551 | dev: true
552 | resolution:
553 | integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==
554 | /ts-interface-checker/0.1.13:
555 | dev: true
556 | resolution:
557 | integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==
558 | /tslib/2.1.0:
559 | dev: true
560 | resolution:
561 | integrity: sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==
562 | /typescript/4.2.3:
563 | dev: true
564 | engines:
565 | node: '>=4.2.0'
566 | hasBin: true
567 | resolution:
568 | integrity: sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==
569 | /windicss/2.3.0:
570 | dev: false
571 | engines:
572 | node: '>= 12'
573 | hasBin: true
574 | resolution:
575 | integrity: sha512-OR/ULZmcVhtEJDIFnkz4S4v4efpZ8DuvDtzBwXNgbtiPQIxN0Zhpo59q0rfF0i3tfwjKw2KCQXNxL5E98bMuVA==
576 | /wrappy/1.0.2:
577 | dev: true
578 | resolution:
579 | integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
580 | specifiers:
581 | '@rollup/plugin-node-resolve': ^11.2.0
582 | '@rollup/plugin-replace': ^2.4.1
583 | '@rollup/plugin-sucrase': ^3.1.0
584 | '@rollup/plugin-typescript': ^8.2.0
585 | '@types/loader-utils': ^2.0.1
586 | '@types/node': ^14.14.32
587 | loader-utils: ^2.0.0
588 | magic-string: ^0.25.7
589 | rollup: ^2.40.0
590 | rollup-plugin-terser: ^7.0.2
591 | tslib: ^2.1.0
592 | typescript: ^4.2.3
593 | windicss: ^2.3.0
594 |
--------------------------------------------------------------------------------