revine 0.3.2 → 0.3.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revine",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "A react framework, but better.",
5
5
  "license": "ISC",
6
6
  "author": "Rachit Bharadwaj",
@@ -1,8 +1,13 @@
1
1
  import react from "@vitejs/plugin-react";
2
+ import { revineLoggerPlugin } from "../viteLoggerPlugin";
3
+ import tailwindcss from "@tailwindcss/vite";
2
4
 
3
5
  export const defaultViteConfig = {
4
- plugins: [react()],
6
+ plugins: [react(), revineLoggerPlugin(), tailwindcss()],
7
+ logLevel: "silent",
8
+
5
9
  server: {
10
+ clearScreen: false,
6
11
  open: true,
7
12
  port: 3000,
8
13
  host: true,
@@ -0,0 +1,33 @@
1
+ import type { Plugin, ViteDevServer } from "vite";
2
+ import chalk from "chalk";
3
+
4
+ export function revineLoggerPlugin(): Plugin {
5
+ // custom chalk instance pointing to the indigo color
6
+ const indigo = chalk.hex("#6d28d9");
7
+
8
+ return {
9
+ name: "revine-logger",
10
+ configureServer(server: ViteDevServer) {
11
+ server.httpServer?.once("listening", () => {
12
+ const protocol = server.config.server.https ? "https" : "http";
13
+ const host = server.resolvedUrls?.local[0] || "localhost:3000";
14
+ const { network = [] } = server.resolvedUrls ?? {};
15
+
16
+ // Use the 'indigo' instance in place of 'chalk.cyan'
17
+ console.log(indigo("─────────────────────────────────────────────"));
18
+ console.log(indigo.bold("🚀 Revine Dev Server is now running!"));
19
+ console.log(indigo("─────────────────────────────────────────────"));
20
+ console.log(indigo(`Local: ${chalk.green(`${protocol}://${host}`)}`));
21
+
22
+ if (network.length) {
23
+ network.forEach((url: string) => {
24
+ console.log(indigo(`Network: ${chalk.green(url)}`));
25
+ });
26
+ }
27
+
28
+ console.log(indigo("─────────────────────────────────────────────"));
29
+ console.log("");
30
+ });
31
+ },
32
+ };
33
+ }
@@ -9,7 +9,8 @@
9
9
  "dependencies": {
10
10
  "react": "^18.2.0",
11
11
  "react-dom": "^18.2.0",
12
- "react-router-dom": "^6.22.3"
12
+ "react-router-dom": "^6.22.3",
13
+ "chalk": "^5.4.1"
13
14
  },
14
15
  "devDependencies": {
15
16
  "@types/react": "^18.2.45",