From 5ec4e4dcb680e5d72742ef810737cb9defaefc93 Mon Sep 17 00:00:00 2001 From: Golmote Date: Wed, 21 Oct 2015 06:43:17 +0200 Subject: [PATCH] Updated changelog + added gulp task to autolink PRs and commits in changelog --- CHANGELOG.md | 36 ++++++++++++++++++++++++++++++++++++ gulpfile.js | 18 +++++++++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e0fec2d06..65c48169a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,41 @@ # Prism Changelog +## Unreleased + +### New components + +* __AsciiDoc__ ([#800](https://github.com/PrismJS/prism/issues/800)) [[`6803ca0`](https://github.com/PrismJS/prism/commit/6803ca0)] +* __Haxe__ ([#811](https://github.com/PrismJS/prism/issues/811)) [[`bd44341`](https://github.com/PrismJS/prism/commit/bd44341)] +* __Icon__ ([#803](https://github.com/PrismJS/prism/issues/803)) [[`b43c5f3`](https://github.com/PrismJS/prism/commit/b43c5f3)] +* __Lua__ ([#804](https://github.com/PrismJS/prism/issues/804)) [[`a36bc4a`](https://github.com/PrismJS/prism/commit/a36bc4a)] +* __Nix__ ([#795](https://github.com/PrismJS/prism/issues/795)) [[`9b275c8`](https://github.com/PrismJS/prism/commit/9b275c8)] +* __Oz__ ([#805](https://github.com/PrismJS/prism/issues/805)) [[`388c53f`](https://github.com/PrismJS/prism/commit/388c53f)] +* __PARI/GP__ ([#802](https://github.com/PrismJS/prism/issues/802)) [[`253c035`](https://github.com/PrismJS/prism/commit/253c035)] +* __Parser__ ([#808](https://github.com/PrismJS/prism/issues/808)) [[`a953b3a`](https://github.com/PrismJS/prism/commit/a953b3a)] + +### Updated components + +* __C__: + * Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)] +* __C#__: + * Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)] + * Fix detection of float numbers ([#806](https://github.com/PrismJS/prism/issues/806)) [[`1dae72b`](https://github.com/PrismJS/prism/commit/1dae72b)] +* __F#__: + * Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)] +* __JavaScript__: + * Highlight true and false as booleans ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)] + +### New plugins + +* __Previewer: Time__ ([#790](https://github.com/PrismJS/prism/issues/790)) [[`88173de`](https://github.com/PrismJS/prism/commit/88173de)] +* __Previewer: Angle__ ([#791](https://github.com/PrismJS/prism/issues/791)) [[`a434c86`](https://github.com/PrismJS/prism/commit/a434c86)] + +### Other changes + +* Increase mocha's timeout [[`f1c41db`](https://github.com/PrismJS/prism/commit/f1c41db)] +* Prevent most errors in IE8. Fix #9 [[`9652d75`](https://github.com/PrismJS/prism/commit/9652d75)] +* Add U.S. Web Design Standards on homepage. Fix #785 [[`e10d48b`](https://github.com/PrismJS/prism/commit/e10d48b), [`79ebbf8`](https://github.com/PrismJS/prism/commit/79ebbf8), [`2f7088d`](https://github.com/PrismJS/prism/commit/2f7088d)] + ## 1.2.0 (2015-10-07) ### New components diff --git a/gulpfile.js b/gulpfile.js index 25757dba5c..28db7bafcf 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -19,7 +19,8 @@ var gulp = require('gulp'), ], plugins: ['plugins/**/*.js', '!plugins/**/*.min.js'], showLanguagePlugin: 'plugins/show-language/prism-show-language.js', - autoloaderPlugin: 'plugins/autoloader/prism-autoloader.js' + autoloaderPlugin: 'plugins/autoloader/prism-autoloader.js', + changelog: 'CHANGELOG.md' }; gulp.task('components', function() { @@ -113,4 +114,19 @@ gulp.task('languages-plugins', function (cb) { }); }); +gulp.task('changelog', function (cb) { + return gulp.src(paths.changelog) + .pipe(replace( + /\(#(\d+)\)/g, + '([#$1](https://github.com/PrismJS/prism/issues/$1))' + )) + .pipe(replace( + /\[[\da-f]+(?:, *[\da-f]+)*\]/g, + function (match) { + return match.replace(/([\da-f]+)/g, '[`$1`](https://github.com/PrismJS/prism/commit/$1)'); + } + )) + .pipe(gulp.dest('.')); +}); + gulp.task('default', ['components', 'plugins', 'build']);