Skip to content

Instantly share code, notes, and snippets.

@misterdev
Last active March 21, 2019 17:01
Show Gist options
  • Save misterdev/2ef5042583c696055d207bb020fb7a14 to your computer and use it in GitHub Desktop.
Save misterdev/2ef5042583c696055d207bb020fb7a14 to your computer and use it in GitHub Desktop.
9
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="/favicon.ico">
<title><%= title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
writing() {
// => Writes webpack.config.json
this.config.set('configuration', this.options.env.configuration);
// => Write package.json, .eslintrc and .babelrc
this.fs.extendJSON(this.destinationPath('package.json'), createPackageJson(this.answers));
/* ... */
const { name, publicFolder } = this.answers;
// => Copies public/index.html in the destination folder replacing the title
this.fs.copyTpl(
this.templatePath('public/index.html'),
this.destinationPath(`${publicFolder}/index.html`),
{ title: name }
);
/* ... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment