Skip to content

Commit

Permalink
chore: add CHANGELOG and add a task to re-generate it
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeanroy committed Aug 21, 2017
1 parent d774af3 commit 9294565
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 31 deletions.
111 changes: 111 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<a name="0.4.0"></a>
# 0.4.0 (2017-05-10)

* release: prepare next release ([0f44fc8](https://github.com/mjeanroy/rollup-plugin-license/commit/0f44fc8))
* release: release version ([4c4a2df](https://github.com/mjeanroy/rollup-plugin-license/commit/4c4a2df))
* docs: update README ([2a77666](https://github.com/mjeanroy/rollup-plugin-license/commit/2a77666))
* docs(readme): add Greenkeeper badge ([c62d5b9](https://github.com/mjeanroy/rollup-plugin-license/commit/c62d5b9))
* Update package.json ([7ea307e](https://github.com/mjeanroy/rollup-plugin-license/commit/7ea307e))
* Update README.md ([3f43530](https://github.com/mjeanroy/rollup-plugin-license/commit/3f43530))
* Update README.md ([1ef8a12](https://github.com/mjeanroy/rollup-plugin-license/commit/1ef8a12))
* fix(package): update magic-string to version 0.19.1 ([c21ed09](https://github.com/mjeanroy/rollup-plugin-license/commit/c21ed09))
* chore(package): update dependencies ([be2b50b](https://github.com/mjeanroy/rollup-plugin-license/commit/be2b50b))
* core: add strict mode to src files ([e46fc9a](https://github.com/mjeanroy/rollup-plugin-license/commit/e46fc9a))



<a name="0.3.0"></a>
# 0.3.0 (2017-03-02)

* release: prepare next release ([74c43fc](https://github.com/mjeanroy/rollup-plugin-license/commit/74c43fc))
* release: release version ([640a02e](https://github.com/mjeanroy/rollup-plugin-license/commit/640a02e))
* core: add option to use custom encoding ([90c5c1e](https://github.com/mjeanroy/rollup-plugin-license/commit/90c5c1e))
* core: banner can be a simple string ([0f4dde0](https://github.com/mjeanroy/rollup-plugin-license/commit/0f4dde0))
* core: fix variable duplication ([67726e0](https://github.com/mjeanroy/rollup-plugin-license/commit/67726e0))
* core: update babel ([b3a185b](https://github.com/mjeanroy/rollup-plugin-license/commit/b3a185b))
* core: update eslint ([24fea22](https://github.com/mjeanroy/rollup-plugin-license/commit/24fea22))
* core: update eslint ([37cf26a](https://github.com/mjeanroy/rollup-plugin-license/commit/37cf26a))
* core: update gulp-bump ([db8460e](https://github.com/mjeanroy/rollup-plugin-license/commit/db8460e))
* core: update gulp-git ([1dbc6ab](https://github.com/mjeanroy/rollup-plugin-license/commit/1dbc6ab))
* core: update gulp-util ([b47177a](https://github.com/mjeanroy/rollup-plugin-license/commit/b47177a))
* core: update lodash ([7962734](https://github.com/mjeanroy/rollup-plugin-license/commit/7962734))
* core: update magic-string ([be8d7ae](https://github.com/mjeanroy/rollup-plugin-license/commit/be8d7ae))
* core: update moment ([bc8e7fd](https://github.com/mjeanroy/rollup-plugin-license/commit/bc8e7fd))
* core: update npmignore list ([dc93e13](https://github.com/mjeanroy/rollup-plugin-license/commit/dc93e13))
* refactor: use commenting package to generate block comment ([2355891](https://github.com/mjeanroy/rollup-plugin-license/commit/2355891))
* Fixed example banner typo in documentation ([b12dbe8](https://github.com/mjeanroy/rollup-plugin-license/commit/b12dbe8))



<a name="0.2.0"></a>
# 0.2.0 (2016-12-03)

* release: prepare next release ([a679f2e](https://github.com/mjeanroy/rollup-plugin-license/commit/a679f2e))
* release: release version ([2d7d351](https://github.com/mjeanroy/rollup-plugin-license/commit/2d7d351))
* feat: do not generate sourceMap if it is not needed ([cfc88db](https://github.com/mjeanroy/rollup-plugin-license/commit/cfc88db))
* core: update gitignore ([116fd74](https://github.com/mjeanroy/rollup-plugin-license/commit/116fd74))



<a name="0.1.2"></a>
## 0.1.2 (2016-11-28)

* release: prepare next release ([125ab51](https://github.com/mjeanroy/rollup-plugin-license/commit/125ab51))
* release: release version ([27b410f](https://github.com/mjeanroy/rollup-plugin-license/commit/27b410f))
* core: add missing fields in package.json ([e8a67d5](https://github.com/mjeanroy/rollup-plugin-license/commit/e8a67d5))



<a name="0.1.1"></a>
## 0.1.1 (2016-11-28)

* release: prepare next release ([d7a2d5a](https://github.com/mjeanroy/rollup-plugin-license/commit/d7a2d5a))
* release: release version ([21c7355](https://github.com/mjeanroy/rollup-plugin-license/commit/21c7355))
* fix: create directory if needed ([2d2904f](https://github.com/mjeanroy/rollup-plugin-license/commit/2d2904f))
* core: add travis file ([aab2c38](https://github.com/mjeanroy/rollup-plugin-license/commit/aab2c38))



<a name="0.1.0"></a>
# 0.1.0 (2016-11-25)

* release: release version ([f1207d1](https://github.com/mjeanroy/rollup-plugin-license/commit/f1207d1))
* docs: add README ([fa587c1](https://github.com/mjeanroy/rollup-plugin-license/commit/fa587c1))
* docs: update package description ([84360db](https://github.com/mjeanroy/rollup-plugin-license/commit/84360db))
* feat: add debug mode ([7d26653](https://github.com/mjeanroy/rollup-plugin-license/commit/7d26653))
* feat: add optional prefix and suffix to the output ([2fec575](https://github.com/mjeanroy/rollup-plugin-license/commit/2fec575))
* feat: add package variable in template ([937188f](https://github.com/mjeanroy/rollup-plugin-license/commit/937188f))
* feat: add plugin name field ([b14b430](https://github.com/mjeanroy/rollup-plugin-license/commit/b14b430))
* feat: analyze dependencies when loaded ([a518ad7](https://github.com/mjeanroy/rollup-plugin-license/commit/a518ad7))
* feat: display default messages without dependencies ([c84fc27](https://github.com/mjeanroy/rollup-plugin-license/commit/c84fc27))
* feat: do not fail if banner file does not exist ([828d912](https://github.com/mjeanroy/rollup-plugin-license/commit/828d912))
* feat: normalize author, contributors and license fields ([8652b07](https://github.com/mjeanroy/rollup-plugin-license/commit/8652b07))
* feat: output third party licenses in a single file ([10c9ab2](https://github.com/mjeanroy/rollup-plugin-license/commit/10c9ab2))
* feat: the default banner is the LICENSE file ([635e2c0](https://github.com/mjeanroy/rollup-plugin-license/commit/635e2c0))
* feat: use a cache to avoid directory scan if not necessary ([79b2379](https://github.com/mjeanroy/rollup-plugin-license/commit/79b2379))
* fix: add missing package fields ([48b97dc](https://github.com/mjeanroy/rollup-plugin-license/commit/48b97dc))
* fix: always generate sourceMap ([d674531](https://github.com/mjeanroy/rollup-plugin-license/commit/d674531))
* fix: do not add dependency more than once ([8ae542b](https://github.com/mjeanroy/rollup-plugin-license/commit/8ae542b))
* fix: the transformBundle function must be synchronous ([a043f0a](https://github.com/mjeanroy/rollup-plugin-license/commit/a043f0a))
* core: add eslint ([e522c6e](https://github.com/mjeanroy/rollup-plugin-license/commit/e522c6e))
* core: add npmignore file ([54e79cc](https://github.com/mjeanroy/rollup-plugin-license/commit/54e79cc))
* core: add nvmrc file ([22cd04f](https://github.com/mjeanroy/rollup-plugin-license/commit/22cd04f))
* core: add release tasks ([6df8e78](https://github.com/mjeanroy/rollup-plugin-license/commit/6df8e78))
* core: update dependencies ([53a2125](https://github.com/mjeanroy/rollup-plugin-license/commit/53a2125))
* core: use babel transpilation ([3da64ce](https://github.com/mjeanroy/rollup-plugin-license/commit/3da64ce))
* core: use static version for dependencies ([4761a1a](https://github.com/mjeanroy/rollup-plugin-license/commit/4761a1a))
* refactor: banner file option is inside a banner field ([ebbff0a](https://github.com/mjeanroy/rollup-plugin-license/commit/ebbff0a))
* refactor: cleanup gulpfile ([a1db8b2](https://github.com/mjeanroy/rollup-plugin-license/commit/a1db8b2))
* refactor: do not prepend default banner ([688f279](https://github.com/mjeanroy/rollup-plugin-license/commit/688f279))
* refactor: do not use toString to format objects ([1c7eb98](https://github.com/mjeanroy/rollup-plugin-license/commit/1c7eb98))
* refactor: extract private functions to module ([d905d21](https://github.com/mjeanroy/rollup-plugin-license/commit/d905d21))
* refactor: plugin does not return instance of class ([9fcb00a](https://github.com/mjeanroy/rollup-plugin-license/commit/9fcb00a))
* refactor: remove parse-author dependency ([67476bb](https://github.com/mjeanroy/rollup-plugin-license/commit/67476bb))
* refactor: remove private function ([a130286](https://github.com/mjeanroy/rollup-plugin-license/commit/a130286))
* refactor: remove unused variable ([0d66d2e](https://github.com/mjeanroy/rollup-plugin-license/commit/0d66d2e))
* refactor: use class for dependency and author objects ([65f24f8](https://github.com/mjeanroy/rollup-plugin-license/commit/65f24f8))
* refactor: use only single return when possible ([0ba7a47](https://github.com/mjeanroy/rollup-plugin-license/commit/0ba7a47))
* init: initialize project ([813518c](https://github.com/mjeanroy/rollup-plugin-license/commit/813518c))



67 changes: 36 additions & 31 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,76 +30,81 @@ const babel = require('gulp-babel');
const del = require('del');
const eslint = require('gulp-eslint');
const gutil = require('gulp-util');
const conventionalChangelog = require('gulp-conventional-changelog');
const git = require('gulp-git');
const bump = require('gulp-bump');
const runSequence = require('run-sequence');

const root = path.join(__dirname);
const config = {
src: path.join(root, 'src'),
test: path.join(root, 'test'),
dist: path.join(root, 'dist'),
};
const ROOT = __dirname;
const SRC = path.join(ROOT, 'src');
const TEST = path.join(ROOT, 'test');
const DIST = path.join(ROOT, 'dist');

gulp.task('test', ['build'], () => {
const src = [
path.join(config.test, 'base.spec.js'),
path.join(config.test, '**', '*.spec.js'),
path.join(TEST, 'base.spec.js'),
path.join(TEST, '**', '*.spec.js'),
];

return gulp
.src(src)
.pipe(jasmine());
return gulp.src(src).pipe(jasmine());
});

gulp.task('clean', () => {
return del([config.dist]);
return del([DIST]);
});

gulp.task('build', ['clean', 'lint'], () => {
return gulp
.src(path.join(config.src, '*.js'))
return gulp.src(path.join(SRC, '*.js'))
.pipe(babel())
.pipe(gulp.dest(path.join(__dirname, 'dist')));
.pipe(gulp.dest(DIST));
});

gulp.task('lint', () => {
const srcFiles = path.join(config.src, '**', '*.js');
const testFiles = path.join(config.test, '**', '*.js');
return gulp
.src([srcFiles, testFiles])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
const src = [
path.join(SRC, '**', '*.js'),
path.join(TEST, '**', '*.js'),
];

return gulp.src(src)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

gulp.task('changelog', () => {
const changelog = path.join(ROOT, 'CHANGELOG.md');
return gulp.src(changelog, {buffer: false})
.pipe(conventionalChangelog({
releaseCount: 0,
}))
.pipe(gulp.dest(ROOT));
});

gulp.task('commit:pre', () => {
const dist = path.join(__dirname, 'dist');
const packageJson = path.join(__dirname, 'package.json');
return gulp.src([packageJson, dist])
const packageJson = path.join(ROOT, 'package.json');
return gulp.src([packageJson, DIST])
.pipe(git.add({args: '-f'}))
.pipe(git.commit('release: release version'));
});

gulp.task('commit:post', () => {
const dist = path.join(__dirname, 'dist');
return gulp.src(dist)
return gulp.src(DIST)
.pipe(git.rm({args: '-r'}))
.pipe(git.commit('release: prepare next release'));
});

gulp.task('tag', (done) => {
const pkg = fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8');
const version = JSON.parse(pkg).version;
const pkg = require(path.join(ROOT, 'package.json'));
const version = pkg.version;
git.tag(`v${version}`, `release: tag version ${version}`, done);
});

['major', 'minor', 'patch'].forEach((level) => {
gulp.task(`bump:${level}`, () => {
return gulp.src(path.join(__dirname, 'package.json'))
return gulp.src(path.join(ROOT, 'package.json'))
.pipe(bump({type: level})
.on('error', gutil.log))
.pipe(gulp.dest(__dirname));
.pipe(gulp.dest(ROOT));
});

gulp.task('release:' + level, ['build'], () => {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"clean": "gulp clean",
"build": "gulp build",
"test": "gulp test",
"changelog": "gulp changelog",
"release": "gulp release:minor",
"release:patch": "gulp release:patch",
"release:minor": "gulp release:minor",
Expand Down Expand Up @@ -43,6 +44,7 @@
"gulp": "3.9.1",
"gulp-babel": "7.0.0",
"gulp-bump": "2.7.0",
"gulp-conventional-changelog": "1.1.4",
"gulp-eslint": "4.0.0",
"gulp-git": "2.4.2",
"gulp-jasmine": "2.4.2",
Expand Down

0 comments on commit 9294565

Please sign in to comment.