You've already forked hugo-extended
mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-09-13 04:05:31 -04:00
default to Hugo extended flavor
This commit is contained in:
26
lib/index.js
26
lib/index.js
@@ -2,7 +2,6 @@
|
||||
|
||||
const path = require('path');
|
||||
const BinWrapper = require('bin-wrapper');
|
||||
const pkgConf = require('pkg-conf');
|
||||
const { hugoVersion } = require('../package.json');
|
||||
|
||||
const baseUrl = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/`;
|
||||
@@ -22,11 +21,6 @@ const binNameMap = {
|
||||
ia32: 'hugo',
|
||||
x64: 'hugo'
|
||||
},
|
||||
android: {
|
||||
arm: 'hugo',
|
||||
ia32: 'hugo',
|
||||
x64: 'hugo'
|
||||
},
|
||||
win32: {
|
||||
ia32: 'hugo.exe',
|
||||
x64: 'hugo.exe'
|
||||
@@ -51,22 +45,6 @@ const extendedBin = new BinWrapper()
|
||||
.dest(dest)
|
||||
.use(binName);
|
||||
|
||||
const normalBin = new BinWrapper()
|
||||
.src(`${baseUrl}hugo_${hugoVersion}_FreeBSD-32bit.tar.gz`, 'freebsd', 'x86')
|
||||
.src(`${baseUrl}hugo_${hugoVersion}_FreeBSD-64bit.tar.gz`, 'freebsd', 'x64')
|
||||
.src(`${baseUrl}hugo_${hugoVersion}_FreeBSD-ARM.tar.gz`, 'freebsd', 'arm')
|
||||
.src(`${baseUrl}hugo_${hugoVersion}_Linux-32bit.tar.gz`, 'linux', 'x86')
|
||||
.src(`${baseUrl}hugo_${hugoVersion}_Linux-64bit.tar.gz`, 'linux', 'x64')
|
||||
.src(`${baseUrl}hugo_${hugoVersion}_Linux-ARM.tar.gz`, 'linux', 'arm')
|
||||
.src(`${baseUrl}hugo_${hugoVersion}_macOS-32bit.tar.gz`, 'darwin', 'x86')
|
||||
.src(`${baseUrl}hugo_${hugoVersion}_macOS-64bit.tar.gz`, 'darwin', 'x64')
|
||||
.src(`${baseUrl}hugo_${hugoVersion}_Windows-32bit.zip`, 'win32', 'x86')
|
||||
.src(`${baseUrl}hugo_${hugoVersion}_Windows-64bit.zip`, 'win32', 'x64')
|
||||
.dest(dest)
|
||||
.use(binName);
|
||||
|
||||
module.exports = projectRoot => {
|
||||
const config = pkgConf.sync('hugo-bin', { cwd: projectRoot });
|
||||
const extended = (process.env.HUGO_BIN_BUILD_TAGS || process.env.npm_config_hugo_bin_build_tags || config.buildTags) === 'extended';
|
||||
return extended ? extendedBin : normalBin;
|
||||
module.exports = function () {
|
||||
return extendedBin;
|
||||
};
|
||||
|
37
package-lock.json
generated
37
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hugo-bin",
|
||||
"version": "0.51.2",
|
||||
"name": "@jakejarvis/hugo",
|
||||
"version": "0.63.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -1026,6 +1026,7 @@
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
|
||||
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"locate-path": "^3.0.0"
|
||||
}
|
||||
@@ -1546,22 +1547,11 @@
|
||||
"type-check": "~0.3.2"
|
||||
}
|
||||
},
|
||||
"load-json-file": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz",
|
||||
"integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.15",
|
||||
"parse-json": "^4.0.0",
|
||||
"pify": "^4.0.1",
|
||||
"strip-bom": "^3.0.0",
|
||||
"type-fest": "^0.3.0"
|
||||
}
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
||||
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-locate": "^3.0.0",
|
||||
"path-exists": "^3.0.0"
|
||||
@@ -1922,6 +1912,7 @@
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
|
||||
"integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-try": "^2.0.0"
|
||||
}
|
||||
@@ -1930,6 +1921,7 @@
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
|
||||
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-limit": "^2.0.0"
|
||||
}
|
||||
@@ -1945,7 +1937,8 @@
|
||||
"p-try": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
|
||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
|
||||
"dev": true
|
||||
},
|
||||
"parent-module": {
|
||||
"version": "1.0.1",
|
||||
@@ -2009,15 +2002,6 @@
|
||||
"pinkie": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"pkg-conf": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz",
|
||||
"integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==",
|
||||
"requires": {
|
||||
"find-up": "^3.0.0",
|
||||
"load-json-file": "^5.2.0"
|
||||
}
|
||||
},
|
||||
"prelude-ls": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
|
||||
@@ -2590,11 +2574,6 @@
|
||||
"prelude-ls": "~1.1.2"
|
||||
}
|
||||
},
|
||||
"type-fest": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz",
|
||||
"integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ=="
|
||||
},
|
||||
"unbzip2-stream": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz",
|
||||
|
10
package.json
10
package.json
@@ -1,10 +1,9 @@
|
||||
{
|
||||
"name": "hugo-bin",
|
||||
"version": "0.51.2",
|
||||
"name": "@jakejarvis/hugo",
|
||||
"version": "0.63.2",
|
||||
"hugoVersion": "0.63.2",
|
||||
"description": "Binary wrapper for Hugo",
|
||||
"repository": "fenneclab/hugo-bin",
|
||||
"author": "satoshun00 <shun.sato@fenneclab.com>",
|
||||
"repository": "jakejarvis/hugo-node",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
@@ -12,7 +11,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"bin-wrapper": "^4.1.0",
|
||||
"pkg-conf": "^3.1.0",
|
||||
"rimraf": "^3.0.1",
|
||||
"signale": "^1.4.0"
|
||||
},
|
||||
@@ -33,7 +31,7 @@
|
||||
"index.js"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
"node": ">=10"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "eslint:recommended",
|
||||
|
Reference in New Issue
Block a user