mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-04-26 04:25:21 -04:00
update readme example to ESM imports
This commit is contained in:
parent
5bb2ff0eb3
commit
08b6f533f3
10
README.md
10
README.md
@ -66,14 +66,10 @@ Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
|
||||
### via API:
|
||||
|
||||
```js
|
||||
const { execFile } = require('child_process');
|
||||
const hugo = require('hugo-extended');
|
||||
|
||||
execFile(hugo, ['version'], (error, stdout) => {
|
||||
if (error) {
|
||||
throw error;
|
||||
}
|
||||
import hugo from "hugo-extended";
|
||||
import { execFile } from "child_process";
|
||||
|
||||
execFile(hugo, ["version"], (error, stdout) => {
|
||||
console.log(stdout);
|
||||
});
|
||||
```
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "hugo-extended",
|
||||
"version": "0.87.0",
|
||||
"description": "Plug-and-play binary wrapper for Hugo Extended, the awesomest static-site generator.",
|
||||
"description": "✏️ Plug-and-play binary wrapper for Hugo Extended, the awesomest static-site generator.",
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Jake Jarvis",
|
||||
@ -64,9 +64,7 @@
|
||||
"golang"
|
||||
],
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"@jakejarvis/eslint-config"
|
||||
],
|
||||
"extends": "@jakejarvis/eslint-config",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2020,
|
||||
"sourceType": "module"
|
||||
|
Loading…
x
Reference in New Issue
Block a user