sinto 1.5.2 → 1.6.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/README.md +1 -0
- package/htmlcss/genHtml.js +23 -0
- package/htmlcss/htmlcss.js +17 -0
- package/package.json +1 -1
- package/sin.js +8 -1
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@ This command is generate public directory from src directory.
|
|
|
60
60
|
* sin pup - Generate Puppeteer test with Mocha
|
|
61
61
|
* sin rmno - Delete node_modules directory
|
|
62
62
|
* sin ts - Generate tsconfig.json and add dependencies
|
|
63
|
+
* sin web - Generate HTML and empty CSS files
|
|
63
64
|
|
|
64
65
|
The Default task manager is gulp. Development serve is browser-sync.
|
|
65
66
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
const htmlContent = `
|
|
3
|
+
<!DOCTYPE html>
|
|
4
|
+
<html lang="hu">
|
|
5
|
+
<head>
|
|
6
|
+
<meta charset="UTF-8">
|
|
7
|
+
<meta name="viewport"
|
|
8
|
+
content="width=device-width,
|
|
9
|
+
initial-scale=1.0">
|
|
10
|
+
<title>Sinto weblap</title>
|
|
11
|
+
<link rel="stylesheet" href="style.css">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<div class="container">
|
|
15
|
+
<h1>Sinto weblap</h1>
|
|
16
|
+
<p>This is a default index.html file, which was created by the sin command.</p>
|
|
17
|
+
</div>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
20
|
+
|
|
21
|
+
`
|
|
22
|
+
|
|
23
|
+
module.exports = htmlContent
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
const defaultHtmlContent = require('../htmlcss/genHtml');
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
createFile
|
|
6
|
+
} = require('../tools/tools');
|
|
7
|
+
|
|
8
|
+
const createIndexHtmlCssFile = () => {
|
|
9
|
+
const dir = process.cwd();
|
|
10
|
+
const path = `${dir}/index.html`;
|
|
11
|
+
createFile(path, defaultHtmlContent);
|
|
12
|
+
|
|
13
|
+
const cssPath = `${dir}/style.css`;
|
|
14
|
+
createFile(cssPath, '');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
module.exports.createIndexHtmlCssFile = createIndexHtmlCssFile
|
package/package.json
CHANGED
package/sin.js
CHANGED
|
@@ -9,13 +9,14 @@ const { createApi } = require('./haiserver/apigen');
|
|
|
9
9
|
const { createWebpack } = require('./webpack/generate');
|
|
10
10
|
const { createPuppeteerTest } = require('./gentest/generate');
|
|
11
11
|
const { supplementTypescript } = require('./gents/gents');
|
|
12
|
+
const { createIndexHtmlCssFile } = require('./htmlcss/htmlcss');
|
|
12
13
|
|
|
13
14
|
const program = new Command();
|
|
14
15
|
|
|
15
16
|
program
|
|
16
17
|
.name('sin')
|
|
17
18
|
.description('Project handler')
|
|
18
|
-
.version('1.
|
|
19
|
+
.version('1.6.0');
|
|
19
20
|
|
|
20
21
|
program
|
|
21
22
|
.command('init')
|
|
@@ -74,5 +75,11 @@ program
|
|
|
74
75
|
supplementTypescript();
|
|
75
76
|
})
|
|
76
77
|
|
|
78
|
+
program
|
|
79
|
+
.command('web')
|
|
80
|
+
.description('HTML és üres CSS fájl')
|
|
81
|
+
.action(() => {
|
|
82
|
+
createIndexHtmlCssFile();
|
|
83
|
+
})
|
|
77
84
|
|
|
78
85
|
program.parse();
|