@zubyjs/tailwind 1.0.79 → 1.0.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /** @type {import('tailwindcss').Config} */
2
2
  export default {
3
- content: ['./**/*.{jsx,tsx}'],
4
- theme: {
5
- extend: {},
6
- },
7
- plugins: [],
3
+ content: ['./**/*.{jsx,tsx}'],
4
+ theme: {
5
+ extend: {},
6
+ },
7
+ plugins: [],
8
8
  };
@@ -1,9 +1,9 @@
1
1
  import type { Config } from 'tailwindcss';
2
2
 
3
3
  export default {
4
- content: ['./**/*.{jsx,tsx}'],
5
- theme: {
6
- extend: {},
7
- },
8
- plugins: [],
4
+ content: ['./**/*.{jsx,tsx}'],
5
+ theme: {
6
+ extend: {},
7
+ },
8
+ plugins: [],
9
9
  } satisfies Config;
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ZubyPlugin } from 'zuby/types.js';
1
+ import type { ZubyPlugin } from 'zuby/types.js';
2
2
  export declare const TAILWIND_CONFIG_FILE = "tailwind.config.js";
3
3
  export interface TailwindPluginOptions {
4
4
  /**
package/index.js CHANGED
@@ -16,14 +16,14 @@ export default ({ configFile, nesting = false } = {}) => ({
16
16
  name: 'zuby-tailwind-plugin',
17
17
  description: 'Adds Tailwind CSS to your Zuby.js application',
18
18
  hooks: {
19
- 'zuby:config:setup': async ({ config, injectToEntry }) => {
19
+ 'zuby:config:setup': async ({ config, logger }) => {
20
20
  const { srcDir = './' } = config;
21
21
  configFile = configFile || findTailwindConfig(srcDir) || createTailwindConfig(srcDir);
22
22
  config.vite = config.vite || {};
23
23
  config.vite.css = config.vite?.css || {};
24
24
  config.vite.css.postcss = config.vite.css.postcss || {};
25
25
  if (typeof config.vite.css.postcss === 'string') {
26
- console.error(`[zuby-tailwind-plugin] Invalid configuration for 'vite.css.postcss'. Expected an object, but got a string.`);
26
+ logger?.error(`[zuby-tailwind-plugin] Invalid configuration for 'vite.css.postcss'. Expected an object, but got a string.`);
27
27
  return;
28
28
  }
29
29
  config.vite.css.postcss.plugins = config.vite.css.postcss.plugins || [];
@@ -37,9 +37,7 @@ export default ({ configFile, nesting = false } = {}) => ({
37
37
  });
38
38
  export function createTailwindConfig(srcDir) {
39
39
  const isTs = existsSync(resolve(srcDir, 'tsconfig.json'));
40
- const configFile = isTs
41
- ? TAILWIND_CONFIG_FILE.replace('.js', '.ts')
42
- : TAILWIND_CONFIG_FILE.replace('.js', '.mjs');
40
+ const configFile = isTs ? TAILWIND_CONFIG_FILE.replace('.js', '.ts') : TAILWIND_CONFIG_FILE.replace('.js', '.mjs');
43
41
  copyFileSync(resolve(__dirname, 'examples', isTs ? 'ts' : 'js', configFile), resolve(srcDir, configFile));
44
42
  return configFile;
45
43
  }
@@ -49,5 +47,5 @@ export function findTailwindConfig(srcDir) {
49
47
  resolve(srcDir, TAILWIND_CONFIG_FILE.replace('.js', '.mjs')),
50
48
  resolve(srcDir, TAILWIND_CONFIG_FILE.replace('.js', '.cjs')),
51
49
  resolve(srcDir, TAILWIND_CONFIG_FILE.replace('.js', '.ts')),
52
- ].find(file => existsSync(file));
50
+ ].find((file) => existsSync(file));
53
51
  }
package/package.json CHANGED
@@ -1,44 +1,45 @@
1
1
  {
2
- "name": "@zubyjs/tailwind",
3
- "version": "1.0.79",
4
- "description": "Zuby.js tailwind plugin",
5
- "type": "module",
6
- "main": "index.js",
7
- "scripts": {
8
- "release": "cd ./dist && npm publish --access public && cd ..",
9
- "bump-version": "npm version patch",
10
- "build": "rm -rf dist/ stage/ && mkdir dist && tsc && cp -rf package.json README.md src/examples stage/tailwind/src/* dist/ && rm -rf stage/",
11
- "push-build": "npm run build && cd dist && yalc push --force && cd ..",
12
- "test": "exit 0"
13
- },
14
- "publishConfig": {
15
- "directory": "dist",
16
- "linkDirectory": true
17
- },
18
- "dependencies": {
19
- "autoprefixer": "10.4.19",
20
- "tailwindcss": "3.4.3"
21
- },
22
- "peerDependencies": {
23
- "zuby": "^1.0.0"
24
- },
25
- "bugs": {
26
- "url": "https://gitlab.com/futrou/zuby.js/-/issues",
27
- "email": "zuby@futrou.com"
28
- },
29
- "license": "MIT",
30
- "repository": {
31
- "type": "git",
32
- "url": "git+https://gitlab.com/futrou/zuby.js.git"
33
- },
34
- "homepage": "https://zubyjs.com",
35
- "keywords": [
36
- "zuby-plugin",
37
- "zuby",
38
- "tailwind",
39
- "css"
40
- ],
41
- "engines": {
42
- "node": ">=18"
43
- }
2
+ "name": "@zubyjs/tailwind",
3
+ "version": "1.0.81",
4
+ "description": "Zuby.js tailwind plugin",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "scripts": {
8
+ "release": "cd ./dist && npm publish --access public && cd ..",
9
+ "bump-version": "npm version patch",
10
+ "build": "rm -rf dist/ stage/ && mkdir dist && tsc && cp -rf package.json README.md src/examples stage/tailwind/src/* dist/ && rm -rf stage/",
11
+ "push-build": "npm run build && cd dist && yalc push --force && cd ..",
12
+ "test": "vitest run",
13
+ "test:coverage": "vitest run --coverage"
14
+ },
15
+ "publishConfig": {
16
+ "directory": "dist",
17
+ "linkDirectory": true
18
+ },
19
+ "dependencies": {
20
+ "autoprefixer": "10.4.19",
21
+ "tailwindcss": "3.4.3"
22
+ },
23
+ "peerDependencies": {
24
+ "zuby": "^1.0.0"
25
+ },
26
+ "bugs": {
27
+ "url": "https://gitlab.com/futrou/zuby.js/-/issues",
28
+ "email": "zuby@futrou.com"
29
+ },
30
+ "license": "MIT",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://gitlab.com/futrou/zuby.js.git"
34
+ },
35
+ "homepage": "https://zubyjs.com",
36
+ "keywords": [
37
+ "zuby-plugin",
38
+ "zuby",
39
+ "tailwind",
40
+ "css"
41
+ ],
42
+ "engines": {
43
+ "node": ">=18"
44
+ }
44
45
  }