summaryrefslogtreecommitdiff
path: root/scripts/lib/devtool
diff options
context:
space:
mode:
authorAnders Darander <anders@chargestorm.se>2017-03-13 11:01:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-21 22:43:00 +0000
commitf246f820d53b459596fde6758a09f7a0d7db7c4c (patch)
tree88e48ca656a59fc6c4e75da7590cf2902810fbc0 /scripts/lib/devtool
parentf16723f66837a2acad3c114e4064e0ab1cb3a7a6 (diff)
downloadopenembedded-core-f246f820d53b459596fde6758a09f7a0d7db7c4c.tar.gz
openembedded-core-f246f820d53b459596fde6758a09f7a0d7db7c4c.tar.bz2
openembedded-core-f246f820d53b459596fde6758a09f7a0d7db7c4c.zip
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 <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r--scripts/lib/devtool/standard.py3
1 files changed, 3 insertions, 0 deletions
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")