const { writeFile, unlink } = require('fs').promises;
const { exec } = require('child_process');


const html =
`<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="style.css">
  <title>${process.argv[2] || 'Document'}</title>
</head>
<body>

  <script src="app.js"></script>
</body>
</html>`;


writeFile('./index.html', html).catch( err => console.log(err) );
writeFile('./style.css', '').catch( err => console.log(err) );
writeFile('./app.js', '').catch( err => console.log(err) );
exec('code index.html style.css app.js');
unlink('index.js').catch( err => console.log(err) );

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.