Skip to content
This repository was archived by the owner on Mar 27, 2019. It is now read-only.

Added an error incase the component.json file is missing the "name" attribute #241

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bin/component-build
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ program.parse(process.argv);

var conf = require(path.resolve('component.json'));

if(!conf.name) throw new Error("This component is missing a name.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we handle this recursively (in component/builder.js), not just the root conf, and maybe something like <path-to-component.json> "name" missing


// standalone

var standalone = program.standalone;
Expand Down