Skip to content

Commit

Permalink
use filename correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Jul 25, 2018
1 parent 5ffdd64 commit dfc81f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/moon-mvl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ const addClass = (element, name) => {
return element;
};

module.exports = (name, mvl, jsPath, js, cssPath, css) => {
module.exports = (name, mvl, jsFile, js, cssFile, css) => {
let outputJS = "import Moon from \"moon\";";
let outputCSS;

let view = "";
let data = "{};";

if (js !== null) {
outputJS += `import data from "${jsPath}";`;
outputJS += `import data from "${jsFile}";`;
data = "data;";
}

Expand All @@ -59,7 +59,7 @@ module.exports = (name, mvl, jsPath, js, cssPath, css) => {
outputCSS = scopeCSS(scope, css);
}

js += `export default Moon.extend("${name}",function(){var options=${data}options.view=function(m,instance,locals){${view}};return options;});`;
outputJS += `export default Moon.extend("${name}",function(){var options=${data}options.view=function(m,instance,locals){${view}};return options;});`;

return {
js: outputJS,
Expand Down

0 comments on commit dfc81f5

Please sign in to comment.