Closed demisx closed 9 years ago
It's the least bad solution for a portion of software dev that's suffering from a serious lack of quality tooling and expertise right now. I wouldn't say directive tests get worse with it by any stretch. They get better. You can use something like partialify and require html files. Here's an example of what would normally be an enormous string stuffed in an html file that becomes nice with browserify:
https://github.com/bendrucker/angular-credit-cards/blob/master/test/expiration.js#L12
Yes, there's way to do this with Karma. And those ways are wrong. It's always better to import your dependencies from your code and using something like html2js means tightly coupling your test runner to your test files. What happens when you decide you want to use jsdom and test in Node instead? You can't.
If it's not on npm, there's a good chance that it's not good, to put it bluntly. Bower is still fine for front end asset dependencies like bootstrap which npm is certainly not made to handle. I don't use 3rd party stylesheets or massive component libraries (e.g. bootstrap) so that's irrelevant to me. There's a lot of truly awful front end code being written right now. I'm talking shipping massive libraries that are un- or under-tested, writing poor docs, and creating a case study in {insert framework here} anti patterns only to get hundreds of GH stars. Curation is poor, so you have to be vigilant about your deps.
The fact that a package is published to npm and has a proper "main"
entry in its package already puts it ahead of quite a number of popular angular modules.
Thank you for complete answer as usual. Would be very interesting to read your blog about this. Hopefully, you'll find some time to write it sooner. What's the best way to be notified about your new blog posts?
This list has been silent for a long time, but for when I revive it:
http://druckeronlinemedia.us1.list-manage1.com/subscribe?u=198496c3af3245d3e00853796&id=a286d314b0
Also https://twitter.com/bendrucker
Lastly I'm considering doing some on-the-road teaching and trying to build a critical mass of quick workshops, meetups, conferences, etc to cover the cost of flying and staying in a few cities.
Current thoughts are:
If you know folks using any of the stuff I work on (Node REST APIs, SQL, Firebase, Angular, Browserify) feel free to spread the word. Not looking to transition to full time consulting but more a quick change of pace + and excuse/budget to travel a bit.
Hi Ben. I like your idea of moving away from bower and sticking with npm for managing both, frontend and backend packages. In particular, I am interested in combining Angular 1.x with Browserify. I would appreciate if you could answer a few questions:
Thank you very much.