From f246f820d53b459596fde6758a09f7a0d7db7c4c Mon Sep 17 00:00:00 2001 From: Anders Darander Date: Mon, 13 Mar 2017 11:01:52 +0100 Subject: devtool/recipetill: npm install of devDependencies Web applications built using e.g. angular2, usually requires that the packages in devDependencies are available. Thus, add an option '--fetch-dev' to both devtool add and recipetool, to add npm packages in devDependencies to DEPENDS. Signed-off-by: Anders Darander Signed-off-by: Ross Burton --- scripts/lib/devtool/standard.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/lib/devtool') diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 5bd498c933..07c1400388 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -150,6 +150,8 @@ def add(args, config, basepath, workspace): extracmdopts += ' --src-subdir "%s"' % args.src_subdir if args.autorev: extracmdopts += ' -a' + if args.fetch_dev: + extracmdopts += ' --fetch-dev' tempdir = tempfile.mkdtemp(prefix='devtool') try: @@ -1823,6 +1825,7 @@ def register_commands(subparsers, context): group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true") group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true") parser_add.add_argument('--fetch', '-f', help='Fetch the specified URI and extract it to create the source tree (deprecated - pass as positional argument instead)', metavar='URI') + parser_add.add_argument('--fetch-dev', help='For npm, also fetch devDependencies', action="store_true") parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)') parser_add.add_argument('--no-git', '-g', help='If fetching source, do not set up source tree as a git repository', action="store_true") parser_add.add_argument('--autorev', '-a', help='When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed', action="store_true") -- cgit v1.2.3