@eankeen/

hexo-blog

Nodejs

No description

fork
loading
Files
  • index.js
  • scaffolds
  • source
  • themes
  • .gitignore
  • db.json
  • package-lock.json
  • package.json
  • yarn.lock

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.2799611640239119","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"Ly8gU3RhcnQgSGV4byBEZXZlbG9wbWVudCBTZXJ2ZXIKbGV0IHNwYXduID0gcmVxdWlyZSgnY2hpbGRfcHJvY2VzcycpLnNwYXduOwoKbGV0IHJ1biA9IChjbWQsIGFyZ3MpID0+IHsKICBjaGlsZCA9IHNwYXduKGNtZCwgYXJncyk7CgogIGNoaWxkLnN0ZG91dC5vbignZGF0YScsIGRhdGEgPT4gcHJvY2Vzcy5zdGRvdXQud3JpdGUoZGF0YS50b1N0cmluZygpKSk7CiAgY2hpbGQub24oJ2Nsb3NlJywgY29kZSA9PiBjb25zb2xlLmxvZyhgQ2hpbGQgcHJvY2VzcyBleGl0ZWQgd2l0aCBjb2RlICR7Y29kZX0uYCkpOwp9OwoKLy8gU3RhcnQgdGhlIGRldmVsb3BtZW50IHNlcnZlcgpydW4oJy4vbm9kZV9tb2R1bGVzLy5iaW4vaGV4bycsIFsnc2VydmVyJ10pCgovLyBDcmVhdGUgYSBuZXcgcG9zdCBjYWxsZWQgIkJhciIKLy8gLi9fbm9kZV9tb2R1bGVzLy5iaW4vaGV4byBuZXcgcG9zdCAiQmFyIgovLyBydW4oJy4vbm9kZV9tb2R1bGVzLy5iaW4vaGV4bycsIFsnbmV3JywgJ3Bvc3QnLCBgIkJhciJgXSk7CgoKCg=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Start Hexo Development Server
let spawn = require('child_process').spawn;

let run = (cmd, args) => {
  child = spawn(cmd, args);

  child.stdout.on('data', data => process.stdout.write(data.toString()));
  child.on('close', code => console.log(`Child process exited with code ${code}.`));
};

// Start the development server
run('./node_modules/.bin/hexo', ['server'])

// Create a new post called "Bar"
// ./_node_modules/.bin/hexo new post "Bar"
// run('./node_modules/.bin/hexo', ['new', 'post', `"Bar"`]);



node v10.16.0