@remyyy/vite-plugin-velox 0.0.1 → 0.0.3

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/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # @remyyy/vite-plugin-velox
2
+
3
+ **Vite integration for the Velox Framework**
4
+
5
+ Enables JSX compilation and HMR for Velox applications.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install -D @remyyy/vite-plugin-velox
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Add it to your `vite.config.ts`:
16
+
17
+ ```ts
18
+ import { defineConfig } from 'vite';
19
+ import velox from '@remyyy/vite-plugin-velox';
20
+
21
+ export default defineConfig({
22
+ plugins: [velox()]
23
+ });
24
+ ```
25
+
26
+ ## Documentation
27
+
28
+ For full documentation, visit the [main repository](https://github.com/TheRemyyy/velox-framework).
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'vite';
2
+
3
+ declare function velox(): Plugin;
4
+
5
+ export { velox as default };
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'vite';
2
+
3
+ declare function velox(): Plugin;
4
+
5
+ export { velox as default };
package/dist/index.js ADDED
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ default: () => velox
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+ function velox() {
27
+ return {
28
+ name: "vite-plugin-velox",
29
+ config() {
30
+ return {
31
+ esbuild: {
32
+ jsxFactory: "h",
33
+ jsxFragment: "Fragment",
34
+ jsxInject: `import { h, Fragment } from 'velox'`
35
+ }
36
+ };
37
+ }
38
+ };
39
+ }
package/dist/index.mjs ADDED
@@ -0,0 +1,18 @@
1
+ // src/index.ts
2
+ function velox() {
3
+ return {
4
+ name: "vite-plugin-velox",
5
+ config() {
6
+ return {
7
+ esbuild: {
8
+ jsxFactory: "h",
9
+ jsxFragment: "Fragment",
10
+ jsxInject: `import { h, Fragment } from 'velox'`
11
+ }
12
+ };
13
+ }
14
+ };
15
+ }
16
+ export {
17
+ velox as default
18
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remyyy/vite-plugin-velox",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -10,9 +10,14 @@
10
10
  "exports": {
11
11
  ".": {
12
12
  "import": "./dist/index.mjs",
13
- "require": "./dist/index.js"
13
+ "require": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
14
15
  }
15
16
  },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
16
21
  "scripts": {
17
22
  "build": "tsup src/index.ts --format cjs,esm --dts",
18
23
  "dev": "tsup src/index.ts --format cjs,esm --dts --watch"
package/src/index.ts DELETED
@@ -1,16 +0,0 @@
1
- import type { Plugin } from 'vite';
2
-
3
- export default function velox(): Plugin {
4
- return {
5
- name: 'vite-plugin-velox',
6
- config() {
7
- return {
8
- esbuild: {
9
- jsxFactory: 'h',
10
- jsxFragment: 'Fragment',
11
- jsxInject: `import { h, Fragment } from 'velox'`
12
- }
13
- };
14
- }
15
- };
16
- }
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "declaration": true,
6
- "target": "es2020",
7
- "module": "commonjs",
8
- "moduleResolution": "node"
9
- },
10
- "include": [
11
- "src"
12
- ]
13
- }