File tree 1 file changed +14
-3
lines changed
1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -507,9 +507,20 @@ namespace :node do
507
507
desc 'Release Node npm package'
508
508
task deploy : :release
509
509
510
- desc 'Generate Node documentation — currently not working '
510
+ desc 'Generate Node documentation'
511
511
task :docs , [ :skip_update ] do |_task , arguments |
512
- puts "WARNING — Cannot currently update API Docs for JavaScript bindings"
512
+ FileUtils . rm_rf ( 'build/docs/api/javascript/' )
513
+ begin
514
+ sh 'npm run generate-docs --prefix javascript/node/selenium-webdriver || true' , verbose : true
515
+ rescue StandardError
516
+ puts 'Ensure that npm is installed on your system'
517
+ raise
518
+ end
519
+
520
+ unless arguments [ :skip_update ]
521
+ puts "Updating JavaScript documentation"
522
+ puts update_gh_pages ? "JavaScript Docs updated!" : "JavaScript Doc update cancelled"
523
+ end
513
524
end
514
525
515
526
desc 'Update JavaScript changelog'
@@ -1308,7 +1319,7 @@ def update_gh_pages
1308
1319
retry
1309
1320
end
1310
1321
1311
- %w[ java rb py dotnet ] . each do |language |
1322
+ %w[ java rb py dotnet javascript ] . each do |language |
1312
1323
if Dir . exist? ( "build/docs/api/#{ language } " ) && !Dir . empty? ( "build/docs/api/#{ language } " )
1313
1324
puts "Deleting #{ language } directory in docs/api since corresponding directory in build/docs/api is not empty"
1314
1325
FileUtils . rm_rf ( "docs/api/#{ language } " )
You can’t perform that action at this time.
0 commit comments