Skip to content

Commit b780116

Browse files
committed
Adapt Marionette atoms so they can be used with Cu.import without designated scope
1 parent 1242447 commit b780116

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Rakefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,7 @@ namespace :marionette do
659659

660660
# This task takes all the relevant Marionette atom dependencies
661661
# (listed in func_lookup) and concatenates them to a single atoms.js
662-
# file, where each atom is assigned to a custom function name
663-
# matching the Marionette protocol.
662+
# file.
664663
#
665664
# The function names are defined in the func_lookup dictionary of
666665
# target to name.
@@ -676,13 +675,17 @@ namespace :marionette do
676675
b = StringIO.new
677676
b << File.read("javascript/marionette/COPYING") << "\n"
678677
b << "\n"
678+
b << "const EXPORTED_SYMBOLS = [\"atoms\"];" << "\n"
679+
b << "\n"
680+
b << "function atoms() {};" << "\n"
681+
b << "\n"
679682

680683
task.prerequisites.each do |target|
681684
out = Rake::Task[target].out
682685
atom = File.read(out).chop
683686

684-
b << "// target #{target}\n"
685-
b << "var #{func_lookup[target]} = #{atom};\n"
687+
b << "// target #{target}" << "\n"
688+
b << "atoms.#{func_lookup[target]} = #{atom};" << "\n"
686689
b << "\n"
687690
end
688691

0 commit comments

Comments
 (0)