summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
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-22 11:35:20 +0000
commit6fa0fda1165f05adc9d971a8c873dbbd4ba18d6a (patch)
tree2980ee319648c05dbe042860d007b1da23dbd342 /scripts/lib/devtool/standard.py
parent2b52d7ebc0a1dea68bfad8dcb048778ab00c631d (diff)
downloadpoky-6fa0fda1165f05adc9d971a8c873dbbd4ba18d6a.tar.gz
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. (From OE-Core rev: f246f820d53b459596fde6758a09f7a0d7db7c4c) Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-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):
150 extracmdopts += ' --src-subdir "%s"' % args.src_subdir 150 extracmdopts += ' --src-subdir "%s"' % args.src_subdir
151 if args.autorev: 151 if args.autorev:
152 extracmdopts += ' -a' 152 extracmdopts += ' -a'
153 if args.fetch_dev:
154 extracmdopts += ' --fetch-dev'
153 155
154 tempdir = tempfile.mkdtemp(prefix='devtool') 156 tempdir = tempfile.mkdtemp(prefix='devtool')
155 try: 157 try:
@@ -1823,6 +1825,7 @@ def register_commands(subparsers, context):
1823 group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true") 1825 group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
1824 group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true") 1826 group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
1825 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') 1827 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')
1828 parser_add.add_argument('--fetch-dev', help='For npm, also fetch devDependencies', action="store_true")
1826 parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)') 1829 parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)')
1827 parser_add.add_argument('--no-git', '-g', help='If fetching source, do not set up source tree as a git repository', action="store_true") 1830 parser_add.add_argument('--no-git', '-g', help='If fetching source, do not set up source tree as a git repository', action="store_true")
1828 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") 1831 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")