Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./build.sh fails #228

Open
mattkime opened this issue Mar 23, 2015 · 2 comments
Open

./build.sh fails #228

mattkime opened this issue Mar 23, 2015 · 2 comments

Comments

@mattkime
Copy link

if i checkout this project and run "./build.sh" i get the following error -

➜  require-handlebars-plugin git:(master) ./build.sh
Optimizing (standard) CSS file: /Users/mattk/code/require-handlebars-plugin/demo-build/styles/one.css
Optimizing (standard) CSS file: /Users/mattk/code/require-handlebars-plugin/demo-build/styles/two.css

Tracing dependencies for: main
Error: ENOENT, no such file or directory '/Users/mattk/code/require-handlebars-plugin/demo-build/template_coolPartial.hbs'
In module tree:
    main
      hbs

Error: Error: ENOENT, no such file or directory '/Users/mattk/code/require-handlebars-plugin/demo-build/template_coolPartial.hbs'
In module tree:
    main
      hbs

    at Object.fs.openSync (fs.js:427:18)


/Users/mattk/code/require-handlebars-plugin/demo-build/styles/screen.build.css
----------------
/Users/mattk/code/require-handlebars-plugin/demo-build/styles/screen.build.css

this is easily fixed by swapping changing demo/template/one.hbs

{{> template_coolPartial }}

to

{{> template/coolPartial }}

but this error remains

Optimizing (standard) CSS file: /Users/mattk/code/require-handlebars-plugin/demo-build/styles/one.css
Optimizing (standard) CSS file: /Users/mattk/code/require-handlebars-plugin/demo-build/styles/two.css

Tracing dependencies for: main
Error: ENOENT, no such file or directory '/Users/mattk/code/require-handlebars-plugin/demo-build/templates/helpers/yeller.js'
In module tree:
    main
      hbs

Error: Error: ENOENT, no such file or directory '/Users/mattk/code/require-handlebars-plugin/demo-build/templates/helpers/yeller.js'
In module tree:
    main
      hbs

    at Object.fs.openSync (fs.js:427:18)


/Users/mattk/code/require-handlebars-plugin/demo-build/styles/screen.build.css
----------------
/Users/mattk/code/require-handlebars-plugin/demo-build/styles/screen.build.css
@plutrono
Copy link

There are hard coded paths to templates instead of template.
Next issue is that there's no Handlerbars.js at the top level, it's in hbs/handlebars.js (note case)

Now It's failing with an error about modules sharing the same URL. :(

Feeling like I need to skip this plugin and write my own.

Here are my diffs so far in case it's helpful:

git diff
diff --git a/demo/app.build.js b/demo/app.build.js
index c15295d..4aca922 100755
--- a/demo/app.build.js
+++ b/demo/app.build.js
@@ -20,7 +20,7 @@

     paths: {
       "hbs": "../hbs",
-      "Handlebars" : "../Handlebars",
+      "Handlebars" : "../hbs/handlebars",
       "underscore" : "../hbs/underscore",
       "i18nprecompile" : "../hbs/i18nprecompile",
       "json2" : "../hbs/json2"
diff --git a/demo/template/one.hbs b/demo/template/one.hbs
index 3cfcc72..57b1ae3 100755
--- a/demo/template/one.hbs
+++ b/demo/template/one.hbs
@@ -34,7 +34,7 @@
   {{/each}}
   <br />

-  {{> template_coolPartial }}
+  {{> template/coolPartial }}
   <br />
   i18n2: {{$ "key2"}}
 </div>
diff --git a/hbs.js b/hbs.js
index 3f6ae67..f83139d 100755
--- a/hbs.js
+++ b/hbs.js
@@ -31,8 +31,8 @@ define([
   var customNameExtension = '@hbs';
   var devStyleDirectory = '/styles/';
   var buildStyleDirectory = '/demo-build/styles/';
-  var helperDirectory = 'templates/helpers/';
-  var i18nDirectory = 'templates/i18n/';
+  var helperDirectory = 'template/helpers/';
+  var i18nDirectory = 'template/i18n/';
   var buildCSSFileName = 'screen.build.css';
   var onHbsReadMethod = "onHbsRead";

@chrisrink
Copy link

Should be fixed in 96188fa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants