Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
## <small>0.5.2 (2020-01-21)</small>

* fix: after update dep ([4ecb916](https://github.com/posthtml/posthtml-cli/commit/4ecb916))
* build: update dep dev ([af63894](https://github.com/posthtml/posthtml-cli/commit/af63894))



## <small>0.5.1 (2019-06-28)</small>

* ci: try fix in windows ([ad49a51](https://github.com/posthtml/posthtml-cli/commit/ad49a51))
* 0.5.1 ([16fbf31](https://github.com/posthtml/posthtml-cli/commit/16fbf31))
* build: add path in test script ([efa1950](https://github.com/posthtml/posthtml-cli/commit/efa1950))
* build: update changelog ([603a125](https://github.com/posthtml/posthtml-cli/commit/603a125))
* ci: try fix in windows ([ad49a51](https://github.com/posthtml/posthtml-cli/commit/ad49a51))
* fix: if plugins is array ([f550f11](https://github.com/posthtml/posthtml-cli/commit/f550f11))
* test: expected for plugins array ([df36e4f](https://github.com/posthtml/posthtml-cli/commit/df36e4f))
* test: when plugins array ([1c1b3db](https://github.com/posthtml/posthtml-cli/commit/1c1b3db))
Expand Down Expand Up @@ -52,6 +61,7 @@
* docs: drop support old node ([855f953](https://github.com/posthtml/posthtml-cli/commit/855f953))
* test: fix party normalize ([37d5d42](https://github.com/posthtml/posthtml-cli/commit/37d5d42))
* test: normalize path, close #279 ([70c0936](https://github.com/posthtml/posthtml-cli/commit/70c0936)), closes [#279](https://github.com/posthtml/posthtml-cli/issues/279)
* fix: clarify external config format ([c673d18](https://github.com/posthtml/posthtml-cli/commit/c673d18))



Expand All @@ -77,7 +87,6 @@
* build: update changelog ([7e497a9](https://github.com/posthtml/posthtml-cli/commit/7e497a9))
* build: update depDev ([6e12b94](https://github.com/posthtml/posthtml-cli/commit/6e12b94))
* ci: bump to node 10 ([ffeb119](https://github.com/posthtml/posthtml-cli/commit/ffeb119))
* fix: clarify external config format ([c673d18](https://github.com/posthtml/posthtml-cli/commit/c673d18))



Expand Down Expand Up @@ -379,11 +388,14 @@

## <small>0.2.6 (2016-09-08)</small>

* 0.2.5 ([06cd83c](https://github.com/posthtml/posthtml-cli/commit/06cd83c))
* 0.2.6 ([780c653](https://github.com/posthtml/posthtml-cli/commit/780c653))
* docs(readme): fix patch to license ([fa37204](https://github.com/posthtml/posthtml-cli/commit/fa37204))
* docs(readme): remove semi-colons ([9f86f2b](https://github.com/posthtml/posthtml-cli/commit/9f86f2b))
* chore(changelog): Update changelog ([a0afcb8](https://github.com/posthtml/posthtml-cli/commit/a0afcb8))
* chore(changelog): Update changelog ([b5a6160](https://github.com/posthtml/posthtml-cli/commit/b5a6160))
* chore(package): add auto node publish ([6096ac9](https://github.com/posthtml/posthtml-cli/commit/6096ac9))
* chore(package): add testen for test support list node ([b044e81](https://github.com/posthtml/posthtml-cli/commit/b044e81))
* chore(package): update ava to version 0.16.0 ([7b41df2](https://github.com/posthtml/posthtml-cli/commit/7b41df2))
* chore(package): update clinton to version 0.8.0 ([174f1f1](https://github.com/posthtml/posthtml-cli/commit/174f1f1))
* chore(package): update eslint-formatter-pretty to version 0.3.0 ([530070f](https://github.com/posthtml/posthtml-cli/commit/530070f))
Expand All @@ -404,16 +416,10 @@
* style(*): fix clinton report recommendation ([c62395e](https://github.com/posthtml/posthtml-cli/commit/c62395e))
* style(package): bump version v0.2.5 ([aa01917](https://github.com/posthtml/posthtml-cli/commit/aa01917))
* style(package): update author info ([eb8383f](https://github.com/posthtml/posthtml-cli/commit/eb8383f))
* 0.2.5 ([06cd83c](https://github.com/posthtml/posthtml-cli/commit/06cd83c))
* Create MAINTAINERS ([d87f6dd](https://github.com/posthtml/posthtml-cli/commit/d87f6dd))
* return reverse to only node 6 ([a12431f](https://github.com/posthtml/posthtml-cli/commit/a12431f))
* Update MAINTAINERS ([c2a2908](https://github.com/posthtml/posthtml-cli/commit/c2a2908))
* chore(package): add auto node publish ([6096ac9](https://github.com/posthtml/posthtml-cli/commit/6096ac9))
* chore(package): add auto node publish ([0ca5d7f](https://github.com/posthtml/posthtml-cli/commit/0ca5d7f))
* chore(package): add changelog-cli generator ([ee55422](https://github.com/posthtml/posthtml-cli/commit/ee55422))
* chore(package): add clinton ([3631eb8](https://github.com/posthtml/posthtml-cli/commit/3631eb8))
* chore(package): add conventional changelog linter ([2fedad3](https://github.com/posthtml/posthtml-cli/commit/2fedad3))
* chore(package): add testen for test support list node ([b044e81](https://github.com/posthtml/posthtml-cli/commit/b044e81))
* chore(package): add testen for testin support node version ([16f98d6](https://github.com/posthtml/posthtml-cli/commit/16f98d6))
* chore(package): change engines node support version ([5640c93](https://github.com/posthtml/posthtml-cli/commit/5640c93))
* chore(package): change xo to eslint ([dbc509e](https://github.com/posthtml/posthtml-cli/commit/dbc509e))
Expand All @@ -424,16 +430,19 @@
* docs(readme): add icon node support ([a70ac5d](https://github.com/posthtml/posthtml-cli/commit/a70ac5d))
* docs(readme): add testen icons ([44c8c57](https://github.com/posthtml/posthtml-cli/commit/44c8c57))
* docs(readme): fix linter error ([d176533](https://github.com/posthtml/posthtml-cli/commit/d176533))
* Create MAINTAINERS ([d87f6dd](https://github.com/posthtml/posthtml-cli/commit/d87f6dd))
* Fixed linter report error ([e6e0c16](https://github.com/posthtml/posthtml-cli/commit/e6e0c16))
* return reverse to only node 6 ([a12431f](https://github.com/posthtml/posthtml-cli/commit/a12431f))
* Update devDep ([dab5cc5](https://github.com/posthtml/posthtml-cli/commit/dab5cc5))
* Update MAINTAINERS ([c2a2908](https://github.com/posthtml/posthtml-cli/commit/c2a2908))



## <small>0.2.4 (2016-06-16)</small>

* bump ([89e5c62](https://github.com/posthtml/posthtml-cli/commit/89e5c62))
* Fixed #94, try to return support old node ([203d3d7](https://github.com/posthtml/posthtml-cli/commit/203d3d7)), closes [#94](https://github.com/posthtml/posthtml-cli/issues/94)
* Fixed linter report error ([e6e0c16](https://github.com/posthtml/posthtml-cli/commit/e6e0c16))
* not support less node 6 ([09b1776](https://github.com/posthtml/posthtml-cli/commit/09b1776))
* Update devDep ([dab5cc5](https://github.com/posthtml/posthtml-cli/commit/dab5cc5))
* Update package.json ([ff9af7d](https://github.com/posthtml/posthtml-cli/commit/ff9af7d))
* Update package.json ([345ce01](https://github.com/posthtml/posthtml-cli/commit/345ce01))
* Update README.md ([6bcc5b0](https://github.com/posthtml/posthtml-cli/commit/6bcc5b0))
Expand Down
68 changes: 34 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "posthtml-cli",
"version": "0.5.1",
"version": "0.5.2",
"description": "CLI for posthtml",
"license": "MIT",
"repository": "posthtml/posthtml-cli",
Expand Down Expand Up @@ -34,52 +34,52 @@
"cli"
],
"dependencies": {
"cosmiconfig": "^5.2.1",
"fast-glob": "^3.0.2",
"cosmiconfig": "^6.0.0",
"fast-glob": "^3.1.1",
"make-dir": "^3.0.0",
"meow": "^5.0.0",
"merge-options": "^1.0.1",
"posthtml": "^0.11.4",
"meow": "^6.0.0",
"merge-options": "^2.0.0",
"posthtml": "^0.12.0",
"to-camel-case": "^1.0.0"
},
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/node": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@babel/register": "^7.4.4",
"@commitlint/cli": "^8.0.0",
"@commitlint/config-angular": "^8.0.0",
"acorn": "^6.1.1",
"@babel/cli": "^7.8.3",
"@babel/core": "^7.8.3",
"@babel/node": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"@babel/register": "^7.8.3",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-angular": "^8.3.4",
"acorn": "^7.1.0",
"ava": "*",
"babel-eslint": "^10.0.2",
"babel-preset-minify": "^0.5.0",
"babel-eslint": "^10.0.3",
"babel-preset-minify": "^0.5.1",
"clinton": "^0.14.0",
"conventional-changelog-cli": "^2.0.21",
"coveralls": "^3.0.4",
"cpy": "^7.3.0",
"eslint": "^6.0.1",
"eslint-config-xo": "^0.26.0",
"eslint-config-xo-space": "^0.21.0",
"eslint-plugin-ava": "^7.1.0",
"conventional-changelog-cli": "^2.0.31",
"coveralls": "^3.0.9",
"cpy": "^8.0.0",
"eslint": "^6.8.0",
"eslint-config-xo": "^0.27.2",
"eslint-config-xo-space": "^0.22.0",
"eslint-plugin-ava": "^10.0.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-markdown": "^1.0.0",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-markdown": "^1.0.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-unicorn": "^9.1.1",
"execa": "^2.0.0",
"husky": "^2.5.0",
"eslint-plugin-unicorn": "^15.0.1",
"execa": "^4.0.0",
"husky": "^4.0.10",
"is-promise": "^2.1.0",
"lint-staged": "^8.2.1",
"lint-staged": "^10.0.1",
"merge": "^1.2.1",
"nyc": "^14.1.1",
"nyc": "^15.0.0",
"posthtml-bem": "^0.2.2",
"posthtml-css-modules": "^0.1.3",
"posthtml-custom-elements": "^1.1.1",
"read-pkg": "^5.1.1",
"rimraf": "^2.6.3",
"read-pkg": "^5.2.0",
"rimraf": "^3.0.0",
"tempfile": "^3.0.0"
},
"readme": "posthtml/posthtml-cli/readme",
Expand Down Expand Up @@ -108,7 +108,7 @@
"@babel/preset-env",
{
"targets": {
"node": 6
"node": 8
}
}
],
Expand Down
8 changes: 4 additions & 4 deletions src/cfg-resolve.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import cosmiconfig from 'cosmiconfig';
import {cosmiconfigSync} from 'cosmiconfig';
import toCamelCase from 'to-camel-case';
import mergeOptions from 'merge-options';

export default ({input, flags = {}}) => {
const explorer = cosmiconfig('posthtml');
const explorer = cosmiconfigSync('posthtml');
let {config, use, output} = flags;

if (config) {
({config} = explorer.loadSync(config));
({config} = explorer.load(config));
}

if (use) {
use = [].concat(use).reduce((cfg, key) => mergeOptions(cfg, {plugins: {[key]: flags[toCamelCase(key)] || {}}}), {});
}

if (!config && !use) {
({config} = explorer.searchSync());
({config} = explorer.search());
}

return mergeOptions({
Expand Down
2 changes: 1 addition & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const cli = meow(`
alias: 'o'
},
use: {
type: 'Array',
type: 'array',
alias: 'u'
}
}
Expand Down