Using angular directive callback - updating a bower package locally - angularjs

So i am using a bower package that is outdated. There is a pull request with code that fixes my issue however it has not been accepted.
The fix is only two lines and I tried changing it in my code, however its still not working.
How do I update the bower package locally?
https://github.com/onemightyroar/angular-camera/pull/19

I suggest not using bower if the package is deprecated. Instead download the package and move it outside of bower_components. This way you can edit the library to work, and bower won't touch the library anymore. However, if you make changes to the code inside of bower components, it still shouldn't be an issue and the problem might be with the two line fix you speak of.

Related

How to use jhipster and react-jhipster-mui generator

I would like to use use mui react library with jhipster. There seemed to be module react-jhipster-mui which should enable it, but I am not sure how to force jhipster to use it.
I have found simmilar blueprint module which is used by jhipster using --blueprint parameter, see bellow
jhipster --blueprint primereact-blueprint
unfortunately it doesnt work with latest version of jhipster.
Anyway execution of the module as blueprint doesn't work
jhipster --blueprint react-jhipster-mui
it ends with:
The generator-jhipster-react-jhipster-mui blueprint provided is not
installed. Please install it using command npm i -g
generator-jhipster-react-jhipster-mui*
react-jhipster-mui is not a blueprint, it's a replacement for react-jhipster library.
So you must edit the package.json file of your project, replace "react-jhipster" by "react-jhipster-mui" with correct version "1.1.0" and then run npm install.
However, it's very likely that it won't work as "react-jhipster-mui" has not been updated for last 6 months since it was forked from "react-jhipster".
If it does not work, you could try to contact its author to see if he/she is interested in updating it or you could make it work by yourself.

Is there a way to do an unminified rollup build of an npm package?

I am using a React library that builds with rollup, and there is a bug with how it behaves in my application. I want to be able to directly edit the installed library code in node_modules/ to see if that fixes the issue, without having rebuild the library every time I make a change (if it is minified, I can't find the code I want to edit and so can't skip building it again from the unminified source). How do I do this, or is there another work around?

How to make changes to third party package in React Native 0.60+

I'm struggling with making changes and possible a pull request for a third party react native package with cocoapods and auto linking.
In this case I want to add some minor functionality to React Native Camera. And I've forked the repo.
While developing I'd like to use my local code, but I can't get it to work.
I'ven tried using npm link, but this doesn't work since React Native can't find the linked package with the TypeScript import statement.
I've also tried just to edit Objective C code directly in node_modules, running pod install again and rerunning react-native run-ios, but it doesn't seem to include my changes.
I've never really made pull requests to other packages before, so I think I need some help. I thought this would be the easiest thing to google, but it turns out it's not.
You may be doing this already, but make sure that you clean and rebuild the project from xcode if you're modifying objective C code in the node modules folder, before re running react-native run-ios.
If you've already installed the library you also shouldn't need to rerun pod install.
Similarly on android, be sure to rebuild the project in android studio.

Is there an official nuget package for Angular 2?

I'm currently working in a work environment where I do not have access to npm / node. The npm download location is actually blocked so I can't get any packages.
I want to build an Angular 2 site. As I can't access npm, I want to use Nuget to get the files. Although I can see the Angular 1 packages, I cannot seem to see any Angular 2 packages. Is there one for Nuget?
Also, is populating the node_module folder and compiling the Typescript the only thing that npm does for Angular? If I can just get a copy of the node_module folder (from outside work) and get TypeScript working in my solution, can I basically bypass the need for npm?
In short; No.
You can see a list of all available NuGet package versions here, with the most recent being 1.5.3.
Even performing a generic search shows most recent versions as 1.5.3.
Sometimes they'll have beta versions of packages available that you can install with a command similar to: Install-Package EntityFramework -Version 6.1.3-beta1 -Pre, but it doesn't appear as if they have created any pre-release packages.
So, as #Michal Dymel mentioned, you could get it from a CDN or some other location.

Adding ng-grid and compass to AngularJs fullstack installation

I've installed AngularJS using the fullstack installer here:
https://github.com/DaftMonk/generator-angular-fullstack
I want to now include ng-grid. How do I go about that? I've already ran npm install ng-grid which has copied the files to the node_modules directory. Do I just need to update my index.html file, or do I need to manually update the Grunt file? If so can someone guide me? Can't find anything online that can help me.
I guess the same goes for Compass (I've also already installed Compass using the same method above), as I'd like to initially start using #font-face in my app. I've used Compass several times before but not in this kind of setup...
Thanks :)
UPDATE
I've worked out how I should include ng-grid. Wat I should have done is this in the terminal inside my project's dir:
bower install ng-grid --save
This not only installs the ng-grid files in /bower_components/ but also updates the bower.json in my project's root, so that when I run grunt serve it automatically adds the css & js includes in my index.html page. I'm now successfully displaying a table using ng-grid :)
However I've still not worked out how to install compass successfully. I tried bower install compass-mixins --save-dev but when I save my _fonts.scss file it produces errors. The error being that it can't find the compass files. Maybe the path is wrong, but I read somewhere that that is what I should put at the top (that or just #import "compass";). The paths may also be wrong to my font files, but that's something I'll need to investigate once I can get compass running)
#import "compass/functions";
#include font-face("Roboto-Bold", font-files("../assets/fonts/Roboto-Bold-webfont.woff", "../assets/fonts/Roboto-Bold-webfont.eot?#iefix", "../assets/fonts/Roboto-Bold-webfont.ttf", "../assets/fonts/Roboto-Bold-webfont.svg#LatoBlack"), "../assets/fonts/Roboto-Bold-webfont.eot", "normal", "normal");
Uhh, I don't think you need any installer for ng-grid. The fullstack installer is for setting up your server sided stack. ng-grid.js should (like any other js library you want to pass to the client-browser) be accessible like you would implement (for example) jQuery.
So, assuming your directory structure has a folder called libs/js, put something like:
<script type="text/javascript" src="libs/js/ui-ng-grid_2.0.11-0/build/ng-grid.js"></script>
in the header of your index.html and put the source code of ng-grid to that folder. Or use a cdn server if you don't want to host the directive on your server.
In no case I would tell anyone from outside where my server sided node modules are stored or would give anyone but me and the server access to them.

Resources