create-nuxt-base 0.3.0 → 0.3.5

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,4 +1,52 @@
1
- @tailwind base;
1
+ @import 'tailwindcss';
2
+
3
+ @config "../../../tailwind.config.js";
4
+
5
+ @plugin '@tailwindcss/typography';
6
+ @plugin '@tailwindcss/forms';
7
+
8
+ @custom-variant dark (&:is(.dark *));
9
+
10
+ @theme {
11
+ --color-primary-50: #f3faf7;
12
+ --color-primary-100: #d6f1e7;
13
+ --color-primary-200: #ade2d0;
14
+ --color-primary-300: #7cccb3;
15
+ --color-primary-400: #57b39a;
16
+ --color-primary-500: #37957d;
17
+ --color-primary-600: #2a7765;
18
+ --color-primary-700: #256052;
19
+ --color-primary-800: #224d45;
20
+ --color-primary-900: #20413a;
21
+ --color-primary-950: #0d2621;
22
+ --color-primary: #57b39a;
23
+
24
+ --color-background: #ffffff;
25
+ --color-foreground: #000000;
26
+ --color-border: hsl(0 0% 0% / 0.5);
27
+ --color-hover: hsl(0 0% 100% / 0.2);
28
+ --color-active: hsl(0 0% 100% / 0.2);
29
+
30
+ --breakpoint-3xl: 2400px;
31
+ }
32
+
33
+ /*
34
+ The default border color has changed to `currentColor` in Tailwind CSS v4,
35
+ so we've added these compatibility styles to make sure everything still
36
+ looks the same as it did with Tailwind CSS v3.
37
+
38
+ If we ever want to remove these styles, we need to add an explicit border
39
+ color utility to any element that depends on these defaults.
40
+ */
41
+ @layer base {
42
+ *,
43
+ ::after,
44
+ ::before,
45
+ ::backdrop,
46
+ ::file-selector-button {
47
+ border-color: var(--color-gray-200, currentColor);
48
+ }
49
+ }
2
50
 
3
51
  @layer base {
4
52
  body {
@@ -36,9 +84,6 @@
36
84
  }
37
85
  }
38
86
 
39
- @tailwind components;
40
- @tailwind utilities;
41
-
42
87
  html,
43
88
  body {
44
89
  height: 100%;
@@ -1,7 +1,7 @@
1
- const contextMenuState = <T>() => useState<any | null>(() => null);
1
+ const contextMenuState = () => useState<any | null>(() => null);
2
2
 
3
- export function useContextMenu<T = object>() {
4
- const menu = contextMenuState<T>();
3
+ export function useContextMenu() {
4
+ const menu = contextMenuState();
5
5
 
6
6
  const open = (config: { items: any[] }) => {
7
7
  menu.value = Object.assign(config, { show: true });
@@ -0,0 +1 @@
1
+ export const tw = <T extends TemplateStringsArray | string>(tailwindClasses: T) => tailwindClasses;
@@ -1,4 +1,4 @@
1
- export default defineNuxtRouteMiddleware((to, from) => {
1
+ export default defineNuxtRouteMiddleware((to) => {
2
2
  const { currentUserState } = useAuthState();
3
3
 
4
4
  if (to.fullPath.startsWith('/app/admin')) {
@@ -1,4 +1,4 @@
1
- export default defineNuxtRouteMiddleware((to, from) => {
1
+ export default defineNuxtRouteMiddleware((to) => {
2
2
  const { accessTokenState } = useAuthState();
3
3
 
4
4
  if (to.fullPath.startsWith('/app')) {
@@ -1,4 +1,4 @@
1
- export default defineNuxtRouteMiddleware((to, from) => {
1
+ export default defineNuxtRouteMiddleware((to) => {
2
2
  const { accessTokenState } = useAuthState();
3
3
 
4
4
  if (to.fullPath === '/auth' || to.fullPath === '/auth/register') {
@@ -1,6 +1,6 @@
1
1
  import { setLocale } from 'yup';
2
2
 
3
- export default defineNuxtPlugin(async (_nuxtApp) => {
3
+ export default defineNuxtPlugin(async () => {
4
4
  setLocale({
5
5
  // use constant translation keys for messages without values
6
6
  mixed: {
@@ -1,4 +1,4 @@
1
- export default defineNuxtPlugin(async (_nuxtApp) => {
1
+ export default defineNuxtPlugin(async () => {
2
2
  const applicationServerKey = useRuntimeConfig().public.webPushKey as string;
3
3
  const permissionState = ref<PermissionState>('prompt');
4
4
  const subscription = ref<PushSubscription | null>(null);
@@ -25,7 +25,9 @@ export default defineNuxtPlugin(async (_nuxtApp) => {
25
25
  body,
26
26
  method: 'POST',
27
27
  });
28
- } catch (error) {}
28
+ } catch (e) {
29
+ console.error(e);
30
+ }
29
31
  }
30
32
 
31
33
  async function refreshPermissionState() {
@@ -35,8 +37,8 @@ export default defineNuxtPlugin(async (_nuxtApp) => {
35
37
  applicationServerKey,
36
38
  userVisibleOnly: true,
37
39
  });
38
- } catch (error) {
39
- console.error(error);
40
+ } catch (e) {
41
+ console.error(e);
40
42
  }
41
43
  }
42
44
 
@@ -62,7 +64,9 @@ export default defineNuxtPlugin(async (_nuxtApp) => {
62
64
  body,
63
65
  method: 'DELETE',
64
66
  });
65
- } catch (error) {}
67
+ } catch (e) {
68
+ console.error(e);
69
+ }
66
70
  subscription.value = null;
67
71
  }
68
72
  }
@@ -1,20 +1,11 @@
1
1
  /** @type {import('tailwindcss').Config} */
2
2
  // eslint-disable-next-line @typescript-eslint/no-require-imports
3
- const defaultTheme = require('tailwindcss/defaultTheme');
4
- // eslint-disable-next-line @typescript-eslint/no-require-imports
5
- const { getIconCollections, iconsPlugin } = require('@egoist/tailwindcss-icons');
6
- // eslint-disable-next-line @typescript-eslint/no-require-imports
7
- const typography = require('@tailwindcss/typography');
8
- // eslint-disable-next-line @typescript-eslint/no-require-imports
9
- const forms = require('@tailwindcss/forms');
3
+ const { iconsPlugin, getIconCollections } = require('@egoist/tailwindcss-icons');
10
4
  // eslint-disable-next-line @typescript-eslint/no-require-imports
11
5
  const plugin = require('tailwindcss/plugin');
12
6
 
13
7
  module.exports = {
14
- darkMode: 'class',
15
8
  plugins: [
16
- typography,
17
- forms,
18
9
  iconsPlugin({
19
10
  // Select the icon collections you want to use
20
11
  collections: getIconCollections(['bi']),
@@ -27,37 +18,4 @@ module.exports = {
27
18
  });
28
19
  }),
29
20
  ],
30
- theme: {
31
- // fontFamily: {
32
- // montserrat: ['Montserrat'],
33
- // sans: ['Work Sans', 'Montserrat', ...defaultTheme.fontFamily.sans],
34
- // serif: ['Work Sans', 'Montserrat', ...defaultTheme.fontFamily.serif],
35
- // },
36
- extend: {
37
- colors: {
38
- active: 'hsl(0 0% 100% / 0.2)',
39
- background: '#FFFFFF',
40
- border: 'hsl(0 0% 0% / 0.5)',
41
- foreground: '#000000',
42
- hover: 'hsl(0 0% 100% / 0.2)',
43
- primary: {
44
- 50: '#f3faf7',
45
- 100: '#d6f1e7',
46
- 200: '#ade2d0',
47
- 300: '#7cccb3',
48
- 400: '#57b39a',
49
- 500: '#37957d',
50
- 600: '#2a7765',
51
- 700: '#256052',
52
- 800: '#224d45',
53
- 900: '#20413a',
54
- 950: '#0d2621',
55
- DEFAULT: '#57B39A',
56
- },
57
- },
58
- screens: {
59
- '3xl': '2400px',
60
- },
61
- },
62
- },
63
21
  };
package/package.json CHANGED
@@ -1,26 +1,30 @@
1
1
  {
2
2
  "name": "create-nuxt-base",
3
- "version": "0.3.0",
3
+ "version": "0.3.5",
4
4
  "description": "Starter to generate a configured environment with VueJS, Nuxt, Tailwind, Eslint, @lenne.tech/nuxt-base, Unit Tests, Cypress etc.",
5
5
  "main": "index.js",
6
+ "engines": {
7
+ "node": ">=20",
8
+ "pnpm": ">=9"
9
+ },
6
10
  "bin": {
7
11
  "create-nuxt-base": "./index.js"
8
12
  },
9
- "scripts": {
10
- "prettier": "prettier \"*.{js,json,yml,md,html,ts}\" .",
11
- "format": "npm run prettier -- --write",
12
- "release": "standard-version && git push --follow-tags origin main",
13
- "release:minor": "standard-version --release-as minor && git push --follow-tags origin main",
14
- "release:major": "standard-version --release-as major && git push --follow-tags origin main"
15
- },
16
13
  "author": "lenne.Tech GmbH",
17
14
  "license": "MIT",
18
15
  "dependencies": {
19
- "cross-spawn": "7.0.3",
20
- "fs-extra": "11.2.0"
16
+ "cross-spawn": "7.0.6",
17
+ "fs-extra": "11.3.0"
21
18
  },
22
19
  "devDependencies": {
23
- "prettier": "3.3.3",
20
+ "prettier": "3.4.2",
24
21
  "standard-version": "9.5.0"
22
+ },
23
+ "scripts": {
24
+ "prettier": "prettier \"*.{js,json,yml,md,html,ts}\" .",
25
+ "format": "pnpm prettier -- --write",
26
+ "release": "standard-version && git push --follow-tags origin main",
27
+ "release:minor": "standard-version --release-as minor && git push --follow-tags origin main",
28
+ "release:major": "standard-version --release-as major && git push --follow-tags origin main"
25
29
  }
26
- }
30
+ }