« first day (2750 days earlier)      last day (1352 days later) » 

7:39 AM
Anyone know how to compile the SCSS in Vue SFC files into one CSS file, as opposed to one CSS file for each component? Using webpack with these rules:

{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.s[ac]ss$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].css',
outputPath: '../css/', // Relative to /js folder
},
},
{
loader: 'sass-loader',
}
],
},
 
1 message moved from JavaScript
1 message moved from JavaScript
 
 
3 hours later…
 
1 hour later…
1:12 PM
Hello everyone please how can i using node js insert a json object to sqlite3 DB?

I did this :
db.serialize(() => {
db.run(`INSERT INTO patients VALUES`, JSON.stringify(patient));
})

No success
 
1 message moved from JavaScript
 
 
2 hours later…
3:01 PM
Thanks for your answer first
Here i fixed this :
db.serialize(() => {
db.prepare("INSERT INTO patients(uid, first_name, last_name, birthsex, code, birth_date) VALUES
(?, ?, ?, ?, ?, ?)").run(JSON.stringify( patient )).finalize();
});
 
1 message moved from JavaScript
 
Thanks for your answer first
Here i fixed this :
db.serialize(() => {
db.prepare("INSERT INTO users(uid, first_name, last_name, birthsex, code, birth_date)
VALUES (?, ?, ?, ?, ?, ?)").run(JSON.stringify( user)).finalize();});

It is saved but i gets all in one column :/

});
 
1 message moved from JavaScript
 
 
1 hour later…
 
4 hours later…
 
2 hours later…
9:29 PM
I have a library which uses Promises to send messages, handle response and send message again : https://github.com/subins2000/p2pt/blob/master/test/basic.js#L42

```js
lib.send(peer, 'hello')
.then(([peer, msg]) => {
return peer.respond('how are you ?')
})
.then(([peer, msg]) => {
return peer.respond('byeee')
})
```

For this, the promise `resolve` function is stored into array. I was wondering if this would cause a memory leak and is there a way to figure out if there is actually a `resolve` function (i.e there is a .then) ?
 
1 message moved from JavaScript
 

« first day (2750 days earlier)      last day (1352 days later) »