mirror of
https://github.com/dilllxd/gitfolio.git
synced 2024-08-14 22:28:09 +00:00
fixed issue #12
This commit is contained in:
parent
24c982c55e
commit
eea39f7b56
2 changed files with 15 additions and 15 deletions
12
build.js
12
build.js
|
@ -18,6 +18,7 @@ function populateCSS(){
|
|||
if (err) throw err;
|
||||
fs.appendFile('index.css', dark, function (err) {
|
||||
if (err) throw err;
|
||||
});
|
||||
fs.readFile("config.json", function (err , data) {
|
||||
if (err) throw err;
|
||||
data = JSON.parse(data);
|
||||
|
@ -27,19 +28,18 @@ function populateCSS(){
|
|||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}else{
|
||||
fs.copyFile('./assets/index.css', 'index.css', (err) => {
|
||||
if (err) throw err;
|
||||
fs.appendFile('index.css', light, function (err) {
|
||||
if (err) throw err;
|
||||
fs.readFile("config.json", function (err , data) {
|
||||
if (err) throw err;
|
||||
});
|
||||
fs.readFile("config.json", function (error , data) {
|
||||
if (error) throw err;
|
||||
data = JSON.parse(data);
|
||||
data[0].theme = "light";
|
||||
fs.writeFile('config.json', JSON.stringify(data, null, ' '), function(err){
|
||||
if (err) throw err;
|
||||
});
|
||||
fs.writeFile('config.json', JSON.stringify(data, null, ' '), function(error){
|
||||
if (error) throw err;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"username": null,
|
||||
"name": null,
|
||||
"userimg": null,
|
||||
"background": null,
|
||||
"background": "https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1450",
|
||||
"theme": "light"
|
||||
}
|
||||
]
|
Loading…
Reference in a new issue