Skip to content

Commit

Permalink
feat: upgrade clang-format and gulp-clang-format.
Browse files Browse the repository at this point in the history
This makes sure just running clang-format will use whatever version is
used in the project, by loading it from the closest node_modules folder.

It also moves the clang-format dependency to the top and explicitly
passes it to gulp-clang-format, giving us more control over the version
used.
  • Loading branch information
mprobst committed Jun 26, 2015
1 parent d1f7900 commit 1f7296c
Show file tree
Hide file tree
Showing 4 changed files with 279 additions and 165 deletions.
5 changes: 3 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
'use strict';

var autoprefixer = require('gulp-autoprefixer');
var clangFormat = require('clang-format');
var del = require('del');
var format = require('gulp-clang-format');
var exec = require('child_process').exec;
var fork = require('child_process').fork;
var gulp = require('gulp');
var gulpFormat = require('gulp-clang-format');
var gulpPlugins = require('gulp-load-plugins')();
var sass = require('gulp-sass');
var shell = require('gulp-shell');
Expand Down Expand Up @@ -204,7 +205,7 @@ gulp.task('build/pubbuild.dart', pubbuild(gulp, gulpPlugins, {

function doCheckFormat() {
return gulp.src(['modules/**/*.ts', 'tools/**/*.ts', '!**/typings/**/*.d.ts'])
.pipe(format.checkFormat('file'));
.pipe(gulpFormat.checkFormat('file', clangFormat));
}

gulp.task('check-format', function() {
Expand Down
60 changes: 52 additions & 8 deletions npm-shrinkwrap.clean.json
Original file line number Diff line number Diff line change
Expand Up @@ -1667,6 +1667,14 @@
}
}
},
"clang-format": {
"version": "1.0.25",
"dependencies": {
"resolve": {
"version": "1.1.6"
}
}
},
"conventional-changelog": {
"version": "0.0.17",
"dependencies": {
Expand Down Expand Up @@ -3948,13 +3956,10 @@
}
},
"gulp-clang-format": {
"version": "1.0.19",
"version": "1.0.21",
"dependencies": {
"clang-format": {
"version": "1.0.21"
},
"gulp-util": {
"version": "3.0.5",
"version": "3.0.6",
"dependencies": {
"array-differ": {
"version": "1.0.0"
Expand Down Expand Up @@ -3997,7 +4002,7 @@
"version": "4.0.1"
},
"meow": {
"version": "3.1.0",
"version": "3.3.0",
"dependencies": {
"camelcase-keys": {
"version": "1.0.0",
Expand Down Expand Up @@ -4091,10 +4096,49 @@
}
},
"object-assign": {
"version": "2.0.0"
"version": "3.0.0"
},
"replace-ext": {
"version": "0.0.1"
},
"through2": {
"version": "2.0.0",
"dependencies": {
"readable-stream": {
"version": "2.0.1",
"dependencies": {
"core-util-is": {
"version": "1.0.1"
},
"inherits": {
"version": "2.0.1"
},
"isarray": {
"version": "0.0.1"
},
"process-nextick-args": {
"version": "1.0.1"
},
"string_decoder": {
"version": "0.10.31"
},
"util-deprecate": {
"version": "1.0.1"
}
}
}
}
},
"vinyl": {
"version": "0.5.0",
"dependencies": {
"clone": {
"version": "1.0.2"
},
"clone-stats": {
"version": "0.0.1"
}
}
}
}
},
Expand Down Expand Up @@ -9752,5 +9796,5 @@
}
},
"name": "angular",
"version": "2.0.0-alpha.27"
"version": "2.0.0-alpha.28"
}
Loading

0 comments on commit 1f7296c

Please sign in to comment.