-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
By moving namespaces into their own "*.rake" files. This makes the main Rakefile a little easier to follow, and lays the groundwork for deleting crazy fun.
- Loading branch information
Showing
6 changed files
with
107 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace :side do | ||
task :atoms => [ | ||
"//javascript/atoms/fragments:find-element", | ||
] do | ||
# TODO: move directly to IDE's directory once the repositories are merged | ||
baseDir = "build/javascript/atoms" | ||
mkdir_p baseDir | ||
|
||
[ | ||
Rake::Task["//javascript/atoms/fragments:find-element"].out, | ||
].each do |atom| | ||
name = File.basename(atom) | ||
|
||
puts "Generating #{atom} as #{name}" | ||
File.open(File.join(baseDir, name), "w") do |f| | ||
f << "// GENERATED CODE - DO NOT EDIT\n" | ||
f << "module.exports = " | ||
f << IO.read(atom).strip | ||
f << ";\n" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
namespace :node do | ||
task :atoms => [ | ||
"//javascript/atoms/fragments:is-displayed", | ||
"//javascript/webdriver/atoms:get-attribute", | ||
] do | ||
baseDir = "javascript/node/selenium-webdriver/lib/atoms" | ||
mkdir_p baseDir | ||
|
||
[ | ||
Rake::Task["//javascript/atoms/fragments:is-displayed"].out, | ||
Rake::Task["//javascript/webdriver/atoms:get-attribute"].out, | ||
].each do |atom| | ||
name = File.basename(atom) | ||
|
||
puts "Generating #{atom} as #{name}" | ||
File.open(File.join(baseDir, name), "w") do |f| | ||
f << "// GENERATED CODE - DO NOT EDIT\n" | ||
f << "module.exports = " | ||
f << IO.read(atom).strip | ||
f << ";\n" | ||
end | ||
end | ||
end | ||
|
||
task :build do | ||
sh "bazel build //javascript/node/selenium-webdriver" | ||
end | ||
|
||
task :'dry-run' => [ | ||
"node:build", | ||
] do | ||
cmd = "bazel run javascript/node/selenium-webdriver:selenium-webdriver.pack" | ||
sh cmd | ||
end | ||
|
||
task :deploy => [ | ||
"node:build", | ||
] do | ||
cmd = "bazel run javascript/node/selenium-webdriver:selenium-webdriver.publish" | ||
sh cmd | ||
end | ||
|
||
task :docs do | ||
sh "node javascript/node/gendocs.js" | ||
end | ||
end |