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

Js file with the same name as html template is automagically included #52

Open
fehmicansaglam opened this issue Jun 10, 2012 · 1 comment

Comments

@fehmicansaglam
Copy link

I have a base template: views/main.html
and I output all the javascript files with the following command:

{greenscript.js output: 'all' /}

I also have an index.html: views/Application/index.html
There is nothing special in it.

And I have an index.js: public/javascripts/Application/index.js
Although I do not import it, greenscript automagically includes it in the output as below.

<script type="text/javascript" src="/public/javascripts/Application/index.js" ></script>

Actually that may be smth I would want but unfortunately the dependencies are ignored.
The dependencies are:
js.Application/index=dataTables.dateEuro,chosen.jquery.min,jquery-ui-timepicker-addon,jquery-ui-timepicker-tr

But if I include it manually in index.html:

{greenscript.js 'Application/index' /}

dependencies are included, everything is fine except that there are 2 imports for index.js in the output.

<script type="text/javascript" src="/public/javascripts/Application/index.js" ></script> <script type="text/javascript" src="/public/javascripts/Application/index.js" ></script>

Am I doing smth wrong?

@fehmicansaglam
Copy link
Author

FYI if I define the dependency as (by adding "js" to "Application/index")
js.Application/index.js=dataTables.dateEuro,chosen.jquery.min,jquery-ui-timepicker-tr,json2,jsonformat
dependencies are loaded correctly. (again without explicitly including Application/index.js)

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

1 participant