New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial scripts to publish electron.d.ts #7857

Merged
merged 4 commits into from May 5, 2017
Jump to file or symbol
Failed to load files and symbols.
+11 −0
Diff settings

Always

Just for now

Next

generate and upload electron.d.ts with each release

  • Loading branch information...
zeke committed Apr 1, 2017
commit 9a1048651493ee0400ce95d9a57cd10f4db8891b
View
@@ -6,6 +6,7 @@
"browserify": "^13.1.0",
"electabul": "~0.0.4",
"electron-docs-linter": "^2.1.0",
"electron-typescript-definitions": "^1.0.0",
"request": "*",
"standard": "^8.4.0",
"standard-markdown": "^2.1.1"
@@ -32,6 +33,7 @@
"clean": "python ./script/clean.py",
"clean-build": "python ./script/clean.py --build",
"coverage": "npm run instrument-code-coverage && npm test -- --use-instrumented-asar",
"generate-typescript-definitions": "electron-typescript-definitions --in=out/electron-api.json --out=out/electron.d.ts",
"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",
"lint-js": "standard && cd spec && standard",
View
@@ -81,6 +81,10 @@ def main():
sys.stderr.write('\nRunning `npm run lint`\n')
sys.stderr.flush()
execute([npm, 'run', 'lint'])
sys.stderr.write('\nRunning `npm run generate-typescript-definitions`\n')
sys.stderr.flush()
execute([npm, 'run', 'generate-typescript-definitions'])
if is_release:
run_script('build.py', ['-c', 'R'])
run_script('create-dist.py')
View
@@ -92,6 +92,7 @@ def main():
if PLATFORM != 'win32' and not args.no_api_docs:
create_api_json_schema()
copy_typescript_definitions()
if PLATFORM == 'linux':
strip_binaries()
@@ -144,6 +145,9 @@ def create_api_json_schema():
'--version={}'.format(ELECTRON_VERSION.replace('v', ''))],
env=env)
def copy_typescript_definitions():
shutil.copy2(os.path.join(SOURCE_ROOT, 'out', 'electron.d.ts'), DIST_DIR)
def strip_binaries():
for binary in TARGET_BINARIES[PLATFORM]:
if binary.endswith('.so') or '.' not in binary:
View
@@ -81,6 +81,7 @@ def main():
if PLATFORM == 'darwin':
upload_electron(github, release, os.path.join(DIST_DIR,
'electron-api.json'))
upload_electron(github, release, os.path.join(DIST_DIR, 'electron.d.ts'))
upload_electron(github, release, os.path.join(DIST_DIR, DSYM_NAME))
elif PLATFORM == 'win32':
upload_electron(github, release, os.path.join(DIST_DIR, PDB_NAME))
ProTip! Use n and p to navigate between commits in a pull request.