Skip to content

Commit

Permalink
change the default config filename from .project.info.json to .projec…
Browse files Browse the repository at this point in the history
…t-info.json
  • Loading branch information
ByIvo committed Feb 1, 2018
1 parent d44596e commit 4723164
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/configfile_finder/configfile-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function parseFileContent(path) {

return JSON.parse(fileContent);
}catch(err) {
console.error(err);
var message = 'The config file in path \'' + path + '\' needs to be a json file.';
throw Error(message);
}
Expand Down
2 changes: 1 addition & 1 deletion src/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ describe("index.js", function () {
var projectProperties = projectInfo.from(fakeRealPath);

expect(projectProperties).to.deep.equal({name: 'fake'});
expect(propertiesCreator.create.getCall(0).args[1]).to.equal('.project.info.json');
expect(propertiesCreator.create.getCall(0).args[1]).to.equal('.project-info.json');
});
});
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {

function from (path, configFilename) {
var validPath = fs.existsSync(path);
configFilename = configFilename || '.project.info.json';
configFilename = configFilename || '.project-info.json';

if(!validPath) {
throw Error('Path "' + path + '" does not exists!');
Expand Down

0 comments on commit 4723164

Please sign in to comment.