def _npm_install_static():
print("NPM Install packages...")
static_path = os.path.join(CWD, "application/static")
package_json = os.path.join(static_path, "package.json")
try:
if os.path.isfile(package_json):
with sh.pushd(static_path):
sh.npm("install", "-f")
else:
print("**ERROR: Can't install static files, `package.json` is missing at `%s`" % package_json)
print("*" * 80)
except sh.CommandNotFound as e:
print("")
print("*** Error Command Not Found: `{0}` is not found. You need to install `{0}` to continue".format(str(e)))
print("*" * 80)
评论列表
文章目录