Skip to content

Commit 2f59326

Browse files
authored
Merge pull request #262 from posthtml/milestone-0.3.2
Milestone 0.3.2
2 parents 531a0c8 + a7d1e4a commit 2f59326

5 files changed

Lines changed: 2120 additions & 1711 deletions

File tree

changelog.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
<a name="0.3.2"></a>
2+
## 0.3.2 (2018-01-21)
3+
4+
* 0.3.2 ([c5643d6](https://github.com/posthtml/posthtml-cli/commit/c5643d6))
5+
* build: drop not use pkg ([5eb2e31](https://github.com/posthtml/posthtml-cli/commit/5eb2e31))
6+
* build: perfomance for scrip ([3840b4e](https://github.com/posthtml/posthtml-cli/commit/3840b4e))
7+
* build: pkf requested eslint ([c6cd37d](https://github.com/posthtml/posthtml-cli/commit/c6cd37d))
8+
* build: update dep ([0ea202e](https://github.com/posthtml/posthtml-cli/commit/0ea202e))
9+
* build: update dep ([0b20e06](https://github.com/posthtml/posthtml-cli/commit/0b20e06))
10+
* build: update depDev ([8911ee0](https://github.com/posthtml/posthtml-cli/commit/8911ee0))
11+
* build: update depDev, clise #261, close #252 ([cc64eca](https://github.com/posthtml/posthtml-cli/commit/cc64eca)), closes [#252](https://github.com/posthtml/posthtml-cli/issues/252)
12+
* test: restore comment tests ([ba5f12d](https://github.com/posthtml/posthtml-cli/commit/ba5f12d))
13+
* chore(changelog): Update changelog ([018f46d](https://github.com/posthtml/posthtml-cli/commit/018f46d))
14+
15+
16+
117
<a name="0.3.1"></a>
218
## 0.3.1 (2017-10-10)
319

@@ -10,7 +26,7 @@
1026
* chore(changelog): Update changelog ([56852a3](https://github.com/posthtml/posthtml-cli/commit/56852a3))
1127
* fix: config file without extension, close #255 ([25c6bb0](https://github.com/posthtml/posthtml-cli/commit/25c6bb0)), closes [#255](https://github.com/posthtml/posthtml-cli/issues/255)
1228
* fix: incorrect argument, close #257 ([68ee0b2](https://github.com/posthtml/posthtml-cli/commit/68ee0b2)), closes [#257](https://github.com/posthtml/posthtml-cli/issues/257)
13-
* test: add for issue #255 ([44e1f7c](https://github.com/posthtml/posthtml-cli/commit/44e1f7c))
29+
* test: add for issue #255 ([44e1f7c](https://github.com/posthtml/posthtml-cli/commit/44e1f7c)), closes [#255](https://github.com/posthtml/posthtml-cli/issues/255)
1430
* style: remove consloe log, close #254 ([682215c](https://github.com/posthtml/posthtml-cli/commit/682215c)), closes [#254](https://github.com/posthtml/posthtml-cli/issues/254)
1531
* perf: not need function for get version from pkg ([563002b](https://github.com/posthtml/posthtml-cli/commit/563002b))
1632

@@ -423,7 +439,7 @@
423439

424440
* bump ([8104b0c](https://github.com/posthtml/posthtml-cli/commit/8104b0c))
425441
* Fixed #39, remove tmp fixed ([01f2367](https://github.com/posthtml/posthtml-cli/commit/01f2367)), closes [#39](https://github.com/posthtml/posthtml-cli/issues/39)
426-
* Update pkg for issue #39 ([5e5e808](https://github.com/posthtml/posthtml-cli/commit/5e5e808))
442+
* Update pkg for issue #39 ([5e5e808](https://github.com/posthtml/posthtml-cli/commit/5e5e808)), closes [#39](https://github.com/posthtml/posthtml-cli/issues/39)
427443
* v0.0.16 ... v0.0.17 ([86eb306](https://github.com/posthtml/posthtml-cli/commit/86eb306))
428444

429445

@@ -521,8 +537,8 @@
521537
## 0.0.11 (2016-01-26)
522538

523539
* Add PostHTML link ([4029634](https://github.com/posthtml/posthtml-cli/commit/4029634))
524-
* Add readme #2 ([066ef10](https://github.com/posthtml/posthtml-cli/commit/066ef10))
525-
* Add readme #2 ([c274c97](https://github.com/posthtml/posthtml-cli/commit/c274c97))
540+
* Add readme #2 ([066ef10](https://github.com/posthtml/posthtml-cli/commit/066ef10)), closes [#2](https://github.com/posthtml/posthtml-cli/issues/2)
541+
* Add readme #2 ([c274c97](https://github.com/posthtml/posthtml-cli/commit/c274c97)), closes [#2](https://github.com/posthtml/posthtml-cli/issues/2)
526542
* bump ([5eba701](https://github.com/posthtml/posthtml-cli/commit/5eba701))
527543
* Fixed #12, update ava and rename bin path to cli.js ([630f80f](https://github.com/posthtml/posthtml-cli/commit/630f80f)), closes [#12](https://github.com/posthtml/posthtml-cli/issues/12)
528544
* Fixed #13, No such file or directory, unix system and add check inpit arguments ([99f552c](https://github.com/posthtml/posthtml-cli/commit/99f552c)), closes [#13](https://github.com/posthtml/posthtml-cli/issues/13)

cli.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,24 @@ var argv = require('yargs')
3434
})
3535
.argv
3636

37-
function processing(file, output) {
37+
function processing (file, output) {
3838
// get htmls
3939
var html = fs.readFileSync(file, 'utf8')
40-
var plugins;
41-
var fileConfig = argv.config && JSON.parse(fs.readFileSync(argv.config, 'utf-8'));
40+
var plugins
41+
var fileConfig = argv.config && JSON.parse(fs.readFileSync(argv.config, 'utf-8'))
4242

4343
if (argv.autoOff) {
44-
var use = argv.use ? argv.use : [];
45-
var cfg = argv.config ? Object.keys(fileConfig) : [];
44+
var use = argv.use ? argv.use : []
45+
var cfg = argv.config ? Object.keys(fileConfig) : []
4646
plugins = [].concat(use, cfg).map((plugin) => {
4747
try {
48-
return require(plugin)(argv[plugin])
48+
return require(plugin)(argv[plugin])
4949
} catch (err) {
50-
if (err.code === 'MODULE_NOT_FOUND') {
51-
throw new TypeError('Plugin Error: Cannot find module ' + plugin);
52-
}
50+
if (err.code === 'MODULE_NOT_FOUND') {
51+
throw new TypeError('Plugin Error: Cannot find module ' + plugin)
52+
}
5353
}
54-
});
54+
})
5555
} else {
5656
// config
5757
var config = {}
@@ -76,21 +76,21 @@ function processing(file, output) {
7676
})
7777
}
7878

79-
function isFile(outputPath) {
79+
function isFile (outputPath) {
8080
if (outputPath === undefined) {
8181
return false
8282
}
8383
return Boolean(path.extname(outputPath))
8484
}
8585

86-
function getOutput(file) {
86+
function getOutput (file) {
8787
if (argv.output === undefined) {
8888
return file
8989
}
9090
return argv.output + path.basename(file)
9191
}
9292

93-
function createFolder(outputPath) {
93+
function createFolder (outputPath) {
9494
if (isFile(outputPath) === true) {
9595
outputPath = path.dirname(outputPath)
9696
}

0 commit comments

Comments
 (0)