Fixed #3802 - Improve folder structure for nuxt configurations
parent
851950270b
commit
f5fe822afb
|
@ -156,6 +156,8 @@ Object.keys(fileModules).forEach((p) => {
|
||||||
createVeturAttributes(fileModules[p][p]);
|
createVeturAttributes(fileModules[p][p]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
!fs.existsSync(distDir) && fs.mkdirSync(distDir);
|
||||||
|
|
||||||
const webTypesJson = JSON.stringify(webTypes, null, 2);
|
const webTypesJson = JSON.stringify(webTypes, null, 2);
|
||||||
|
|
||||||
fs.writeFileSync(path.resolve(distDir, 'web-types.json'), webTypesJson);
|
fs.writeFileSync(path.resolve(distDir, 'web-types.json'), webTypesJson);
|
||||||
|
|
|
@ -24,7 +24,7 @@ app.options.addReader(new TypeDoc.TypeDocReader());
|
||||||
app.bootstrap({
|
app.bootstrap({
|
||||||
// typedoc options here
|
// typedoc options here
|
||||||
name: 'PrimeVue',
|
name: 'PrimeVue',
|
||||||
entryPoints: [`components`],
|
entryPoints: [`components/lib`],
|
||||||
entryPointStrategy: 'expand',
|
entryPointStrategy: 'expand',
|
||||||
hideGenerator: true,
|
hideGenerator: true,
|
||||||
excludeExternals: true,
|
excludeExternals: true,
|
||||||
|
@ -32,7 +32,7 @@ app.bootstrap({
|
||||||
searchInComments: true,
|
searchInComments: true,
|
||||||
disableSources: true,
|
disableSources: true,
|
||||||
logLevel: 'Error',
|
logLevel: 'Error',
|
||||||
exclude: ['node_modules', 'components/**/*.js']
|
exclude: ['node_modules', 'components/lib/**/*.js']
|
||||||
});
|
});
|
||||||
|
|
||||||
const project = app.convert();
|
const project = app.convert();
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
@import '../../components/common/Common.css';
|
@import '../../components/lib/common/Common.css';
|
||||||
@import '../../components/badge/Badge.css';
|
@import '../../components/lib/badge/Badge.css';
|
||||||
@import '../../components/button/Button.css';
|
@import '../../components/lib/button/Button.css';
|
||||||
@import '../../components/checkbox/Checkbox.css';
|
@import '../../components/lib/checkbox/Checkbox.css';
|
||||||
@import '../../components/colorpicker/ColorPicker.css';
|
@import '../../components/lib/colorpicker/ColorPicker.css';
|
||||||
@import '../../components/inputtext/InputText.css';
|
@import '../../components/lib/inputtext/InputText.css';
|
||||||
@import '../../components/radiobutton/RadioButton.css';
|
@import '../../components/lib/radiobutton/RadioButton.css';
|
||||||
@import '../../components/ripple/Ripple.css';
|
@import '../../components/lib/ripple/Ripple.css';
|
||||||
@import '../../components/tooltip/Tooltip.css';
|
@import '../../components/lib/tooltip/Tooltip.css';
|
|
@ -1,17 +1,17 @@
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
fs.readdirSync(path.resolve(__dirname, './components/'), { withFileTypes: true })
|
fs.readdirSync(path.resolve(__dirname, './components/lib/'), { withFileTypes: true })
|
||||||
.filter((dir) => dir.isDirectory())
|
.filter((dir) => dir.isDirectory())
|
||||||
.forEach(({ name: folderName }) => {
|
.forEach(({ name: folderName }) => {
|
||||||
fs.readdirSync(path.resolve(__dirname, './components/' + folderName)).forEach((file) => {
|
fs.readdirSync(path.resolve(__dirname, './components/lib/' + folderName)).forEach((file) => {
|
||||||
if (file === 'package.json' || file.endsWith('d.ts') || file.endsWith('vue')) {
|
if (file === 'package.json' || file.endsWith('d.ts') || file.endsWith('vue')) {
|
||||||
fs.copySync(path.resolve(__dirname, './components/' + folderName) + '/' + file, 'dist/' + folderName + '/' + file);
|
fs.copySync(path.resolve(__dirname, './components/lib/' + folderName) + '/' + file, 'dist/' + folderName + '/' + file);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
fs.copySync(path.resolve(__dirname, './components/ts-helpers.d.ts'), 'dist/ts-helpers.d.ts');
|
fs.copySync(path.resolve(__dirname, './components/lib/ts-helpers.d.ts'), 'dist/ts-helpers.d.ts');
|
||||||
fs.copySync(path.resolve(__dirname, './package-build.json'), 'dist/package.json');
|
fs.copySync(path.resolve(__dirname, './package-build.json'), 'dist/package.json');
|
||||||
fs.copySync(path.resolve(__dirname, './README.md'), 'dist/README.md');
|
fs.copySync(path.resolve(__dirname, './README.md'), 'dist/README.md');
|
||||||
fs.copySync(path.resolve(__dirname, './LICENSE.md'), 'dist/LICENSE.md');
|
fs.copySync(path.resolve(__dirname, './LICENSE.md'), 'dist/LICENSE.md');
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
export default defineNuxtLink({
|
||||||
|
componentName: 'PrimeVueNuxtLink',
|
||||||
|
trailingSlash: 'append'
|
||||||
|
});
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 293 B |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue