Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
h5-template-generator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
h5-template-generator
Commits
f5ede3bd
Commit
f5ede3bd
authored
Jun 18, 2021
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 统一文件夹
parent
0af5564c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
+6
-6
app.js
app.js
+1
-1
publish.js
bin/publish.js
+5
-5
index.css
play/index.css
+0
-0
index.html
play/index.html
+0
-0
index.js
play/index.js
+0
-0
No files found.
app.js
View file @
f5ede3bd
...
...
@@ -60,4 +60,4 @@ var server = http.createServer(function (request, response) {
server
.
listen
(
PORT
);
console
.
log
(
"
Server runing at port:
"
+
PORT
+
"
.
"
);
console
.
log
(
"
visit form : http://localhost:
"
+
PORT
+
"
/form/index.html
"
);
console
.
log
(
"
visit index : http://localhost:
"
+
PORT
+
"
/index/index.html
"
);
\ No newline at end of file
console
.
log
(
"
visit play : http://localhost:
"
+
PORT
+
"
/play/index.html
"
);
\ No newline at end of file
bin/publish.js
View file @
f5ede3bd
...
...
@@ -71,9 +71,9 @@ const runSpawn = async function (){
fs
.
mkdirSync
(
path
.
resolve
(
__dirname
,
"
../dist/form
"
));
}
try
{
await
fsp
.
access
(
path
.
resolve
(
__dirname
,
"
../dist/
index
"
),
fs
.
constants
.
F_OK
);
await
fsp
.
access
(
path
.
resolve
(
__dirname
,
"
../dist/
play
"
),
fs
.
constants
.
F_OK
);
}
catch
(
error
)
{
fs
.
mkdirSync
(
path
.
resolve
(
__dirname
,
"
../dist/
index
"
));
fs
.
mkdirSync
(
path
.
resolve
(
__dirname
,
"
../dist/
play
"
));
}
try
{
await
fsp
.
access
(
path
.
resolve
(
__dirname
,
"
../dist/lib
"
),
fs
.
constants
.
F_OK
);
...
...
@@ -81,12 +81,12 @@ const runSpawn = async function (){
fs
.
mkdirSync
(
path
.
resolve
(
__dirname
,
"
../dist/lib
"
));
}
await
copy
(
path
.
resolve
(
__dirname
,
"
../form
"
),
path
.
resolve
(
__dirname
,
"
../dist/form
"
));
await
copy
(
path
.
resolve
(
__dirname
,
"
../
index
"
),
path
.
resolve
(
__dirname
,
"
../dist/index
"
));
await
copy
(
path
.
resolve
(
__dirname
,
"
../
play
"
),
path
.
resolve
(
__dirname
,
"
../dist/play
"
));
await
copy
(
path
.
resolve
(
__dirname
,
"
../lib
"
),
path
.
resolve
(
__dirname
,
"
../dist/lib
"
));
let
str
=
fs
.
readFileSync
(
path
.
resolve
(
__dirname
,
"
../dist/
index
/index.html
"
),{
encoding
:
'
utf8
'
});
let
str
=
fs
.
readFileSync
(
path
.
resolve
(
__dirname
,
"
../dist/
play
/index.html
"
),{
encoding
:
'
utf8
'
});
str
=
str
.
replace
(
'
<base href="">
'
,
'
<base href="template-base-href">
'
);
fs
.
writeFileSync
(
path
.
resolve
(
__dirname
,
"
../dist/
index
/index.html
"
),
str
);
fs
.
writeFileSync
(
path
.
resolve
(
__dirname
,
"
../dist/
play
/index.html
"
),
str
);
await
new
Promise
(
function
(
resolve
,
reject
){
let
pkg
=
require
(
"
../package.json
"
);
...
...
index
/index.css
→
play
/index.css
View file @
f5ede3bd
File moved
index
/index.html
→
play
/index.html
View file @
f5ede3bd
File moved
index
/index.js
→
play
/index.js
View file @
f5ede3bd
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment