How to use the mini-html-webpack-plugin.generateCSSReferences function in mini-html-webpack-plugin

To help you get started, we’ve selected a few mini-html-webpack-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neo-one-suite / neo-one / scripts / website / webpack / testRunner.ts View on Github external
template: ({ css, js, title, publicPath }: any) =>
        `
          
            
              
              <title>${title}</title>
              ${MiniHtmlWebpackPlugin.generateCSSReferences({ files: css, publicPath })}
              <style>
                body {
                  margin: 0;
                  background-color: #F8F5FD;
                  text-rendering: optimizeLegibility;
                }
              </style>
            
            
              <div id="app"></div>
              ${MiniHtmlWebpackPlugin.generateJSReferences({ files: js, publicPath })}
            
          `,
    }),
github SpareBank1 / designsystem / styleguide.config.js View on Github external
template: ({ css, js, publicPath, title }) =&gt; {
        const template = fs.readFileSync(
            path.join(__dirname, 'src', 'styleguidist.html'),
            'utf-8',
        );
        return template
            .replace(
                '',
                `<title>${title}</title>`,
            )
            .replace(
                '',
                MiniHtmlWebpackPlugin.generateCSSReferences(css, publicPath),
            )
            .replace(
                '',
                MiniHtmlWebpackPlugin.generateJSReferences(js, publicPath),
            );
    },
    sections: [
github doczjs / docz / core / docz-core / src / utils / parse-html.ts View on Github external
css,
    js,
    lang = 'en',
    favicon,
    head = [],
    body = [],
    trimWhitespace,
  } = ctx

  const headStr = `
    ${favicon ? `` : ''}
    ${head.meta ? generateMetaTags(head.meta) : ''}
    ${head.links ? generateLinkTags(head.links) : ''}
    ${head.raw ? generateRawTags(head.raw) : ''}
    ${head.scripts ? generateScriptTags(head.scripts) : ''}
    ${generateCSSReferences(css, publicPath)}`

  const footerStr = `
    ${body.raw ? generateRawTags(body.raw) : ''}
    ${body.scripts ? generateScriptTags(body.scripts) : ''}
    ${generateJSReferences(js, publicPath)}`

  const doc = ctags.html(
    template({
      title,
      description,
      lang,
      head: headStr,
      footer: footerStr,
      publicUrl: getPublicUrl(config, dev),
    })
  )
github reakit / reakit / packages / website / src / template.js View on Github external
      ${generateCSSReferences(css, publicPath)}
      
      
      
    
    
      <div id="rsg-root"></div>
      ${generateJSReferences(js, publicPath)}
    
  `;
github neo-one-suite / neo-one / scripts / website / start.ts View on Github external
template: ({ css, js, title, publicPath }: any) =&gt;
          `
          
            
              
              
              
              
              
              
              
              <title>${title}</title>
              ${MiniHtmlWebpackPlugin.generateCSSReferences(css, publicPath)}
              <style>
              body {
                margin: 0;
                text-rendering: optimizeLegibility;
              }
              </style>
            
            
              <div id="app"></div>
              ${MiniHtmlWebpackPlugin.generateJSReferences(js, publicPath)}
            
          `,
      }),
github neo-one-suite / neo-one / packages / neo-one-simulation-react-template / template / scripts / start.ts View on Github external
template: ({ css, js, title, publicPath }: any) =&gt;
        `
          
            
              
              
              
              
              
              
              
              <title>${title}</title>
              ${MiniHtmlWebpackPlugin.generateCSSReferences(css, publicPath)}
              <style>
              body {
                margin: 0;
                text-rendering: optimizeLegibility;
              }
              </style>
            
            
              <div id="app"></div>
              ${MiniHtmlWebpackPlugin.generateJSReferences(js, publicPath)}
            
          `,
    }),
github reakit / reakit / website / src / template.js View on Github external
      ${generateCSSReferences(css, publicPath)}
      
      
      
    
    
      <div id="rsg-root"></div>
      ${generateJSReferences(js, publicPath)}
      
      
      
    
  `;
github neo-one-suite / neo-one / scripts / website / webpack / preview.ts View on Github external
template: ({ css, js, title, publicPath }: any) =&gt;
        `
          
            
              
              <title>${title}</title>
              ${MiniHtmlWebpackPlugin.generateCSSReferences({ files: css, publicPath })}
              <style>
                body {
                  margin: 0;
                  background-color: #F8F5FD;
                  text-rendering: optimizeLegibility;
                }
              </style>
            
            
              <div id="app"></div>
              ${MiniHtmlWebpackPlugin.generateJSReferences({ files: js, publicPath })}
            
          `,
    }),

mini-html-webpack-plugin

A miniature version of html-webpack-plugin with only necessary features

MIT
Latest version published 4 years ago

Package Health Score

57 / 100
Full package analysis