You've already forked hugo-extended
mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-07-03 19:16:37 -04:00
fix(default): deprecate hugoVersion configuration (#4)
This commit is contained in:
17
README.md
17
README.md
@ -42,23 +42,6 @@ npm run create -- 'post/my-new-post' # see below 'npm-run-script'
|
|||||||
|
|
||||||
See the [Hugo Documentation](https://gohugo.io/) for more information.
|
See the [Hugo Documentation](https://gohugo.io/) for more information.
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
This can be form of a `hugoBin` field in a `package.json` file.
|
|
||||||
|
|
||||||
```
|
|
||||||
{
|
|
||||||
"name": "some-package",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"hugoBin": {
|
|
||||||
"hugoVersion": "0.15"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
- `hugoVersion` - Hugo binary version (defualt: See [`hugo-bin/package.json`](package.json) file).
|
|
||||||
The supported version is `>=0.10`.
|
|
||||||
|
|
||||||
## Full example
|
## Full example
|
||||||
|
|
||||||
- [fenneclab/blog.fenneclab.com](https://github.com/fenneclab/blog.fenneclab.com)
|
- [fenneclab/blog.fenneclab.com](https://github.com/fenneclab/blog.fenneclab.com)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const BinWrapper = require('bin-wrapper');
|
const BinWrapper = require('bin-wrapper');
|
||||||
const pkgConf = require('pkg-conf');
|
|
||||||
const getBinalyName = require('./getBinalyName');
|
const getBinalyName = require('./getBinalyName');
|
||||||
|
const pkg = require('../package');
|
||||||
|
|
||||||
const hugoVersion = pkgConf.sync('hugoBin', {cwd: path.join(__dirname, '../')}).hugoVersion;
|
const hugoVersion = pkg.hugoVersion;
|
||||||
const baseUrl = `https://github.com/spf13/hugo/releases/download/v${hugoVersion}/`;
|
const baseUrl = `https://github.com/spf13/hugo/releases/download/v${hugoVersion}/`;
|
||||||
|
|
||||||
const binalyNames = getBinalyName(hugoVersion, process.platform, process.arch);
|
const binalyNames = getBinalyName(hugoVersion, process.platform, process.arch);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "hugo-bin",
|
"name": "hugo-bin",
|
||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
|
"hugoVersion": "0.16",
|
||||||
"description": "Binary wrapper for Hugo",
|
"description": "Binary wrapper for Hugo",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -38,10 +39,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bin-wrapper": "3.0.2",
|
"bin-wrapper": "3.0.2",
|
||||||
"logalot": "2.1.0",
|
"logalot": "2.1.0",
|
||||||
"pkg-conf": "1.1.3",
|
|
||||||
"semver": "5.1.0"
|
"semver": "5.1.0"
|
||||||
},
|
|
||||||
"hugoBin": {
|
|
||||||
"hugoVersion": "0.16"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user