@vef-framework/dev 2.0.4 → 2.0.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.
Files changed (57) hide show
  1. package/bin/vef.js +1 -1
  2. package/dist/cjs/index.cjs +1 -23
  3. package/dist/cjs/lint/commitlint.cjs +1 -14
  4. package/dist/cjs/lint/eslint.cjs +1 -981
  5. package/dist/cjs/lint/index.cjs +1 -14
  6. package/dist/cjs/lint/stylelint.cjs +1 -93
  7. package/dist/cjs/vite/chunks.cjs +1 -30
  8. package/dist/cjs/vite/config.cjs +1 -83
  9. package/dist/cjs/vite/constants.cjs +1 -30
  10. package/dist/cjs/vite/define.cjs +3 -18
  11. package/dist/cjs/vite/index.cjs +1 -11
  12. package/dist/cjs/vite/plugin-app-config.cjs +1 -38
  13. package/dist/cjs/vite/plugin-auto-enhance/core.cjs +1 -147
  14. package/dist/cjs/vite/plugin-auto-enhance/index.cjs +1 -40
  15. package/dist/cjs/vite/plugin-auto-enhance/plugins/index.cjs +1 -10
  16. package/dist/cjs/vite/plugin-auto-enhance/plugins/operation-column-width.cjs +1 -229
  17. package/dist/cjs/vite/plugin-conventional-config.cjs +1 -91
  18. package/dist/cjs/vite/plugin-eslint.cjs +1 -24
  19. package/dist/cjs/vite/plugin-html.cjs +2 -74
  20. package/dist/cjs/vite/plugin-icons.cjs +1 -22
  21. package/dist/cjs/vite/plugin-injection.cjs +1 -20
  22. package/dist/cjs/vite/plugin-inspect.cjs +1 -15
  23. package/dist/cjs/vite/plugin-react.cjs +1 -80
  24. package/dist/cjs/vite/plugin-router.cjs +4 -42
  25. package/dist/cjs/vite/plugin-stylelint.cjs +1 -24
  26. package/dist/cjs/vite/plugin-svgr.cjs +1 -59
  27. package/dist/cjs/vite/plugin-tsconfig-paths.cjs +1 -14
  28. package/dist/cjs/vite/postcss.cjs +1 -13
  29. package/dist/cli/index.js +5 -0
  30. package/dist/es/index.js +14 -8
  31. package/dist/es/lint/commitlint.js +5 -6
  32. package/dist/es/lint/eslint.js +135 -137
  33. package/dist/es/lint/index.js +8 -4
  34. package/dist/es/lint/stylelint.js +16 -19
  35. package/dist/es/vite/chunks.js +12 -18
  36. package/dist/es/vite/config.js +63 -68
  37. package/dist/es/vite/constants.js +15 -15
  38. package/dist/es/vite/define.js +10 -11
  39. package/dist/es/vite/index.js +5 -3
  40. package/dist/es/vite/plugin-app-config.js +19 -20
  41. package/dist/es/vite/plugin-auto-enhance/core.js +51 -90
  42. package/dist/es/vite/plugin-auto-enhance/index.js +19 -23
  43. package/dist/es/vite/plugin-auto-enhance/plugins/index.js +4 -2
  44. package/dist/es/vite/plugin-auto-enhance/plugins/operation-column-width.js +117 -181
  45. package/dist/es/vite/plugin-conventional-config.js +42 -44
  46. package/dist/es/vite/plugin-eslint.js +14 -15
  47. package/dist/es/vite/plugin-html.js +42 -53
  48. package/dist/es/vite/plugin-icons.js +10 -11
  49. package/dist/es/vite/plugin-injection.js +4 -4
  50. package/dist/es/vite/plugin-inspect.js +8 -9
  51. package/dist/es/vite/plugin-react.js +25 -35
  52. package/dist/es/vite/plugin-router.js +20 -21
  53. package/dist/es/vite/plugin-stylelint.js +14 -15
  54. package/dist/es/vite/plugin-svgr.js +19 -20
  55. package/dist/es/vite/plugin-tsconfig-paths.js +7 -8
  56. package/dist/es/vite/postcss.js +5 -5
  57. package/package.json +9 -8
@@ -1,24 +1 @@
1
- /*! @vef-framework/dev v2.0.3 made with ❤️ by Venus | 2025-11-26T02:32:33.686Z */
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const stylelint = require('vite-plugin-stylelint');
7
-
8
- function createStylelintPlugin() {
9
- return stylelint({
10
- fix: false,
11
- test: false,
12
- dev: true,
13
- build: false,
14
- cache: true,
15
- cacheLocation: "node_modules/.cache/.stylelintcache",
16
- include: ["src/**/*.{css,scss}"],
17
- exclude: ["node_modules", "virtual:", "vef:"],
18
- emitError: true,
19
- emitWarning: true,
20
- emitWarningAsError: true
21
- });
22
- }
23
-
24
- exports.createStylelintPlugin = createStylelintPlugin;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vite-plugin-stylelint");function t(){return e({fix:!1,test:!1,dev:!0,build:!1,cache:!0,cacheLocation:"node_modules/.cache/.stylelintcache",include:["src/**/*.{css,scss}"],exclude:["node_modules","virtual:","vef:"],emitError:!0,emitWarning:!0,emitWarningAsError:!0})}exports.createStylelintPlugin=t;
@@ -1,59 +1 @@
1
- /*! @vef-framework/dev v2.0.3 made with ❤️ by Venus | 2025-11-26T02:32:33.686Z */
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const svgr = require('vite-plugin-svgr');
7
-
8
- function createSvgrPlugin() {
9
- return svgr({
10
- include: "**/*.svg?react",
11
- esbuildOptions: {
12
- platform: "browser",
13
- minify: true,
14
- jsx: "automatic"
15
- },
16
- svgrOptions: {
17
- plugins: [
18
- "@svgr/plugin-svgo",
19
- "@svgr/plugin-jsx"
20
- ],
21
- icon: false,
22
- dimensions: false,
23
- prettier: true,
24
- memo: true,
25
- svgo: true,
26
- ref: false,
27
- typescript: true,
28
- jsxRuntime: "automatic",
29
- svgoConfig: {
30
- multipass: true,
31
- datauri: "base64",
32
- js2svg: {
33
- indent: 2,
34
- pretty: true
35
- },
36
- plugins: [
37
- "preset-default",
38
- {
39
- name: "prefixIds",
40
- params: {
41
- prefix: "vef"
42
- }
43
- },
44
- {
45
- name: "cleanupIds",
46
- params: {
47
- force: true,
48
- remove: true,
49
- minify: true
50
- }
51
- }
52
- ]
53
- },
54
- svgProps: {}
55
- }
56
- });
57
- }
58
-
59
- exports.createSvgrPlugin = createSvgrPlugin;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vite-plugin-svgr");function r(){return e({include:"**/*.svg?react",esbuildOptions:{platform:"browser",minify:!0,jsx:"automatic"},svgrOptions:{plugins:["@svgr/plugin-svgo","@svgr/plugin-jsx"],icon:!1,dimensions:!1,prettier:!0,memo:!0,svgo:!0,ref:!1,typescript:!0,jsxRuntime:"automatic",svgoConfig:{multipass:!0,datauri:"base64",js2svg:{indent:2,pretty:!0},plugins:["preset-default",{name:"prefixIds",params:{prefix:"vef"}},{name:"cleanupIds",params:{force:!0,remove:!0,minify:!0}}]},svgProps:{}}})}exports.createSvgrPlugin=r;
@@ -1,14 +1 @@
1
- /*! @vef-framework/dev v2.0.3 made with ❤️ by Venus | 2025-11-26T02:32:33.686Z */
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const tsconfigPaths = require('vite-tsconfig-paths');
7
-
8
- function createTsconfigPathsPlugin(projectDir) {
9
- return tsconfigPaths({
10
- root: projectDir
11
- });
12
- }
13
-
14
- exports.createTsconfigPathsPlugin = createTsconfigPathsPlugin;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vite-tsconfig-paths");function n(t){return e({root:t})}exports.createTsconfigPathsPlugin=n;
@@ -1,13 +1 @@
1
- /*! @vef-framework/dev v2.0.3 made with ❤️ by Venus | 2025-11-26T02:32:33.686Z */
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- function createPostcssConfig() {
7
- return {
8
- map: false,
9
- plugins: []
10
- };
11
- }
12
-
13
- exports.createPostcssConfig = createPostcssConfig;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(){return{map:!1,plugins:[]}}exports.createPostcssConfig=e;
@@ -0,0 +1,5 @@
1
+ /*! @vef-framework/dev v2.0.5 made by Venus | 2025-11-26T04:10:49.173Z */
2
+ import{resolve as t}from"node:path";import g from"node:process";import o from"chalk";import{program as p}from"commander";import n from"consola";import{execa as m}from"execa";import j from"fs-extra";import x from"ora";import E from"prompts";const{exists:d,readJsonSync:S,writeFile:u,readJson:y,writeJson:w,copy:F,readFile:P,move:f}=j,s=g.cwd();function V(){const a=t(import.meta.dirname,"../package.json");return S(a,{encoding:"utf-8"}).version}const k=V();function h(a,e){n.error(`Error during ${a}:`,e),g.exit(1)}p.name("vef").description(o.magenta("VEF Framework CLI")).addHelpText("before",o.blue("VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus.")).addHelpText("before",o.bgGreenBright(`Version: ${k}`)).version(k).option("--mode <mode>","Specify running mode (will override default NODE_ENV)"),p.command("prepare").description("Sets up the project for development mode").action(async()=>{if(!await d(t(s,".husky"))){const{default:l}=await import("husky");l(),n.success("Successfully set up husky")}await d(t(s,".husky/pre-commit"))||(await u(t(s,".husky/pre-commit"),"pnpm dlx lint-staged"),n.success("Successfully set up pre-commit hook")),await d(t(s,".husky/commit-msg"))||(await u(t(s,".husky/commit-msg"),"pnpm dlx commitlint --edit $1"),n.success("Successfully set up commit-msg hook"));const a=await y(t(s,"package.json"),{encoding:"utf-8"}),{scripts:e}=a;let r=!1;e.prepare||(e.prepare="vef prepare",r=!0),a["lint-staged"]||(a["lint-staged"]={"*.{js,ts,tsx,json,jsonc,md,mdx,html}":"eslint --fix","*.{css,scss}":"stylelint --fix"},r=!0),r&&(await w(t(s,"package.json"),a,{encoding:"utf-8",spaces:2}),n.success("Successfully set up prepare script and lint-staged"))}),p.command("update").description("Update the dependencies of the vef framework to latest version").action(async()=>{await m({cwd:s,stdio:"inherit"})("pnpm",["update","@vef-framework/*"])}),p.command("init").description("Initialize an empty VEF project").action(async()=>{console.log(o.blue(`Welcome to use the cli tool of VEF Framework
3
+ `));const a=await E([{type:"text",name:"appName",message:"What is the name of your app?",validate:i=>typeof i=="string"&&i.trim().length>0?!0:"App name is required"},{type:"text",name:"appTitle",message:"What is the title of your app?",validate:i=>typeof i=="string"&&i.trim().length>0?!0:"App title is required"}]),{appName:e,appTitle:r}=a;await F(t(import.meta.dirname,"../template"),t(s,e)),n.success("Successfully copied template files"),await f(t(s,e,"_gitignore"),t(s,e,".gitignore")),await f(t(s,e,"_tsconfig.json"),t(s,e,"tsconfig.json")),await f(t(s,e,"_package.json"),t(s,e,"package.json"));const l=await y(t(s,e,"package.json"),{encoding:"utf-8"});l.name=e,await w(t(s,e,"package.json"),l,{encoding:"utf-8",spaces:2}),n.success("Successfully replaced name and title in package.json");const v=(await P(t(s,e,"env/.env"),{encoding:"utf-8"})).replace(/APP_NAME=.*$/m,`APP_NAME=${e}`).replace(/APP_TITLE=.*$/m,`APP_TITLE=${r}`);await u(t(s,e,"env/.env"),v),n.success("Successfully replaced name and title in .env file");const c=x("Initializing git repository...").start();try{await m`git --version`,await m({cwd:t(s,e)})`git init`,c.succeed("Successfully initialized git repository")}catch(i){c.fail("Failed to initialize git repository"),h("init",i)}c.start("Installing dependencies...");try{await m({cwd:t(s,e)})("pnpm",["install"]),c.succeed("Successfully installed dependencies")}catch(i){c.fail("Failed to install dependencies"),h("init",i)}n.success(o.green(`
4
+ \u{1F389}\u{1F389}\u{1F389} VEF project created successfully !`)),console.log(o.blue(`
5
+ \u2728 Next steps:`)),console.log(o.cyan(` cd ${e}`)),console.log(o.cyan(" pnpm dev"))}),p.parse();
package/dist/es/index.js CHANGED
@@ -1,8 +1,14 @@
1
- /*! @vef-framework/dev v2.0.3 made with ❤️ by Venus | 2025-11-26T02:32:33.686Z */
2
- import './lint/index.js';
3
- import './vite/index.js';
4
- export { defineCommitlintConfig } from './lint/commitlint.js';
5
- export { defineEslintConfig } from './lint/eslint.js';
6
- export { defineStylelintConfig } from './lint/stylelint.js';
7
- export { defineViteConfig } from './vite/config.js';
8
- export { types } from 'recast';
1
+ import "./lint/index.js";
2
+ import "./vite/index.js";
3
+ import { defineCommitlintConfig as f } from "./lint/commitlint.js";
4
+ import { defineEslintConfig as n } from "./lint/eslint.js";
5
+ import { defineStylelintConfig as p } from "./lint/stylelint.js";
6
+ import { defineViteConfig as C } from "./vite/config.js";
7
+ import { types as g } from "recast";
8
+ export {
9
+ f as defineCommitlintConfig,
10
+ n as defineEslintConfig,
11
+ p as defineStylelintConfig,
12
+ C as defineViteConfig,
13
+ g as types
14
+ };
@@ -1,10 +1,9 @@
1
- /*! @vef-framework/dev v2.0.3 made with ❤️ by Venus | 2025-11-26T02:32:33.686Z */
2
- function defineCommitlintConfig() {
3
- const config = {
1
+ function t() {
2
+ return {
4
3
  extends: ["@commitlint/config-conventional"],
5
4
  formatter: "@commitlint/format"
6
5
  };
7
- return config;
8
6
  }
9
-
10
- export { defineCommitlintConfig };
7
+ export {
8
+ t as defineCommitlintConfig
9
+ };