Commit 8987d5e0 authored by Christian Hergert's avatar Christian Hergert
Browse files

npm: fix build target usage

parent de207ddd
......@@ -167,13 +167,13 @@ class NPMBuildTargetProvider(Ide.Object, Ide.BuildTargetProvider):
for name in package_json['scripts']:
if is_ignored_script(name, package_json['scripts']):
continue
task.targets.append(NPMBuildTarget(name, context=self.get_context()))
task.targets.append(self.ensure_child_typed(NPMBuildTarget(name)))
# if no start script is specified, but server.js exists,
# we can still run "npm start"
if 'start' not in package_json['scripts'] and \
project_file.get_parent().get_child('server.js').query_exists(None):
task.targets.append(NPMBuildTarget('start', context=self.get_context()))
task.targets.append(self.ensure_child_typed(NPMBuildTarget('start')))
task.return_boolean(True)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment