revine 0.9.0 → 0.9.1

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.
Files changed (44) hide show
  1. package/dist/commands/createProject.d.ts +4 -0
  2. package/dist/commands/createProject.d.ts.map +1 -0
  3. package/dist/config/package.d.ts +6 -0
  4. package/dist/config/package.d.ts.map +1 -0
  5. package/dist/config/readme.d.ts +2 -0
  6. package/dist/config/readme.d.ts.map +1 -0
  7. package/dist/config/vite.d.ts +2 -0
  8. package/dist/config/vite.d.ts.map +1 -0
  9. package/dist/index.d.ts +3 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/prompts/git.d.ts +6 -0
  12. package/dist/prompts/git.d.ts.map +1 -0
  13. package/dist/prompts/index.d.ts +4 -0
  14. package/dist/prompts/index.d.ts.map +1 -0
  15. package/dist/prompts/project.d.ts +8 -0
  16. package/dist/prompts/project.d.ts.map +1 -0
  17. package/dist/prompts/tailwind.d.ts +2 -0
  18. package/dist/prompts/tailwind.d.ts.map +1 -0
  19. package/dist/runtime/bundler/defaults/vite.d.ts +15 -0
  20. package/dist/runtime/bundler/defaults/vite.d.ts.map +1 -0
  21. package/dist/runtime/bundler/generateConfig.d.ts +2 -0
  22. package/dist/runtime/bundler/generateConfig.d.ts.map +1 -0
  23. package/dist/runtime/bundler/revinePlugin.d.ts +9 -0
  24. package/dist/runtime/bundler/revinePlugin.d.ts.map +1 -0
  25. package/dist/runtime/bundler/utils/loadUserConfig.d.ts +2 -0
  26. package/dist/runtime/bundler/utils/loadUserConfig.d.ts.map +1 -0
  27. package/dist/runtime/bundler/vite.config.d.ts +3 -0
  28. package/dist/runtime/bundler/vite.config.d.ts.map +1 -0
  29. package/dist/runtime/bundler/viteLoggerPlugin.d.ts +3 -0
  30. package/dist/runtime/bundler/viteLoggerPlugin.d.ts.map +1 -0
  31. package/dist/runtime/routing/fileBased.d.ts +2 -0
  32. package/dist/runtime/routing/fileBased.d.ts.map +1 -0
  33. package/dist/setup/dependencies.d.ts +2 -0
  34. package/dist/setup/dependencies.d.ts.map +1 -0
  35. package/dist/setup/tailwind.d.ts +2 -0
  36. package/dist/setup/tailwind.d.ts.map +1 -0
  37. package/dist/utils/file.d.ts +2 -0
  38. package/dist/utils/file.d.ts.map +1 -0
  39. package/dist/utils/logger.d.ts +3 -0
  40. package/dist/utils/logger.d.ts.map +1 -0
  41. package/package.json +23 -4
  42. package/template/revine.config.ts +1 -1
  43. package/template/src/root.tsx +2 -2
  44. package/tsconfig.json +4 -1
@@ -0,0 +1,4 @@
1
+ export declare function createProject(projectName: string, options: {
2
+ force?: boolean;
3
+ }): Promise<void>;
4
+ //# sourceMappingURL=createProject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createProject.d.ts","sourceRoot":"","sources":["../../src/commands/createProject.ts"],"names":[],"mappings":"AAcA,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,iBAuE7B"}
@@ -0,0 +1,6 @@
1
+ interface UpdatePackageOptions {
2
+ useTailwind?: boolean;
3
+ }
4
+ export declare function updatePackageJson(filePath: string, projectName: string, options?: UpdatePackageOptions): Promise<void>;
5
+ export {};
6
+ //# sourceMappingURL=package.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/config/package.ts"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,oBAAyB,iBAkBnC"}
@@ -0,0 +1,2 @@
1
+ export declare function updateReadme(filePath: string, projectName: string): Promise<void>;
2
+ //# sourceMappingURL=readme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readme.d.ts","sourceRoot":"","sources":["../../src/config/readme.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAIvE"}
@@ -0,0 +1,2 @@
1
+ export declare function updateViteConfig(filePath: string): Promise<void>;
2
+ //# sourceMappingURL=vite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../../src/config/vite.ts"],"names":[],"mappings":"AAEA,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,iBAgBtD"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Initialize a Git repository in the project directory.
3
+ * @param projectDir - The directory where the project was set up.
4
+ */
5
+ export default function initGit(projectDir: string): Promise<void>;
6
+ //# sourceMappingURL=git.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/prompts/git.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,wBAA8B,OAAO,CAAC,UAAU,EAAE,MAAM,iBAuCvD"}
@@ -0,0 +1,4 @@
1
+ export { default as askForTailwindSetup } from "./tailwind.js";
2
+ export { default as runProject } from "./project.js";
3
+ export { default as initGit } from "./git.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Ask the user if they want to run the project after setup is complete.
3
+ * If the user confirms, it will start the dev server using the same revine
4
+ * binary that was invoked (i.e. the local build), rather than the npm package.
5
+ * @param projectDir - The directory where the project was set up.
6
+ */
7
+ export default function runProject(projectDir: string): Promise<void>;
8
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/prompts/project.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAA8B,UAAU,CAAC,UAAU,EAAE,MAAM,iBAuB1D"}
@@ -0,0 +1,2 @@
1
+ export default function askForTailwindSetup(): Promise<boolean>;
2
+ //# sourceMappingURL=tailwind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../src/prompts/tailwind.ts"],"names":[],"mappings":"AAEA,wBAA8B,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAUpE"}
@@ -0,0 +1,15 @@
1
+ export declare const defaultViteConfig: {
2
+ plugins: any[];
3
+ logLevel: string;
4
+ server: {
5
+ clearScreen: boolean;
6
+ open: boolean;
7
+ port: number;
8
+ host: boolean;
9
+ };
10
+ build: {
11
+ outDir: string;
12
+ emptyOutDir: boolean;
13
+ };
14
+ };
15
+ //# sourceMappingURL=vite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../../../../src/runtime/bundler/defaults/vite.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAa7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function generateRevineViteConfig(): Promise<any>;
2
+ //# sourceMappingURL=generateConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateConfig.d.ts","sourceRoot":"","sources":["../../../src/runtime/bundler/generateConfig.ts"],"names":[],"mappings":"AAUA,wBAAsB,wBAAwB,iBAyB7C"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The Revine Vite plugin.
3
+ *
4
+ * Provides a virtual module for `revine/routing` so that:
5
+ * - `import.meta.glob` is resolved by Vite in the *project* context (not node_modules)
6
+ * - React runtime is resolved from the project's own node_modules
7
+ */
8
+ export declare function revinePlugin(): any;
9
+ //# sourceMappingURL=revinePlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revinePlugin.d.ts","sourceRoot":"","sources":["../../../src/runtime/bundler/revinePlugin.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,wBAAgB,YAAY,IAAI,GAAG,CA4DlC"}
@@ -0,0 +1,2 @@
1
+ export declare function loadUserConfig(): Promise<any>;
2
+ //# sourceMappingURL=loadUserConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadUserConfig.d.ts","sourceRoot":"","sources":["../../../../src/runtime/bundler/utils/loadUserConfig.ts"],"names":[],"mappings":"AAGA,wBAAsB,cAAc,iBAenC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vite").UserConfigExport;
2
+ export default _default;
3
+ //# sourceMappingURL=vite.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../../../src/runtime/bundler/vite.config.ts"],"names":[],"mappings":";AAIA,wBAGG"}
@@ -0,0 +1,3 @@
1
+ import type { Plugin } from "vite";
2
+ export declare function revineLoggerPlugin(): Plugin;
3
+ //# sourceMappingURL=viteLoggerPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viteLoggerPlugin.d.ts","sourceRoot":"","sources":["../../../src/runtime/bundler/viteLoggerPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAGlD,wBAAgB,kBAAkB,IAAI,MAAM,CA6B3C"}
@@ -0,0 +1,2 @@
1
+ export declare const router: import("@remix-run/router").Router;
2
+ //# sourceMappingURL=fileBased.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileBased.d.ts","sourceRoot":"","sources":["../../../src/runtime/routing/fileBased.tsx"],"names":[],"mappings":"AA6CA,eAAO,MAAM,MAAM,oCAA8B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function installDependencies(projectDir: string): Promise<void>;
2
+ //# sourceMappingURL=dependencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../src/setup/dependencies.ts"],"names":[],"mappings":"AAGA,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB3E"}
@@ -0,0 +1,2 @@
1
+ export declare function setupTailwind(projectDir: string): Promise<void>;
2
+ //# sourceMappingURL=tailwind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../src/setup/tailwind.ts"],"names":[],"mappings":"AAKA,wBAAsB,aAAa,CAAC,UAAU,EAAE,MAAM,iBAiJrD"}
@@ -0,0 +1,2 @@
1
+ export declare function copyTemplate(templateDir: string, destinationDir: string, force?: boolean): Promise<void>;
2
+ //# sourceMappingURL=file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,KAAK,CAAC,EAAE,OAAO,GACd,OAAO,CAAC,IAAI,CAAC,CAEf"}
@@ -0,0 +1,3 @@
1
+ export declare function logInfo(message: string): void;
2
+ export declare function logError(message: string, error?: any): void;
3
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,QAEtC;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,QAEpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revine",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "A react framework, but better.",
5
5
  "license": "ISC",
6
6
  "author": "Rachit Bharadwaj",
@@ -10,9 +10,28 @@
10
10
  "revine": "dist/index.js"
11
11
  },
12
12
  "exports": {
13
- ".": "./dist/index.js",
14
- "./routing": "./dist/runtime/routing/fileBased.js",
15
- "./bundler/*": "./dist/runtime/bundler/*.js"
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "types": "./dist/index.d.ts"
16
+ },
17
+ "./routing": {
18
+ "import": "./dist/runtime/routing/fileBased.js",
19
+ "types": "./dist/runtime/routing/fileBased.d.ts"
20
+ },
21
+ "./bundler/*": {
22
+ "import": "./dist/runtime/bundler/*.js",
23
+ "types": "./dist/runtime/bundler/*.d.ts"
24
+ }
25
+ },
26
+ "typesVersions": {
27
+ "*": {
28
+ "routing": [
29
+ "./dist/runtime/routing/fileBased.d.ts"
30
+ ],
31
+ "bundler/*": [
32
+ "./dist/runtime/bundler/*.d.ts"
33
+ ]
34
+ }
16
35
  },
17
36
  "scripts": {
18
37
  "build": "tsc",
@@ -1,7 +1,7 @@
1
1
  export default {
2
2
  vite: {
3
3
  server: {
4
- open: true,
4
+ open: false,
5
5
  port: 3000,
6
6
  host: true,
7
7
  },
@@ -9,6 +9,6 @@ const root = createRoot(container);
9
9
 
10
10
  root.render(
11
11
  <React.StrictMode>
12
- <RouterProvider router={router} />;
13
- </React.StrictMode>
12
+ <RouterProvider router={router} />
13
+ </React.StrictMode>,
14
14
  );
package/tsconfig.json CHANGED
@@ -8,7 +8,10 @@
8
8
  "esModuleInterop": true,
9
9
  "skipLibCheck": true,
10
10
  "forceConsistentCasingInFileNames": true,
11
- "jsx": "react-jsx"
11
+ "jsx": "react-jsx",
12
+ "declaration": true,
13
+ "declarationMap": true,
14
+ "emitDeclarationOnly": false
12
15
  },
13
16
  "include": ["src/**/*"],
14
17
  "exclude": ["src/template/**/*"]