Skip to content

Commit

Permalink
Merge branch 'master' into fix-twice-closing
Browse files Browse the repository at this point in the history
  • Loading branch information
yhatt committed Aug 31, 2018
2 parents 9a4d834 + bc38803 commit c991643
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Fix twice element closing by htmlparser2 ([#34](https://github.com/yhatt/markdown-it-incremental-dom/pull/34))

### Added

- Add versioning script ([#35](https://github.com/yhatt/markdown-it-incremental-dom/pull/35))

## v2.0.0 - 2018-08-17

### Breaking
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"prepack": "npm-run-all --npm-path yarn --parallel lint test:coverage --sequential build",
"preversion": "npm-run-all --npm-path yarn --parallel format:check lint test:coverage",
"test": "jest",
"test:coverage": "jest --coverage"
"test:coverage": "jest --coverage",
"version": "node version.js && git add -A CHANGELOG.md"
},
"license": "MIT",
"files": [
Expand Down
14 changes: 14 additions & 0 deletions version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const fs = require('fs')
const path = require('path')

const unreleased = '## [Unreleased]'
const [date] = new Date().toISOString().split('T')
const version = `## v${process.env.npm_package_version} - ${date}`

const changelog = path.resolve(__dirname, 'CHANGELOG.md')
const content = fs.readFileSync(changelog, 'utf8')

fs.writeFileSync(
changelog,
content.replace(unreleased, `${unreleased}\n\n${version}`)
)

0 comments on commit c991643

Please sign in to comment.