mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
17 lines
524 B
JavaScript
17 lines
524 B
JavaScript
'use strict';
|
|
|
|
const path = require('path');
|
|
const fileExistsSync = require('./fs/fileExistsSync');
|
|
|
|
const serverlessConfigFileExists = function (servicePath) {
|
|
const ymlExists = fileExistsSync(path.join(servicePath, 'serverless.yml'));
|
|
const yamlExists = fileExistsSync(path.join(servicePath, 'serverless.yaml'));
|
|
const jsonExists = fileExistsSync(path.join(servicePath, 'serverless.json'));
|
|
|
|
if (ymlExists || yamlExists || jsonExists) return true;
|
|
|
|
return false;
|
|
};
|
|
|
|
module.exports = serverlessConfigFileExists;
|