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

Not all js files are bundled via aurelia-cli #17

Closed
llicht opened this Issue Nov 17, 2016 · 7 comments

Comments

4 participants
@llicht

llicht commented Nov 17, 2016

I'm submitting a bug report

  • Library Version:
    0.1.14

Please tell us about your environment:

  • Operating System:
    Windows 7

  • NPM Version:
    3.10.9

Current behavior:
When using Aurelia-cli to bundle aurelia-ux (e.g. in the same way app-ux-showcase does), the following js files end up not being bundled but are still attempted to be loaded by aurelia-ux at runtime:
ux-button.js
design-attributes.js
paper-ripple.js
paper-wave.js
element-rect.js

(Usually, the browser ends up finding them in node_modules, so the issue is less noticable then.)

This reproduces both in app-ux-showcase and any other app that uses aurelia-ux via Aurelia-cli in the same manner.

Adding "./button/ux-button.js" to "resources" in aurelia.json is a workaround. (It appears to take in all of the above automatically)

Expected/desired behavior:
The browser should not need to load files from node_modules to run a Aurelia-ux based app.

  • What is the motivation / use case for changing the behavior?
    Causes errors when node_modules isn't accessible by browser.
@AStoker

This comment has been minimized.

Show comment
Hide comment
@AStoker

AStoker Nov 17, 2016

Member

Not sure of this solves your problem, but according to the build commands for the UX repo, you need to run npm run build That should build all your files.
Is that what's breaking, or am I misunderstanding your issue?

Member

AStoker commented Nov 17, 2016

Not sure of this solves your problem, but according to the build commands for the UX repo, you need to run npm run build That should build all your files.
Is that what's breaking, or am I misunderstanding your issue?

@AStoker

This comment has been minimized.

Show comment
Hide comment
@AStoker

AStoker Nov 17, 2016

Member

Assuming you have the Aurelia UX project in the same directory as your App-UX-Showcase project, a list of instructions to build UX components and bring them over to the showcase to test would be:

  • UX: npm run build
  • Showcase: au update-ux
  • Showcase: au run

This is currently what I'm doing, and appears to work fine for me.

Member

AStoker commented Nov 17, 2016

Assuming you have the Aurelia UX project in the same directory as your App-UX-Showcase project, a list of instructions to build UX components and bring them over to the showcase to test would be:

  • UX: npm run build
  • Showcase: au update-ux
  • Showcase: au run

This is currently what I'm doing, and appears to work fine for me.

@llicht

This comment has been minimized.

Show comment
Hide comment
@llicht

llicht Nov 17, 2016

To clarify, this issue doesn't prevent app-ux-showcase (or other aurelia-ux apps) from running normally, it just causes the browser to depend on files in node_modules.
To see this, you can temporarily rename node_modules to something else (after doing 'au run', of course) and see that the browser is no longer able to launch app-ux-showcase.

I'm reporting the issue because once you try to use an AureliaUX-using app in an environment where the browser can't access node_modules, this issue causes an error.

llicht commented Nov 17, 2016

To clarify, this issue doesn't prevent app-ux-showcase (or other aurelia-ux apps) from running normally, it just causes the browser to depend on files in node_modules.
To see this, you can temporarily rename node_modules to something else (after doing 'au run', of course) and see that the browser is no longer able to launch app-ux-showcase.

I'm reporting the issue because once you try to use an AureliaUX-using app in an environment where the browser can't access node_modules, this issue causes an error.

@AStoker

This comment has been minimized.

Show comment
Hide comment
@AStoker

AStoker Nov 17, 2016

Member

Thanks for clarifying. I'm able to reproduce this. Do you have any ideas as to why this would be happening? A PR for a fix would be awesome!

Member

AStoker commented Nov 17, 2016

Thanks for clarifying. I'm able to reproduce this. Do you have any ideas as to why this would be happening? A PR for a fix would be awesome!

@EisenbergEffect

This comment has been minimized.

Show comment
Hide comment
@EisenbergEffect

EisenbergEffect Nov 17, 2016

Member

I'm aware of the issue. It has to do with the Aurelia-UX index not exporting everything yet so the full code can't be traced. It will be fixed at the library level. It should also be fixable at the app level using resources.

Member

EisenbergEffect commented Nov 17, 2016

I'm aware of the issue. It has to do with the Aurelia-UX index not exporting everything yet so the full code can't be traced. It will be fixed at the library level. It should also be fixable at the app level using resources.

@EisenbergEffect EisenbergEffect added the bug label Nov 17, 2016

@khuongduybui

This comment has been minimized.

Show comment
Hide comment
@khuongduybui

khuongduybui Jan 9, 2017

Contributor

@EisenbergEffect How do I fix this "at the app level using resources"? I'm bundling node_modules/aurelia-ux/* along in my distribution for the time being but a less intrusive way is highly appreciated.

Contributor

khuongduybui commented Jan 9, 2017

@EisenbergEffect How do I fix this "at the app level using resources"? I'm bundling node_modules/aurelia-ux/* along in my distribution for the time being but a less intrusive way is highly appreciated.

@khuongduybui

This comment has been minimized.

Show comment
Hide comment
@khuongduybui

khuongduybui Jan 10, 2017

Contributor

Never mind, I just figured out that we can add ".js" files into "resources" array as well.

Contributor

khuongduybui commented Jan 10, 2017

Never mind, I just figured out that we can add ".js" files into "resources" array as well.

@ZHollingshead ZHollingshead moved this from Backlog to Done in Aurelia UX Dec 21, 2017

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