2.0.0 • Published 3 years ago

grunt-sizediff v2.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

grunt-sizediff

Diff file sizes between current git branch and a branch/commit. Helps you keep an eye on your project size changes.

npm.io

Install

$ npm install --save-dev grunt-sizediff

Usage

require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks

grunt.initConfig({
	sizediff: {
		dist: {
			src: [
				'file.js',
				'file.min.js' // optional
			]
		}
	}
});

grunt.registerTask('default', ['sizediff']);

You can specify two files to diff and an optional target. It falls back to master if target is not specified.

Diff against a branch

sizediff: {
	dist: {
		options: {
			target: 'future' // branch
		},
		src: [
			'file.js',
			'file.min.js'
		]
	}
}

Diff against a commit

sizediff: {
	dist: {
		options: {
			target: 'fd9b092' // commit
		},
		src: [
			'file.js',
			'file.min.js'
		]
	}
}

Override target

You can temporarily override the diff target of a task by running grunt sizediff:dist:target, where dist is the task target you want to override and target is the branch or commit.

License

MIT © Sindre Sorhus

2.0.0

3 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.4.0

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

11 years ago

0.3.0

11 years ago

0.2.1

12 years ago

0.2.0

12 years ago

0.1.0

12 years ago