File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ function getPackageJSON() {
3131 name : pkg . name ,
3232 svelte : pkg . svelte ,
3333 description : pkg . description ,
34+ homepage : pkg . homepage ,
3435 } ;
3536 } catch ( error ) {
3637 console . log ( error ) ;
@@ -74,11 +75,21 @@ const custom_css = `
7475 }
7576` ;
7677
78+ /**
79+ *
80+ * @param {Object } opts
81+ * @param {boolean } opts.minify - set to `true` to minify the HTML/JS
82+ * @param {string } opts.outDir - set the folder to emit the files
83+ * @param {string } opts.style - custom CSS appended to the <style> block
84+ * @param {boolean } opts.disableDefaultCSS - set to `true` to omit the default GitHub styles
85+ *
86+ */
7787export default function createConfig ( opts ) {
7888 const minify = opts . minify === true ;
7989 const pkg = getPackageJSON ( ) ;
8090 const hash = minify ? hashREADME ( ) : "" ;
8191 const output_dir = opts . outDir || "dist" ;
92+
8293 const template = `
8394 <!DOCTYPE html>
8495 <html lang="en">
@@ -88,7 +99,7 @@ export default function createConfig(opts) {
8899 <meta name="description" content="${ pkg . description || `${ pkg . name } demo` } " />
89100 <title>${ pkg . name } </title>
90101 <style>
91- ${ css }
102+ ${ ! opts . disableDefaultCSS ? css : "" }
92103 ${ custom_css }
93104 ${ opts . style || "" }
94105 </style>
You can’t perform that action at this time.
0 commit comments