vite-plugin-glob-input 0.0.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/LICENSE +21 -0
- package/README.md +197 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +109 -0
- package/dist/index.js.map +1 -0
- package/package.json +58 -0
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 ozekimasaki
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1,197 @@
|
|
1
|
+
# vite-plugin-glob-input
|
2
|
+
|
3
|
+
[](https://www.npmjs.com/package/vite-plugin-glob-input)
|
4
|
+
[](https://github.com/ozekimasaki/vite-plugin-glob-input/blob/main/LICENSE)
|
5
|
+
|
6
|
+
Vite plugin to add files to `build.rollupOptions.input` using fast-glob patterns.
|
7
|
+
|
8
|
+
## Features
|
9
|
+
|
10
|
+
- 📦 **Vite 7+ Compatible**: Fully supports Vite 7 beta and later versions
|
11
|
+
- 🔍 **Fast Glob Integration**: Uses fast-glob for efficient file pattern matching
|
12
|
+
- 🏷️ **Smart Aliasing**: Automatically generates meaningful entry names
|
13
|
+
- 📁 **Flexible Configuration**: Support for complex directory structures
|
14
|
+
- 🎯 **TypeScript First**: Built with TypeScript for better development experience
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
```bash
|
19
|
+
npm install -D vite-plugin-glob-input
|
20
|
+
```
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
### Basic Usage
|
25
|
+
|
26
|
+
```typescript
|
27
|
+
// vite.config.ts
|
28
|
+
import { defineConfig } from 'vite'
|
29
|
+
import globInput from 'vite-plugin-glob-input'
|
30
|
+
|
31
|
+
export default defineConfig({
|
32
|
+
plugins: [
|
33
|
+
globInput({
|
34
|
+
patterns: 'src/pages/**/*.html'
|
35
|
+
})
|
36
|
+
]
|
37
|
+
})
|
38
|
+
```
|
39
|
+
|
40
|
+
### Advanced Configuration
|
41
|
+
|
42
|
+
```typescript
|
43
|
+
// vite.config.ts
|
44
|
+
import { defineConfig } from 'vite'
|
45
|
+
import globInput from 'vite-plugin-glob-input'
|
46
|
+
|
47
|
+
export default defineConfig({
|
48
|
+
plugins: [
|
49
|
+
globInput({
|
50
|
+
patterns: ['src/pages/**/*.html', 'src/components/**/*.html'],
|
51
|
+
options: {
|
52
|
+
ignore: ['**/private/**', '**/_*'],
|
53
|
+
absolute: false
|
54
|
+
},
|
55
|
+
disableAlias: false,
|
56
|
+
homeAlias: 'main',
|
57
|
+
rootPrefix: 'page',
|
58
|
+
dirDelimiter: '-',
|
59
|
+
filePrefix: '_'
|
60
|
+
})
|
61
|
+
]
|
62
|
+
})
|
63
|
+
```
|
64
|
+
|
65
|
+
## Configuration Options
|
66
|
+
|
67
|
+
### `VitePluginGlobInputOptions`
|
68
|
+
|
69
|
+
| Option | Type | Default | Description |
|
70
|
+
|--------|------|---------|-------------|
|
71
|
+
| `patterns` | `string \| string[]` | - | **Required**. Glob patterns to match files |
|
72
|
+
| `options` | `FastGlob.Options` | `{}` | Options passed to fast-glob |
|
73
|
+
| `disableAlias` | `boolean` | `false` | Disable automatic alias generation |
|
74
|
+
| `homeAlias` | `string` | `'home'` | Alias name for index files in root |
|
75
|
+
| `rootPrefix` | `string` | `'root'` | Prefix for non-index files in root |
|
76
|
+
| `dirDelimiter` | `string` | `'-'` | Character to replace path separators |
|
77
|
+
| `filePrefix` | `string` | `'_'` | Prefix for non-index files |
|
78
|
+
|
79
|
+
### Fast-Glob Options
|
80
|
+
|
81
|
+
The `options` field accepts any [fast-glob options](https://github.com/mrmlnc/fast-glob#options-3). Common options include:
|
82
|
+
|
83
|
+
- `ignore`: Array of patterns to ignore
|
84
|
+
- `deep`: Maximum depth of directory traversal
|
85
|
+
- `onlyFiles`: Return only files (default: true)
|
86
|
+
- `case`: Case sensitive matching
|
87
|
+
|
88
|
+
## File Naming Convention
|
89
|
+
|
90
|
+
The plugin automatically generates entry aliases based on file paths:
|
91
|
+
|
92
|
+
| File Path | Generated Alias | Description |
|
93
|
+
|-----------|----------------|-------------|
|
94
|
+
| `src/index.html` | `home` | Root index file |
|
95
|
+
| `src/about.html` | `root_about` | Root non-index file |
|
96
|
+
| `src/blog/index.html` | `blog` | Directory index file |
|
97
|
+
| `src/blog/post.html` | `blog_post` | Directory non-index file |
|
98
|
+
|
99
|
+
### Custom Naming
|
100
|
+
|
101
|
+
```typescript
|
102
|
+
globInput({
|
103
|
+
patterns: 'src/**/*.html',
|
104
|
+
homeAlias: 'main', // index.html → 'main'
|
105
|
+
rootPrefix: 'page', // about.html → 'page_about'
|
106
|
+
dirDelimiter: '__', // blog/post.html → 'blog__post'
|
107
|
+
filePrefix: '--' // blog/post.html → 'blog--post'
|
108
|
+
})
|
109
|
+
```
|
110
|
+
|
111
|
+
## Examples
|
112
|
+
|
113
|
+
### Static Site Generation
|
114
|
+
|
115
|
+
```typescript
|
116
|
+
// Generate entries for all pages
|
117
|
+
globInput({
|
118
|
+
patterns: 'src/pages/**/*.html',
|
119
|
+
options: {
|
120
|
+
ignore: ['**/templates/**', '**/_*']
|
121
|
+
}
|
122
|
+
})
|
123
|
+
```
|
124
|
+
|
125
|
+
### Multi-Entry Application
|
126
|
+
|
127
|
+
```typescript
|
128
|
+
// Multiple entry points for different sections
|
129
|
+
globInput({
|
130
|
+
patterns: [
|
131
|
+
'src/admin/**/*.html',
|
132
|
+
'src/public/**/*.html'
|
133
|
+
]
|
134
|
+
})
|
135
|
+
```
|
136
|
+
|
137
|
+
### Disable Aliasing
|
138
|
+
|
139
|
+
```typescript
|
140
|
+
// Use file paths as-is
|
141
|
+
globInput({
|
142
|
+
patterns: 'src/**/*.html',
|
143
|
+
disableAlias: true
|
144
|
+
})
|
145
|
+
```
|
146
|
+
|
147
|
+
## Compatibility
|
148
|
+
|
149
|
+
- **Vite**: 2.x, 3.x, 4.x, 5.x, 6.x, 7.x
|
150
|
+
- **Node.js**: 18.x, 20.x, 22.x
|
151
|
+
- **TypeScript**: 5.x
|
152
|
+
|
153
|
+
## Development
|
154
|
+
|
155
|
+
### Testing
|
156
|
+
|
157
|
+
This project uses Vitest 3.2 for testing:
|
158
|
+
|
159
|
+
```bash
|
160
|
+
# Run tests
|
161
|
+
npm test
|
162
|
+
|
163
|
+
# Run tests with coverage
|
164
|
+
npm run coverage
|
165
|
+
|
166
|
+
# Run tests in watch mode
|
167
|
+
npm run test:watch
|
168
|
+
```
|
169
|
+
|
170
|
+
### Building
|
171
|
+
|
172
|
+
```bash
|
173
|
+
# Build the package
|
174
|
+
npm run build
|
175
|
+
|
176
|
+
# Type check
|
177
|
+
npm run type-check
|
178
|
+
```
|
179
|
+
|
180
|
+
## Contributing
|
181
|
+
|
182
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
183
|
+
|
184
|
+
## License
|
185
|
+
|
186
|
+
MIT License - see the [LICENSE](LICENSE) file for details.
|
187
|
+
|
188
|
+
## Changelog
|
189
|
+
|
190
|
+
### v0.0.1
|
191
|
+
|
192
|
+
- ✨ Initial release
|
193
|
+
- ✨ Vite 7 beta support
|
194
|
+
- ✨ Vitest 3.2 integration
|
195
|
+
- 🔧 TypeScript configuration
|
196
|
+
- 🐛 Robust error handling
|
197
|
+
- 📝 Comprehensive documentation
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
import type { Plugin } from 'vite';
|
2
|
+
import type FastGlob from 'fast-glob';
|
3
|
+
/**
|
4
|
+
* プラグインの設定オプション
|
5
|
+
*/
|
6
|
+
export interface VitePluginGlobInputOptions {
|
7
|
+
/** ファイルを検索するためのglobパターン */
|
8
|
+
patterns: FastGlob.Pattern | FastGlob.Pattern[];
|
9
|
+
/** fast-globのオプション */
|
10
|
+
options?: FastGlob.Options;
|
11
|
+
/** エイリアス機能を無効にするかどうか */
|
12
|
+
disableAlias?: boolean;
|
13
|
+
/** ホームページのエイリアス名 */
|
14
|
+
homeAlias?: string;
|
15
|
+
/** ルートファイルの接頭辞 */
|
16
|
+
rootPrefix?: string;
|
17
|
+
/** ディレクトリ区切り文字 */
|
18
|
+
dirDelimiter?: string;
|
19
|
+
/** ファイル接頭辞 */
|
20
|
+
filePrefix?: string;
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* Vite plugin for glob-based input configuration
|
24
|
+
*
|
25
|
+
* @param userOptions - ユーザー指定のオプション
|
26
|
+
* @returns Vite plugin
|
27
|
+
*/
|
28
|
+
export default function vitePluginGlobInput(userOptions: VitePluginGlobInputOptions): Plugin;
|
29
|
+
/** @deprecated Use VitePluginGlobInputOptions instead */
|
30
|
+
export type UserSettings = VitePluginGlobInputOptions;
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,MAAM,CAAA;AAClD,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAA;AAGrC;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,2BAA2B;IAC3B,QAAQ,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAA;IAC/C,sBAAsB;IACtB,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAA;IAC1B,wBAAwB;IACxB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,oBAAoB;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kBAAkB;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AA2DD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,WAAW,EAAE,0BAA0B,GACtC,MAAM,CAiER;AAGD,yDAAyD;AACzD,MAAM,MAAM,YAAY,GAAG,0BAA0B,CAAA"}
|
package/dist/index.js
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
import { resolve } from 'node:path';
|
2
|
+
import fg from 'fast-glob';
|
3
|
+
/**
|
4
|
+
* デフォルト設定
|
5
|
+
*/
|
6
|
+
const DEFAULT_OPTIONS = {
|
7
|
+
patterns: '**/*.html',
|
8
|
+
options: {},
|
9
|
+
disableAlias: false,
|
10
|
+
homeAlias: 'home',
|
11
|
+
rootPrefix: 'root',
|
12
|
+
dirDelimiter: '-',
|
13
|
+
filePrefix: '_',
|
14
|
+
};
|
15
|
+
/**
|
16
|
+
* ファイルパスをrollupの入力形式に変換する関数
|
17
|
+
*/
|
18
|
+
function convertFilesToInput(options, config, input, targetFiles) {
|
19
|
+
const updatedInput = { ...input };
|
20
|
+
for (const targetFile of targetFiles) {
|
21
|
+
const relativePath = resolve(config.root, targetFile);
|
22
|
+
const parsedPath = resolve(relativePath);
|
23
|
+
const relativeToRoot = resolve(config.root);
|
24
|
+
// ファイルパスの正規化
|
25
|
+
const normalizedPath = resolve(parsedPath).replace(resolve(relativeToRoot), '');
|
26
|
+
const pathParts = normalizedPath.split('/').filter(Boolean);
|
27
|
+
if (pathParts.length === 1) {
|
28
|
+
// ルートディレクトリのファイル
|
29
|
+
const fileName = pathParts[0].replace(/\.[^/.]+$/, ''); // 拡張子を除去
|
30
|
+
if (fileName === 'index') {
|
31
|
+
updatedInput[options.homeAlias] = targetFile;
|
32
|
+
}
|
33
|
+
else {
|
34
|
+
updatedInput[`${options.rootPrefix}${options.filePrefix}${fileName}`] = targetFile;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
else {
|
38
|
+
// サブディレクトリのファイル
|
39
|
+
const dirPath = pathParts.slice(0, -1).join(options.dirDelimiter);
|
40
|
+
const fileName = pathParts[pathParts.length - 1].replace(/\.[^/.]+$/, '');
|
41
|
+
if (fileName === 'index') {
|
42
|
+
updatedInput[dirPath] = targetFile;
|
43
|
+
}
|
44
|
+
else {
|
45
|
+
updatedInput[`${dirPath}${options.filePrefix}${fileName}`] = targetFile;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
return updatedInput;
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Vite plugin for glob-based input configuration
|
53
|
+
*
|
54
|
+
* @param userOptions - ユーザー指定のオプション
|
55
|
+
* @returns Vite plugin
|
56
|
+
*/
|
57
|
+
export default function vitePluginGlobInput(userOptions) {
|
58
|
+
const options = {
|
59
|
+
...DEFAULT_OPTIONS,
|
60
|
+
...userOptions,
|
61
|
+
options: {
|
62
|
+
...DEFAULT_OPTIONS.options,
|
63
|
+
...userOptions.options,
|
64
|
+
},
|
65
|
+
};
|
66
|
+
let resolvedConfig;
|
67
|
+
return {
|
68
|
+
name: 'vite-plugin-glob-input',
|
69
|
+
enforce: 'pre',
|
70
|
+
apply: 'build',
|
71
|
+
configResolved(config) {
|
72
|
+
resolvedConfig = config;
|
73
|
+
},
|
74
|
+
options(rollupOptions) {
|
75
|
+
// fast-globに必要なオプションを設定
|
76
|
+
const globOptions = {
|
77
|
+
...options.options,
|
78
|
+
absolute: true,
|
79
|
+
};
|
80
|
+
try {
|
81
|
+
// パターンにマッチするファイルを取得
|
82
|
+
const targetFiles = fg.sync(options.patterns, globOptions);
|
83
|
+
if (targetFiles.length === 0) {
|
84
|
+
console.warn(`[vite-plugin-glob-input] No files found matching pattern: ${options.patterns}`);
|
85
|
+
return rollupOptions;
|
86
|
+
}
|
87
|
+
// 入力設定を処理
|
88
|
+
let { input } = rollupOptions;
|
89
|
+
if (!input || typeof input === 'string') {
|
90
|
+
input = options.disableAlias ? [] : {};
|
91
|
+
}
|
92
|
+
if (Array.isArray(input)) {
|
93
|
+
// 配列形式の場合はファイルを追加
|
94
|
+
rollupOptions.input = [...input, ...targetFiles];
|
95
|
+
}
|
96
|
+
else {
|
97
|
+
// オブジェクト形式の場合はエイリアスを生成
|
98
|
+
rollupOptions.input = convertFilesToInput(options, resolvedConfig, input, targetFiles);
|
99
|
+
}
|
100
|
+
}
|
101
|
+
catch (error) {
|
102
|
+
console.error('[vite-plugin-glob-input] Error processing glob patterns:', error);
|
103
|
+
throw error;
|
104
|
+
}
|
105
|
+
return rollupOptions;
|
106
|
+
},
|
107
|
+
};
|
108
|
+
}
|
109
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,OAAO,EAAE,MAAM,WAAW,CAAA;AAsB1B;;GAEG;AACH,MAAM,eAAe,GAAyC;IAC5D,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,EAAE;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,OAAO,CAAC,IAAI,CAAC,6DAA6D,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;oBAC7F,OAAO,aAAa,CAAA;gBACtB,CAAC;gBAED,UAAU;gBACV,IAAI,EAAE,KAAK,EAAE,GAAG,aAAa,CAAA;gBAE7B,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;oBACxC,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;gBACxC,CAAC;gBAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;oBACzB,kBAAkB;oBAClB,aAAa,CAAC,KAAK,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,WAAW,CAAC,CAAA;gBAClD,CAAC;qBAAM,CAAC;oBACN,uBAAuB;oBACvB,aAAa,CAAC,KAAK,GAAG,mBAAmB,CACvC,OAAO,EACP,cAAc,EACd,KAAK,EACL,WAAW,CACZ,CAAA;gBACH,CAAC;YAEH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,0DAA0D,EAAE,KAAK,CAAC,CAAA;gBAChF,MAAM,KAAK,CAAA;YACb,CAAC;YAED,OAAO,aAAa,CAAA;QACtB,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/package.json
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
{
|
2
|
+
"name": "vite-plugin-glob-input",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"description": "Vite plugin to add files to build.rollupOptions.input using fast-glob",
|
5
|
+
"author": "ozekimasaki",
|
6
|
+
"license": "MIT",
|
7
|
+
"homepage": "https://github.com/ozekimasaki/vite-plugin-glob-input#readme",
|
8
|
+
"repository": {
|
9
|
+
"type": "git",
|
10
|
+
"url": "https://github.com/ozekimasaki/vite-plugin-glob-input.git"
|
11
|
+
},
|
12
|
+
"bugs": {
|
13
|
+
"url": "https://github.com/ozekimasaki/vite-plugin-glob-input/issues"
|
14
|
+
},
|
15
|
+
"keywords": [
|
16
|
+
"vite",
|
17
|
+
"vite-plugin",
|
18
|
+
"static",
|
19
|
+
"glob"
|
20
|
+
],
|
21
|
+
"files": [
|
22
|
+
"dist"
|
23
|
+
],
|
24
|
+
"type": "module",
|
25
|
+
"main": "./dist/index.js",
|
26
|
+
"types": "./dist/index.d.ts",
|
27
|
+
"exports": {
|
28
|
+
".": {
|
29
|
+
"import": "./dist/index.js",
|
30
|
+
"types": "./dist/index.d.ts"
|
31
|
+
}
|
32
|
+
},
|
33
|
+
"scripts": {
|
34
|
+
"clean": "rimraf ./dist",
|
35
|
+
"type-check": "tsc --noEmit -p .",
|
36
|
+
"test": "vitest run",
|
37
|
+
"coverage": "vitest run --coverage",
|
38
|
+
"tsc": "tsc -p .",
|
39
|
+
"build": "pnpm clean && pnpm tsc",
|
40
|
+
"prepublishOnly": "pnpm coverage && pnpm build"
|
41
|
+
},
|
42
|
+
"dependencies": {
|
43
|
+
"fast-glob": "^3.3.2"
|
44
|
+
},
|
45
|
+
"peerDependencies": {
|
46
|
+
"vite": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
|
47
|
+
},
|
48
|
+
"devDependencies": {
|
49
|
+
"vite": "^7.0.0-beta.0",
|
50
|
+
"vitest": "^3.2.1",
|
51
|
+
"@vitest/coverage-v8": "^3.2.1",
|
52
|
+
"typescript": "^5.7.2",
|
53
|
+
"rimraf": "^6.0.1",
|
54
|
+
"fs-extra": "^11.2.0",
|
55
|
+
"@types/fs-extra": "^11.0.4",
|
56
|
+
"@types/node": "^22.10.2"
|
57
|
+
}
|
58
|
+
}
|