hugo-extended
Advanced tools
Comparing version 0.63.2 to 0.64.0
'use strict'; | ||
const path = require('path'); | ||
const BinWrapper = require('bin-wrapper'); | ||
const binWrapper = require('bin-wrapper'); | ||
const { hugoVersion } = require('../package.json'); | ||
@@ -10,3 +10,3 @@ | ||
// Default to extended Hugo, fall back to vanilla Hugo on unsupported platforms | ||
const extendedBin = new BinWrapper() | ||
const hugoBin = new binWrapper() | ||
.src(`${baseUrl}hugo_extended_${hugoVersion}_Linux-64bit.tar.gz`, 'linux', 'x64') | ||
@@ -28,3 +28,3 @@ .src(`${baseUrl}hugo_extended_${hugoVersion}_macOS-64bit.tar.gz`, 'darwin', 'x64') | ||
module.exports = function () { | ||
return extendedBin; | ||
return hugoBin; | ||
}; |
'use strict'; | ||
const path = require('path'); | ||
const signale = require('signale'); | ||
const bin = require('.'); | ||
@@ -11,5 +10,4 @@ | ||
const initCwd = process.env.INIT_CWD; | ||
if (initCwd) { | ||
if (initCwd) | ||
return initCwd; | ||
} | ||
@@ -21,5 +19,4 @@ // Fallback of getting INIT_CWD | ||
// otherwise return the `cwd` (ordinary it will be the postinstall process of hugo-bin itself). | ||
if (paths.length > 1 && paths[paths.length - 2] === 'node_modules') { | ||
if (paths.length > 1 && paths[paths.length - 2] === 'node_modules') | ||
return path.resolve('../../', cwd); | ||
} | ||
@@ -31,6 +28,6 @@ return cwd; | ||
.then(() => { | ||
signale.success('Hugo binary installed successfully!'); | ||
console.log('✔ Hugo installed successfully!'); | ||
}) | ||
.catch(error => { | ||
signale.fatal(`${error.message}\nHugo binary installation failed!`); | ||
console.error('✖ ERROR: Hugo installation failed. :(\n', error); | ||
}); |
{ | ||
"name": "hugo-extended", | ||
"version": "0.63.2", | ||
"hugoVersion": "0.63.2", | ||
"version": "0.64.0", | ||
"hugoVersion": "0.64.0", | ||
"description": "Plug-and-play binary wrapper for Hugo Extended, the awesomest static-site generator.", | ||
"homepage": "https://github.com/jakejarvis/hugo-node#readme", | ||
"homepage": "https://github.com/jakejarvis/hugo-extended#readme", | ||
"license": "MIT", | ||
@@ -15,3 +15,3 @@ "author": { | ||
"type": "git", | ||
"url": "git+https://github.com/jakejarvis/hugo-node.git" | ||
"url": "git+https://github.com/jakejarvis/hugo-extended.git" | ||
}, | ||
@@ -31,4 +31,3 @@ "keywords": [ | ||
"bin-wrapper": "^4.1.0", | ||
"rimraf": "^3.0.1", | ||
"signale": "^1.4.0" | ||
"rimraf": "^3.0.1" | ||
}, | ||
@@ -47,3 +46,3 @@ "devDependencies": { | ||
"engines": { | ||
"node": ">=10" | ||
"node": ">=8" | ||
}, | ||
@@ -50,0 +49,0 @@ "files": [ |
@@ -1,2 +0,2 @@ | ||
# hugo-extended via NPM [![CI status](https://github.com/jakejarvis/hugo-node/workflows/Test/badge.svg)](.github/workflows) [![npm](https://img.shields.io/npm/v/hugo-extended)](https://www.npmjs.com/package/hugo-extended) [![Hugo v0.63.2](https://img.shields.io/badge/Hugo-v0.63.2-orange)](https://github.com/gohugoio/hugo) [![Dependabot](https://api.dependabot.com/badges/status?host=github&repo=jakejarvis/hugo-node)](https://github.com/jakejarvis/hugo-node/pulls?q=is%3Apr+label%3Adependencies) | ||
# <img src="https://raw.githubusercontent.com/gohugoio/gohugoioTheme/master/static/images/hugo-logo-wide.svg?sanitize=true" alt="Hugo" width="115"> via NPM [![CI status](https://github.com/jakejarvis/hugo-extended/workflows/Run%20tests/badge.svg)](https://github.com/jakejarvis/hugo-extended/actions) [![npm](https://img.shields.io/npm/v/hugo-extended?color=red)](https://www.npmjs.com/package/hugo-extended) [![Hugo v0.63.2](https://img.shields.io/badge/Hugo-v0.63.2-orange)](https://github.com/gohugoio/hugo) [![Dependabot](https://api.dependabot.com/badges/status?host=github&repo=jakejarvis/hugo-extended)](https://github.com/jakejarvis/hugo-extended/pulls?q=is%3Apr+label%3Adependencies) | ||
@@ -17,17 +17,4 @@ > Plug-and-play binary wrapper for [Hugo Extended](https://gohugo.io/), the awesomest static-site generator. | ||
### API | ||
See the [Hugo Documentation](https://gohugo.io/documentation/) for additional functionality. | ||
```js | ||
const { execFile } = require('child_process'); | ||
const hugo = require('hugo-extended'); | ||
execFile(hugo, ['version'], (error, stdout) => { | ||
if (error) { | ||
throw error; | ||
} | ||
console.log(stdout); | ||
}); | ||
``` | ||
### package.json | ||
@@ -45,3 +32,3 @@ | ||
#### CLI | ||
#### CLI: | ||
@@ -60,4 +47,19 @@ ```sh | ||
See the [Hugo Documentation](https://gohugo.io/documentation/) for additional functionality. | ||
--- | ||
### API | ||
```js | ||
const { execFile } = require('child_process'); | ||
const hugo = require('hugo-extended'); | ||
execFile(hugo, ['version'], (error, stdout) => { | ||
if (error) { | ||
throw error; | ||
} | ||
console.log(stdout); | ||
}); | ||
``` | ||
## Examples | ||
@@ -64,0 +66,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7331
2
71
57
- Removedsignale@^1.4.0
- Removedansi-styles@3.2.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removederror-ex@1.3.2(transitive)
- Removedfigures@2.0.0(transitive)
- Removedfind-up@2.1.0(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedis-arrayish@0.2.1(transitive)
- Removedjson-parse-better-errors@1.0.2(transitive)
- Removedload-json-file@4.0.0(transitive)
- Removedlocate-path@2.0.0(transitive)
- Removedp-limit@1.3.0(transitive)
- Removedp-locate@2.0.0(transitive)
- Removedp-try@1.0.0(transitive)
- Removedparse-json@4.0.0(transitive)
- Removedpath-exists@3.0.0(transitive)
- Removedpkg-conf@2.1.0(transitive)
- Removedsignale@1.4.0(transitive)
- Removedstrip-bom@3.0.0(transitive)
- Removedsupports-color@5.5.0(transitive)