vite-plugin-html-elements 0.1.0 → 0.1.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.
package/dist/index.d.ts CHANGED
@@ -31,10 +31,10 @@ export interface HtmlElementsOptions {
31
31
  */
32
32
  srcDir?: string;
33
33
  /**
34
- * Apply default project structure conventions
35
- * When true: sets root to 'src', publicDir to '../public', outDir to '../dist'
34
+ * Apply opinionated project structure conventions
35
+ * When true: sets root to 'src', publicDir to '../public', outDir to '../dist' (default)
36
36
  * When false: respects user's Vite config completely
37
- * @default false
37
+ * @default true
38
38
  */
39
39
  defaults?: boolean;
40
40
  }
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { readdirSync, readFileSync, existsSync } from 'fs';
2
2
  import { resolve } from 'path';
3
3
  export function htmlElements(options = {}) {
4
- const { debug = false, basePath = '/', routes, srcDir = 'src', defaults = false, } = options;
4
+ const { debug = false, basePath = '/', routes, srcDir = 'src', defaults = true, } = options;
5
5
  return {
6
6
  name: 'vite-plugin-html-elements',
7
7
  config(userConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-html-elements",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Modular HTML without the JavaScript",
5
5
  "author": "Vincent Medina",
6
6
  "license": "MIT",
@@ -22,14 +22,6 @@
22
22
  "files": [
23
23
  "dist"
24
24
  ],
25
- "scripts": {
26
- "build": "tsc",
27
- "lint": "eslint src --ext .ts",
28
- "format": "prettier --write \"src/**/*.ts\"",
29
- "format:check": "prettier --check \"src/**/*.ts\"",
30
- "prepublishOnly": "npm run build",
31
- "prepare": "npx simple-git-hooks"
32
- },
33
25
  "peerDependencies": {
34
26
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
35
27
  },
@@ -60,5 +52,11 @@
60
52
  "*.{css,less,scss,json,graphql}": [
61
53
  "prettier --write"
62
54
  ]
55
+ },
56
+ "scripts": {
57
+ "build": "tsc",
58
+ "lint": "eslint src --ext .ts",
59
+ "format": "prettier --write \"src/**/*.ts\"",
60
+ "format:check": "prettier --check \"src/**/*.ts\""
63
61
  }
64
- }
62
+ }