Merge pull request #8381 from electron/lint-without-side-effects
create electron-api.json in dist, not as a side-effect of linting
This commit is contained in:
commit
75e81f00e2
2 changed files with 5 additions and 4 deletions
|
@ -37,7 +37,7 @@
|
||||||
"lint-cpp": "python ./script/cpplint.py",
|
"lint-cpp": "python ./script/cpplint.py",
|
||||||
"lint-py": "python ./script/pylint.py",
|
"lint-py": "python ./script/pylint.py",
|
||||||
"lint-api-docs-js": "standard-markdown docs && standard-markdown docs-translations",
|
"lint-api-docs-js": "standard-markdown docs && standard-markdown docs-translations",
|
||||||
"lint-api-docs": "electron-docs-linter --outfile=out/electron-api.json",
|
"lint-api-docs": "electron-docs-linter",
|
||||||
"preinstall": "node -e 'process.exit(0)'",
|
"preinstall": "node -e 'process.exit(0)'",
|
||||||
"release": "./script/upload.py -p",
|
"release": "./script/upload.py -p",
|
||||||
"repl": "python ./script/start.py --interactive",
|
"repl": "python ./script/start.py --interactive",
|
||||||
|
|
|
@ -87,7 +87,7 @@ def main():
|
||||||
copy_license()
|
copy_license()
|
||||||
|
|
||||||
if PLATFORM != 'win32':
|
if PLATFORM != 'win32':
|
||||||
copy_api_json_schema()
|
create_api_json_schema()
|
||||||
|
|
||||||
if PLATFORM == 'linux':
|
if PLATFORM == 'linux':
|
||||||
strip_binaries()
|
strip_binaries()
|
||||||
|
@ -131,8 +131,9 @@ def copy_license():
|
||||||
DIST_DIR)
|
DIST_DIR)
|
||||||
shutil.copy2(os.path.join(SOURCE_ROOT, 'LICENSE'), DIST_DIR)
|
shutil.copy2(os.path.join(SOURCE_ROOT, 'LICENSE'), DIST_DIR)
|
||||||
|
|
||||||
def copy_api_json_schema():
|
def create_api_json_schema():
|
||||||
shutil.copy2(os.path.join(SOURCE_ROOT, 'out', 'electron-api.json'), DIST_DIR)
|
outfile = os.path.join(DIST_DIR, 'electron-api.json')
|
||||||
|
execute(['electron-docs-linter', '--outfile={0}'.format(outfile)])
|
||||||
|
|
||||||
def strip_binaries():
|
def strip_binaries():
|
||||||
for binary in TARGET_BINARIES[PLATFORM]:
|
for binary in TARGET_BINARIES[PLATFORM]:
|
||||||
|
|
Loading…
Reference in a new issue