Skip to content

Commit

Permalink
changed predeploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tinaliang committed Jan 24, 2018
1 parent 5206e4c commit 89fe5e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions lib/init/features/functions/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,8 @@ module.exports = function(setup, config) {
default: true
}
]).then(function() {
// Check if machine is windows
var directory = '$RESOURCE_DIR';
if (process.platform === 'win32') {
directory = '%RESOURCE_DIR%';
}
if (setup.functions.lint) {
_.set(setup, 'config.functions.predeploy', ['npm --prefix ' + directory + ' run lint']);
_.set(setup, 'config.functions.predeploy', ['npm --prefix ./functions run lint']);
return config.askWriteProjectFile('functions/package.json', PACKAGE_LINTING_TEMPLATE).then(function() {
config.askWriteProjectFile('functions/.eslintrc.json', ESLINT_TEMPLATE);
});
Expand Down
7 changes: 1 addition & 6 deletions lib/init/features/functions/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@ module.exports = function(setup, config) {
default: true
}
]).then(function() {
// Check if machine is windows
var directory = '$RESOURCE_DIR';
if (process.platform === 'win32') {
directory = '%RESOURCE_DIR%';
}
if (setup.functions.lint) {
_.set(setup, 'config.functions.predeploy', ['npm --prefix ' + directory + ' run lint', 'npm --prefix ' + directory + ' run build']);
_.set(setup, 'config.functions.predeploy', ['npm --prefix ./functions run lint', 'npm --prefix ./functions run build']);
return config.askWriteProjectFile('functions/package.json', PACKAGE_LINTING_TEMPLATE).then(function() {
config.askWriteProjectFile('functions/tslint.json', TSLINT_TEMPLATE);
});
Expand Down

0 comments on commit 89fe5e5

Please sign in to comment.