X Tutup
Skip to content

Commit 1f7296c

Browse files
committed
feat: upgrade clang-format and gulp-clang-format.
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.
1 parent d1f7900 commit 1f7296c

File tree

4 files changed

+279
-165
lines changed

4 files changed

+279
-165
lines changed

gulpfile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
'use strict';
22

33
var autoprefixer = require('gulp-autoprefixer');
4+
var clangFormat = require('clang-format');
45
var del = require('del');
5-
var format = require('gulp-clang-format');
66
var exec = require('child_process').exec;
77
var fork = require('child_process').fork;
88
var gulp = require('gulp');
9+
var gulpFormat = require('gulp-clang-format');
910
var gulpPlugins = require('gulp-load-plugins')();
1011
var sass = require('gulp-sass');
1112
var shell = require('gulp-shell');
@@ -204,7 +205,7 @@ gulp.task('build/pubbuild.dart', pubbuild(gulp, gulpPlugins, {
204205

205206
function doCheckFormat() {
206207
return gulp.src(['modules/**/*.ts', 'tools/**/*.ts', '!**/typings/**/*.d.ts'])
207-
.pipe(format.checkFormat('file'));
208+
.pipe(gulpFormat.checkFormat('file', clangFormat));
208209
}
209210

210211
gulp.task('check-format', function() {

npm-shrinkwrap.clean.json

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,6 +1667,14 @@
16671667
}
16681668
}
16691669
},
1670+
"clang-format": {
1671+
"version": "1.0.25",
1672+
"dependencies": {
1673+
"resolve": {
1674+
"version": "1.1.6"
1675+
}
1676+
}
1677+
},
16701678
"conventional-changelog": {
16711679
"version": "0.0.17",
16721680
"dependencies": {
@@ -3948,13 +3956,10 @@
39483956
}
39493957
},
39503958
"gulp-clang-format": {
3951-
"version": "1.0.19",
3959+
"version": "1.0.21",
39523960
"dependencies": {
3953-
"clang-format": {
3954-
"version": "1.0.21"
3955-
},
39563961
"gulp-util": {
3957-
"version": "3.0.5",
3962+
"version": "3.0.6",
39583963
"dependencies": {
39593964
"array-differ": {
39603965
"version": "1.0.0"
@@ -3997,7 +4002,7 @@
39974002
"version": "4.0.1"
39984003
},
39994004
"meow": {
4000-
"version": "3.1.0",
4005+
"version": "3.3.0",
40014006
"dependencies": {
40024007
"camelcase-keys": {
40034008
"version": "1.0.0",
@@ -4091,10 +4096,49 @@
40914096
}
40924097
},
40934098
"object-assign": {
4094-
"version": "2.0.0"
4099+
"version": "3.0.0"
40954100
},
40964101
"replace-ext": {
40974102
"version": "0.0.1"
4103+
},
4104+
"through2": {
4105+
"version": "2.0.0",
4106+
"dependencies": {
4107+
"readable-stream": {
4108+
"version": "2.0.1",
4109+
"dependencies": {
4110+
"core-util-is": {
4111+
"version": "1.0.1"
4112+
},
4113+
"inherits": {
4114+
"version": "2.0.1"
4115+
},
4116+
"isarray": {
4117+
"version": "0.0.1"
4118+
},
4119+
"process-nextick-args": {
4120+
"version": "1.0.1"
4121+
},
4122+
"string_decoder": {
4123+
"version": "0.10.31"
4124+
},
4125+
"util-deprecate": {
4126+
"version": "1.0.1"
4127+
}
4128+
}
4129+
}
4130+
}
4131+
},
4132+
"vinyl": {
4133+
"version": "0.5.0",
4134+
"dependencies": {
4135+
"clone": {
4136+
"version": "1.0.2"
4137+
},
4138+
"clone-stats": {
4139+
"version": "0.0.1"
4140+
}
4141+
}
40984142
}
40994143
}
41004144
},
@@ -9752,5 +9796,5 @@
97529796
}
97539797
},
97549798
"name": "angular",
9755-
"version": "2.0.0-alpha.27"
9799+
"version": "2.0.0-alpha.28"
97569800
}

0 commit comments

Comments
 (0)
X Tutup