-
Notifications
You must be signed in to change notification settings - Fork 91
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
Enhancement/251 migrate from bower to npm #296
Enhancement/251 migrate from bower to npm #296
Conversation
…to function nominally
Yarn presently has an issue running these, since they are not used, will be removed for now
Removes unnecessary specs.html
@miq-bot add_label enhancement |
@@ -5,7 +5,7 @@ | |||
'app.core', | |||
'ui.bootstrap', | |||
'patternfly', | |||
'ngSVGAttributes', | |||
'svgBaseFix', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cloned this branch, new svgBaseFix lib is working. LGTM
install: | ||
- yarn install | ||
- bower install -F | ||
- yarn install --force |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why --force? Using --force could do very bad things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats a good question, travis 💩's if its absent, I would say that force isn't so bad, just fetches deps fresh! https://yarnpkg.com/en/docs/cli/install#toc-yarn-install-force
👍 for me, waiting for @himdel and @martinpovolny to take a look. |
@@ -83,7 +69,57 @@ module.exports = (function() { | |||
var options = { | |||
files: [].concat( | |||
'./node_modules/phantomjs-polyfill/bind-polyfill.js', | |||
wiredep({devDependencies: true}).js, | |||
'./node_modules/jquery/dist/jquery.js', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is problematic ;). Is there any way to make wiredep
work? Is it just that wiredep can't read package.json or pick the right libraries, or is it also that those don't have the necessary info on what to include?
People will notice that adding the lib is not enough and add it to javascripts, but.. these test deps will get out of sync soon, I'm afraid..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wiredep is for bower dependencies only ever just bower dependencies, i TOTALLY feel what you are feeling, wait what, more than one place to update deps? I kinda ran outta time and ideas on how to getting those in here, open to suggestions!
ultimately i was going to write up some documentation on how to correctly add dependencies and keep in mind, this is only until we move to angular 2! importing modules will change a great deal of what we presently do...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaah, too bad :( I was hoping Karma works like Jasmine and just loads a html file.
But oh well, you're right that this is temporary, so maybe people won't break it so much :) Something too keep an eye for when reviewing though ;)
@@ -9,6 +9,6 @@ var router = express.Router(); | |||
|
|||
router.use(express.static('./client')); | |||
router.use(express.static('./.tmp')); | |||
router.use(express.static('./bower_components')); | |||
router.use(express.static('./node_modules')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to be updated in the apache config as well ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really? our build process hasn't changed, we don't use bower components in the build, we use those bundled concatenated files, this still builds the same way as before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Console templates ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah soooo those are now served from a folder renamed vendor
(also pushed to that folder)
but yeah that changed whos da person to beep for that change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, I guess that would be me :D
Ok, I'm seeing they're now copied to public/ui/service/vendor/{no-vnc,spice-html5-bower}
.. The tricky part here is that we need to find them on the same url both in devel mode (served by node) and in production mode (served by apache) .. but that can be acomplished by redirecting /ui/service/vendor
to /node_modules
in node, and assuming the /ui/service/vendor/...
URL, I think.
And then, the only change needed outside manageiq-ui-service would be https://github.com/ManageIQ/manageiq/blob/3921e87915b5a69937b9d4a70bb24ab71b97c165/gems/pending/util/miq_apache/miq_apache.rb#L209 .. that bower_components
was there for exactly that reason (and only that reason, so you should be able to safely change that to vendor
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say feel free to do it, the more people understand these things the better :-) but do tag us there.. :-)
(EDIT: never mind) When running
And looks like it's right, those modules' directories are empty, except for a Either way, EDIT: .. that happens only with |
This looks good, except for that manual test dependency list.. Any chance we could include |
@himdel sooooooo we can't require the file because totally open to suggestions on how to solve this! because it is a mild problem silver lining, if ever the list starts to deteriorate, tests will fail, chaos will FOLLOW also thanks for looking <3 super appreciate it. |
cc @simaishi for build concerns |
☠️ bower, long live bower 👑
Re-configures process for adding dependencies, need to add documentation on this, was thinking of starting a
guides
folder in where I can explain the process (long story short npm install, add fep location in the stylesheet.html or javascript.html, update test config dependencies to reflect)Renames a number of gulp tasks to better align with actual function
Removes a number of unnecessary gulp tasks relating to building the test environment
End of the day, not much changed here! Though I would love some 👀 from the following :
@chriskacerguis @himdel @jeff-phillips-18 @dtaylor113
closes #251