Skip to content

Commit

Permalink
fix(default): deprecate hugoVersion configuration (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshun00 committed Jun 8, 2016
1 parent 69bc327 commit 75b26fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions lib/binary.js
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "hugo-bin",
"version": "0.2.1",
"hugoVersion": "0.16",
"description": "Binary wrapper for Hugo",
"main": "lib/index.js",
"scripts": {
Expand Down Expand Up @@ -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"
}
}

0 comments on commit 75b26fa

Please sign in to comment.