1
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:
Jake Jarvis 2021-08-31 12:09:54 -04:00
parent 5bb2ff0eb3
commit 08b6f533f3
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
2 changed files with 5 additions and 11 deletions

View File

@ -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);
});
```

View File

@ -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"