You've already forked hugo-extended
mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2026-06-13 01:45:29 -04:00
update readme example to ESM imports
This commit is contained in:
@@ -66,14 +66,10 @@ Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
|
|||||||
### via API:
|
### via API:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const { execFile } = require('child_process');
|
import hugo from "hugo-extended";
|
||||||
const hugo = require('hugo-extended');
|
import { execFile } from "child_process";
|
||||||
|
|
||||||
execFile(hugo, ['version'], (error, stdout) => {
|
|
||||||
if (error) {
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
execFile(hugo, ["version"], (error, stdout) => {
|
||||||
console.log(stdout);
|
console.log(stdout);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|||||||
+2
-4
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "hugo-extended",
|
"name": "hugo-extended",
|
||||||
"version": "0.87.0",
|
"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",
|
"license": "MIT",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Jake Jarvis",
|
"name": "Jake Jarvis",
|
||||||
@@ -64,9 +64,7 @@
|
|||||||
"golang"
|
"golang"
|
||||||
],
|
],
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": [
|
"extends": "@jakejarvis/eslint-config",
|
||||||
"@jakejarvis/eslint-config"
|
|
||||||
],
|
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 2020,
|
"ecmaVersion": 2020,
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
|
|||||||
Reference in New Issue
Block a user