start script in python
This commit is contained in:
21
npm_install.py
Normal file
21
npm_install.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
from os import system
|
||||||
|
from re import findall, match, search
|
||||||
|
from sys import argv
|
||||||
|
|
||||||
|
def npm_create_package_lock_file(package):
|
||||||
|
system("npm i --package-lock-only " + package)
|
||||||
|
|
||||||
|
|
||||||
|
def get_all_urls_packages():
|
||||||
|
return findall("https://.+.tgz", open("package-lock.json", "rt").read())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
npm_create_package_lock_file(argv[1])
|
||||||
|
urls_packages = get_all_urls_packages()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Reference in New Issue
Block a user