diff options
author | Anders Darander <anders@chargestorm.se> | 2017-03-13 11:01:52 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-22 11:35:20 +0000 |
commit | 6fa0fda1165f05adc9d971a8c873dbbd4ba18d6a (patch) | |
tree | 2980ee319648c05dbe042860d007b1da23dbd342 /scripts/lib/recipetool/create.py | |
parent | 2b52d7ebc0a1dea68bfad8dcb048778ab00c631d (diff) | |
download | poky-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/recipetool/create.py')
-rw-r--r-- | scripts/lib/recipetool/create.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 1be3f14f86..648f2d66fc 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
@@ -599,6 +599,11 @@ def create_recipe(args): | |||
599 | lines_after.append('INSANE_SKIP_${PN} += "already-stripped"') | 599 | lines_after.append('INSANE_SKIP_${PN} += "already-stripped"') |
600 | lines_after.append('') | 600 | lines_after.append('') |
601 | 601 | ||
602 | if args.fetch_dev: | ||
603 | extravalues['fetchdev'] = True | ||
604 | else: | ||
605 | extravalues['fetchdev'] = None | ||
606 | |||
602 | # Find all plugins that want to register handlers | 607 | # Find all plugins that want to register handlers |
603 | logger.debug('Loading recipe handlers') | 608 | logger.debug('Loading recipe handlers') |
604 | raw_handlers = [] | 609 | raw_handlers = [] |
@@ -1134,6 +1139,7 @@ def register_commands(subparsers): | |||
1134 | parser_create.add_argument('--src-subdir', help='Specify subdirectory within source tree to use', metavar='SUBDIR') | 1139 | parser_create.add_argument('--src-subdir', help='Specify subdirectory within source tree to use', metavar='SUBDIR') |
1135 | parser_create.add_argument('-a', '--autorev', help='When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed', action="store_true") | 1140 | parser_create.add_argument('-a', '--autorev', help='When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed', action="store_true") |
1136 | parser_create.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') | 1141 | parser_create.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') |
1142 | parser_create.add_argument('--fetch-dev', action="store_true", help='For npm, also fetch devDependencies') | ||
1137 | parser_create.add_argument('--devtool', action="store_true", help=argparse.SUPPRESS) | 1143 | parser_create.add_argument('--devtool', action="store_true", help=argparse.SUPPRESS) |
1138 | parser_create.set_defaults(func=create_recipe) | 1144 | parser_create.set_defaults(func=create_recipe) |
1139 | 1145 | ||