1
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:
2021-08-31 12:09:54 -04:00
parent 5bb2ff0eb3
commit 08b6f533f3
2 changed files with 5 additions and 11 deletions
+3 -7
View File
@@ -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
View File
@@ -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"