🐛 #8919 - add new command that cleans only out & dist dirs

This commit is contained in:
Adham Saad 2017-03-16 13:34:53 +02:00
parent 3b265747fe
commit 713e256843
2 changed files with 19 additions and 0 deletions

View file

@ -30,6 +30,7 @@
"bump-version": "./script/bump-version.py",
"build": "python ./script/build.py -c D",
"clean": "python ./script/clean.py",
"clean-build": "python ./script/clean-build.py",
"coverage": "npm run instrument-code-coverage && npm test -- --use-instrumented-asar",
"instrument-code-coverage": "electabul instrument --input-path ./lib --output-path ./out/coverage/electron.asar",
"lint": "npm run lint-js && npm run lint-cpp && npm run lint-py && npm run lint-api-docs-js && npm run lint-api-docs",

18
script/clean-build.py Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env python
import os
import sys
from lib.util import rm_rf
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
def main():
os.chdir(SOURCE_ROOT)
rm_rf('dist')
rm_rf('out')
if __name__ == '__main__':
sys.exit(main())