Skip to content

Commit

Permalink
fix(docs): fix documentation issues with webpack config and build
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoazh committed Nov 27, 2021
1 parent ad57f64 commit 1dfed13
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 46 deletions.
81 changes: 44 additions & 37 deletions packages/documentation/docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,64 @@
const { sidebarTree } = require('../code/config');
const apiDocs = sidebarTree('API docs');
const { sidebarTree } = require("../code/config");
const apiDocs = sidebarTree("API docs");
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');

module.exports = {
base: '/gmap-vue/',
title: 'Gmap-vue plugin',
description: 'Documentation for gmap-vue plugin',
base: "/gmap-vue/",
title: "Gmap-vue plugin",
description: "Documentation for gmap-vue plugin",
themeConfig: {
sidebarDepth: 4,
nav: [
{ text: 'Plugin', link: '/' },
{ text: 'Guide', link: '/guide/' },
{ text: 'API', link: '/code/' },
{ text: 'GitHub', link: 'https://github.com/diegoazh/gmap-vue' },
{ text: "Plugin", link: "/" },
{ text: "Guide", link: "/guide/" },
{ text: "API", link: "/code/" },
{ text: "GitHub", link: "https://github.com/diegoazh/gmap-vue" },
],
sidebar: {
'/code/': apiDocs['/code/'],
'/guide/': [
"/code/": apiDocs["/code/"],
"/guide/": [
{
title: 'Guide',
title: "Guide",
collapsable: false,
children: [
{
title: 'Concepts',
title: "Concepts",
collapsable: false,
path: '/guide/'
path: "/guide/",
},
{
title: 'Components',
title: "Components",
collapsable: false,
path: '/guide/map',
path: "/guide/map",
children: [
['map', 'GmapMap'],
['autocomplete', 'GmapAutocomplete'],
['circle', 'GmapCircle'],
['cluster', 'GmapCluster'],
['drawing-manager', 'GmapDrawingManager'],
['heatmap-layer', 'GmapHeatmapLayer'],
['info-window', 'GmapInfoWindow'],
['kml-layer', 'GmapKmlLayer'],
['marker', 'GmapMarker'],
['place-input', 'GmapPlaceInput'],
['polygon', 'GmapPolygon'],
['polyline', 'GmapPolyline'],
['rectangle', 'GmapRectangle'],
['street-view-panorama', 'GmapStreetViewPanorama'],
['extra-examples', 'Extra examples'],
['cdn', 'Using a CDN'],
]
["map", "GmapMap"],
["autocomplete", "GmapAutocomplete"],
["circle", "GmapCircle"],
["cluster", "GmapCluster"],
["drawing-manager", "GmapDrawingManager"],
["heatmap-layer", "GmapHeatmapLayer"],
["info-window", "GmapInfoWindow"],
["kml-layer", "GmapKmlLayer"],
["marker", "GmapMarker"],
["place-input", "GmapPlaceInput"],
["polygon", "GmapPolygon"],
["polyline", "GmapPolyline"],
["rectangle", "GmapRectangle"],
["street-view-panorama", "GmapStreetViewPanorama"],
["extra-examples", "Extra examples"],
["cdn", "Using a CDN"],
],
},
],
}
},
],
'/': [['', 'Getting started']]
}
}
"/": [["", "Getting started"]],
},
},
configureWebpack: (config, isServer) => {
configureWebpack: (config) => {
return { plugins: [new HtmlWebpackPlugin(), new HtmlWebpackInlineSourcePlugin(HtmlWebpackPlugin)] };
};
},
};
9 changes: 6 additions & 3 deletions packages/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
"gmap-vue": "workspace:../gmap-vue",
"lodash": "^4.17.21",
"snyk": "^1.769.0",
"vuepress": "^1.8.2",
"webpack": "^4.26.0"
"vuepress": "^1.8.2"
},
"snyk": true
"snyk": true,
"devDependencies": {
"html-webpack-inline-source-plugin": "^0.0.10",
"html-webpack-plugin": "^5.5.0"
}
}
119 changes: 113 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1dfed13

Please sign in to comment.