1
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:
Shun Sato
2016-06-09 01:08:54 +09:00
parent 69bc327754
commit 75b26fadec
3 changed files with 3 additions and 23 deletions

View File

@ -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.
## 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
- [fenneclab/blog.fenneclab.com](https://github.com/fenneclab/blog.fenneclab.com)

View File

@ -1,9 +1,9 @@
const path = require('path');
const BinWrapper = require('bin-wrapper');
const pkgConf = require('pkg-conf');
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 binalyNames = getBinalyName(hugoVersion, process.platform, process.arch);

View File

@ -1,6 +1,7 @@
{
"name": "hugo-bin",
"version": "0.2.1",
"hugoVersion": "0.16",
"description": "Binary wrapper for Hugo",
"main": "lib/index.js",
"scripts": {
@ -38,10 +39,6 @@
"dependencies": {
"bin-wrapper": "3.0.2",
"logalot": "2.1.0",
"pkg-conf": "1.1.3",
"semver": "5.1.0"
},
"hugoBin": {
"hugoVersion": "0.16"
}
}