[gnome-builder/gnome-builder-3-32] npm: fix run support with npm



commit 737715fed7605336309079bb5c2d9a8afa81dfec
Author: Christian Hergert <chergert redhat com>
Date:   Mon Apr 29 12:03:28 2019 -0700

    npm: fix run support with npm
    
    Fixes #888

 src/plugins/npm/npm_plugin.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/npm/npm_plugin.py b/src/plugins/npm/npm_plugin.py
index f920d7ca0..fbc0ef590 100644
--- a/src/plugins/npm/npm_plugin.py
+++ b/src/plugins/npm/npm_plugin.py
@@ -175,13 +175,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(self.ensure_child_typed(NPMBuildTarget(name)))
+            task.targets.append(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(self.ensure_child_typed(NPMBuildTarget('start')))
+                task.targets.append(NPMBuildTarget('start'))
 
         task.return_boolean(True)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]