Skip to content

Commit 04bcd6a

Browse files
committed
fix: Exit process after specified timeout
1 parent 8ba0f0b commit 04bcd6a

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
# ignore
2-
dist/*
3-
!dist/*.min.js
42
.npmrc

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
<!-- CoCreate CSS -->
1515
<link rel="stylesheet" href="https://cdn.cocreate.app/latest/CoCreate.min.css" type="text/css"/>
16-
<link rel="stylesheet" href="https://ws.cocreate.app/docs.css" data-collection="apples" data-document_id="6069ff5042ef8ff5175a5c8d" name="css" type="text/css" />
17-
</head>
16+
<link rel="stylesheet" href="/docs/index.css" data-collection="files" data-document_id="60888216117c640e7596303f" name="src" type="text/css" data-save="true"/>
17+
</head>
1818

1919
<body>
2020
<nav class="nav display:flex align-items:center background:whitesmoke padding-top:10px padding-bottom:10px" data-main_content_id="content" data-scroll="sticky-nav,hide-nav" data-scroll_up="10" data-scroll_down="10" data-collection="components" data-document_id="60395ef42b3ac232657040fd" name="html">

src/index.js

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -84,31 +84,34 @@ if (extract) {
8484
* update and create document by config crud
8585
*/
8686

87-
if (crud) {
88-
crud.forEach(async (info) => {
89-
await runStore(info, 'crud')
90-
})
91-
}
87+
// if (crud) {
88+
// crud.forEach(async (info) => {
89+
// await runStore(info, 'crud')
90+
// })
91+
// }
9292

9393
/**
9494
* Store html files by config sources
9595
**/
96-
if (sources) {
97-
sources.forEach(async ({entry, collection, document_id, key, data}) => {
98-
if (!path) return;
96+
// if (sources) {
97+
// sources.forEach(async ({entry, collection, document_id, key, data}) => {
98+
// if (!path) return;
9999

100-
let content = fs.readFileSync(path, 'utf8');
100+
// let content = fs.readFileSync(path, 'utf8');
101101

102-
if (content && key && collection) {
103-
if (!data) data = {};
104-
let storeData = {
105-
[key]: content,
106-
...data
107-
};
108-
await runStore({collection, document_id, data: storeData}, 'sources');
109-
}
110-
})
111-
}
102+
// if (content && key && collection) {
103+
// if (!data) data = {};
104+
// let storeData = {
105+
// [key]: content,
106+
// ...data
107+
// };
108+
// await runStore({collection, document_id, data: storeData}, 'sources');
109+
// }
110+
// })
111+
// }
112112

113113
console.log('end....')
114114

115+
setTimeout(function(){
116+
process.exit()
117+
}, 1000 * 30)

0 commit comments

Comments
 (0)