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

Have data attributes for scripts #51

Open
FibHeap opened this issue Jul 15, 2015 · 2 comments
Open

Have data attributes for scripts #51

FibHeap opened this issue Jul 15, 2015 · 2 comments

Comments

@FibHeap
Copy link

FibHeap commented Jul 15, 2015

Hi,

we use requirejs to start our app. So for now in index.html we have

<script data-main="src/main.min.js" src="src/require.js"></script>

I don't think this is possible with the current bootstrap.js and manifest file. Or is it?

Or could it be a future feature with syntax something like:

  "load": [
    "lib/jquery.min.js",
    {
       "tag":"script",
        "data-main":"src/main.min.js",
        "src":"src/require.js"
    }
  ]
@betorobson
Copy link

I had a similar issue. I believe that you should not use require.js because the bootstrap.js decides when load files from www or cache (cdvfile://). In that case, require.js is not able to understand it and choose from which location load your scripts.

@markmarijnissen
Copy link
Owner

So bootstrap.js should be updated:

  1. In the Manifest.load, bootstrap should accept both string and object.
  2. When an object is given, these are set as attributes on the script-tag. (So the object should include a "src" attribute with the URL you want to load)

Please submit pull request :)

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

No branches or pull requests

3 participants