Enforce camel case naming rule (#41)
* Enforce camel case naming rule * more cleanup
This commit is contained in:
Родитель
fa4a25d6bd
Коммит
d9eea6a2d0
|
@ -26,6 +26,12 @@
|
|||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"no-trailing-spaces": "error"
|
||||
"no-trailing-spaces": "error",
|
||||
"camelcase": [
|
||||
"error",
|
||||
{
|
||||
"properties": "always"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
2
all.js
2
all.js
|
@ -489,7 +489,7 @@ function writeConfigH() {
|
|||
}
|
||||
|
||||
module.exports = function (options) {
|
||||
config = readCombinedConfig(options.config_postfix);
|
||||
config = readCombinedConfig(options.configPostfix);
|
||||
|
||||
return {
|
||||
uploadFilesViaScp,
|
||||
|
|
|
@ -18,7 +18,7 @@ function initTasks(gulp, options) {
|
|||
var config = all.getConfig();
|
||||
|
||||
// package:arch:board[:parameters]
|
||||
var board_descriptor = options.board.package + ':' +
|
||||
var boardDescriptor = options.board.package + ':' +
|
||||
options.board.arch + ":" +
|
||||
options.board.board +
|
||||
((options.board.parameters.length > 0) ? (':' + options.board.parameters) : '');
|
||||
|
@ -87,13 +87,13 @@ function initTasks(gulp, options) {
|
|||
gulp.task('build', 'Builds sample code', function (cb) {
|
||||
all.writeConfigH();
|
||||
all.localExecCmd(getArduinoCommand() + ' --verify --board ' +
|
||||
board_descriptor + ' ' + process.cwd() + '/app/app.ino --verbose-build', args.verbose, cb);
|
||||
boardDescriptor + ' ' + process.cwd() + '/app/app.ino --verbose-build', args.verbose, cb);
|
||||
});
|
||||
|
||||
gulp.task('deploy', 'Deploys binary to the device', function (cb) {
|
||||
all.writeConfigH();
|
||||
if (!config.device_port.trim()) {
|
||||
all.localExecCmd(getArduinoCommand() + ' --upload --board ' + board_descriptor +
|
||||
all.localExecCmd(getArduinoCommand() + ' --upload --board ' + boardDescriptor +
|
||||
' --port ' + config.device_port + ' ' + process.cwd() + '/app/app.ino --verbose-upload', args.verbose, cb);
|
||||
} else {
|
||||
cb(new Error('Port is not defined in config'));
|
||||
|
|
|
@ -22,8 +22,8 @@ function initTasks(gulp, options) {
|
|||
|
||||
gulp.task('init', 'Initializes sample', function (cb) {
|
||||
|
||||
if (options.config_postfix && options.config_template) {
|
||||
all.updateGlobalConfig(options.config_postfix, options.config_template);
|
||||
if (options.configPostfix && options.configTemplate) {
|
||||
all.updateGlobalConfig(options.configPostfix, options.configTemplate);
|
||||
}
|
||||
|
||||
cb();
|
||||
|
@ -65,7 +65,7 @@ function initTasks(gulp, options) {
|
|||
fs.mkdirSync('out');
|
||||
|
||||
// in first step just compile sample file
|
||||
var cmd_compile = getCompilerFolder() + '/arm-linux-gnueabihf-gcc ' +
|
||||
var cmdCompile = getCompilerFolder() + '/arm-linux-gnueabihf-gcc ' +
|
||||
// XXX - don't include this
|
||||
//'-I' + PREBUILT_FOLDER + '/raspbian-jessie-sysroot/usr/include ' +
|
||||
'-I' + PREBUILT_FOLDER + '/inc/wiringpi ' +
|
||||
|
@ -79,7 +79,7 @@ function initTasks(gulp, options) {
|
|||
'-c app/' + SAMPLE_NAME + '.c';
|
||||
|
||||
// second step -- link with prebuild libraries
|
||||
var cmd_link = getCompilerFolder() + '/arm-linux-gnueabihf-gcc ' +
|
||||
var cmdLink = getCompilerFolder() + '/arm-linux-gnueabihf-gcc ' +
|
||||
'out/' + SAMPLE_NAME + '.o ' +
|
||||
'-o out/' + SAMPLE_NAME +
|
||||
' -rdynamic ' +
|
||||
|
@ -103,7 +103,7 @@ function initTasks(gulp, options) {
|
|||
'-Wl,-rpath,' + PREBUILT_FOLDER + '/raspbian-jessie-sysroot/usr/lib/arm-linux-gnueabihf,-rpath,'
|
||||
+ PREBUILT_FOLDER + '/raspbian-jessie-sysroot/lib/arm-linux-gnueabihf';
|
||||
|
||||
all.localExecCmds([cmd_compile, cmd_link], args.verbose, cb)
|
||||
all.localExecCmds([cmdCompile, cmdLink], args.verbose, cb)
|
||||
});
|
||||
|
||||
gulp.task('check-raspbian', false, function (cb) {
|
||||
|
|
|
@ -25,8 +25,8 @@ function initTasks(gulp, options) {
|
|||
|
||||
gulp.task('init', 'Initializes sample', function (cb) {
|
||||
|
||||
if (options.config_postfix && options.config_template) {
|
||||
all.updateGlobalConfig(options.config_postfix, options.config_template);
|
||||
if (options.configPostfix && options.configTemplate) {
|
||||
all.updateGlobalConfig(options.configPostfix, options.configTemplate);
|
||||
}
|
||||
|
||||
cb();
|
||||
|
|
Загрузка…
Ссылка в новой задаче