MCPcopy Index your code
hub / github.com/codecombat/codecombat / copyLanguagesFromEsper

Function copyLanguagesFromEsper

setup-aether.js:79–143  ·  view source on GitHub ↗
(targets)

Source from the content-addressed store, hash-verified

77});
78
79function copyLanguagesFromEsper(targets) {
80 // Get a list of the regular and modern language plugin paths.
81 const target_paths = targets
82 .map(lang => [
83 [
84 path.join(
85 PWD,
86 "bower_components",
87 "esper.js",
88 `esper-plugin-lang-${lang}.js`
89 ),
90 path.join(
91 PWD,
92 publicFolderName,
93 "javascripts",
94 "app",
95 "vendor",
96 `aether-${lang}.js`
97 )
98 ],
99 [
100 path.join(
101 PWD,
102 "bower_components",
103 "esper.js",
104 `esper-plugin-lang-${lang}-modern.js`
105 ),
106 path.join(
107 PWD,
108 publicFolderName,
109 "javascripts",
110 "app",
111 "vendor",
112 `aether-${lang}.modern.js`
113 )
114 ]
115 ])
116 .reduce((l, paths) => l.concat(paths));
117
118 for (let [src, dest] of target_paths) {
119 // const src = path.join(PWD, 'bower_components', 'esper.js', `esper-plugin-lang-${target}.js`);
120 // const dest = path.join(PWD, 'bower_components', 'aether', 'build', `${target}.js`);
121 console.log(`Copy ${src}, ${dest}`);
122 fs.copySync(src, dest);
123 }
124
125 // Finally copy html as we globally load these within the html iframe.
126 const src = path.join(
127 PWD,
128 "bower_components",
129 "aether",
130 "build",
131 "html.js"
132 );
133 const dest = path.join(
134 PWD,
135 publicFolderName,
136 "javascripts",

Callers 1

setup-aether.jsFile · 0.85

Calls 1

logMethod · 0.80

Tested by

no test coverage detected