how to install highcharts with bower - ember.js

I am starting a new Ember-CLI project. And I want to install HighCharts with bower.
How do I do this?
I have read two posts about this.
The first one tells me to:bower install highcharts.com
Unfortunately the install hangs and eventually crashes
The second post tells me to: bower install https://github.com/highslide-software/highcharts-release
But this only seems to install a bower.json and an index file... but no js files?
In this specific case, can I just manually place the highcharts.js into my own vendor folder... update brocfile and just forget bower for now? Is there any downside to this?

I have found that the unzipping of highcharts.com does take way longer than any other repo, but it should succeed eventually. There is also highcharts-release, which you mentioned. You should be able to just enter the following,
bower install highcharts-release
Once that installs you should have the files highcharts.js and highcharts.src.js at your disposal.
Try using the keyword -- highcharts-release instead of the full path.
highcharts-release contains way fewer files, which should resolve your issue.
If you use your own vendor folder, it will be harder to update to newer releases in the future, I would not recommend it unless using bower is really impossible, which is somewhat doubtful.

Another way to update the bower.json and install it via CLI from the project directory.
bower install

Related

how do I test ng-add schematics

I decided to add an ng-add schematic to my library, since there are additional setup steps when installing it past running npm/yarn install. This way, users will be able to run ng add #myorg/mylib and the schematics will run
I am having difficulty test running the schematic. Angular Guide only mentions how to test generate schematics, not add ones. The problem is that the schematic is supposed to run when I install the library, however ng add command always seems to install the repository version, and not the local one even if I link my library with yarn link
Thanks for your help.
Ok, I got an answer before I submitted the question.
Do yarn link mylibrary, and then ng add mylibrary. ng add doesn't require the library not to be installed, it will try to install, but fail gracefully if the library is already installed with a warning
Skipping installation: Package already installed
Your ng-add script probably contains context.addTask(new NodePackageInstallTask());. Since link already "installed" the library in your node_modules, this will fail. The solution is to comment this line out while you're developing, and reenable it before publishing.

Ember package.json: dependencies vs devDependencies

What is the difference of having the packages under the dependencies or devDependencies in the package.json?
How does that impact in the final build?
Sounds quite simple, but I don't have it clear to which packages to put in each section. Even similar addon's documentations vary as well, some say to use --save and others --save-dev, which confuses me.
In an ember app all your dependencies will go under devDependencies since you build the app via the ember cli and you do not include the app in another project.
For addons the story is a bit different, if your addon exposes any functionality from a package then that package has to be under dependencies.
Take a look in your package.json file and you will see two types of dependencies. One is called devDependencies(usually modules needed for local development) and one is called dependencies (dependencies used in production or that are integral to the given project). The --save flag adds your dependencies to the dependencies object of your package.json file and --save-dev adds your dependencies to the devDependencies. They're separated for convenience.
Edit:
This question has been answered before, but the tldr; is, it doesn't affect your production build. Hope that this helps.

Where does Bower install my packages?

Ok, be forewarned, I am SUPER noob when it comes to bower. I have a very sketchy basic understanding of what it even is and barely know how to do anything on it. So bear with me here. Also, I'm working on Windows here.
I installed node.js, and then used npm to install bower. After spending half my life trying to find the bower folder, if found it in
C:\Users\ME\AppData\Roaming\npm\node_modules\bower
However, I just installed Foundation via Bower and have NO idea where it installed the Foundation files. I assume from my Google searches that it's in the bower_components folder, but I have no idea where that is. I haven't moved it around or done anything abnormal, so I assume it should just be somewhere pretty standard, but I can't find it anywhere! Any pointers on where to look? I have looked this up online a bunch of times, but either this is super obvious so nobody has ever been noob enough to ask it or I'm just bad at Googling my life problems. Is there a command I can run to find out where this is?
It depends. If you are using -g flag when isntalling, it tells npm or bower to install packages globally. It meens you can use them in the whole system and not only for the one project. In this case they are installed into AppData folder, node_modules for npm and bower_components for bower.
On the other hand, if you don't use -g flag, you are installing packages only for the project which you are actually working on. It is simply the folder where you are when you run the install command. Then folders node_packages and bower_components are created in your actual folder and packages are placed into them.
If you install with -g flag, packages will be install globally. But when you download without -g flag, you can change bower package directory with .bowerrc file.
You should create .bowerrc file if not exist, and write this in file.
{
"directory" : "src/components"
}

redhat6: how to uninstall package when it's installed from source

I installed a package from its source files by using "make install", if I want to remove the package, how should I do? I looked into Makefile, but not many options.
Thanks in advance
Yang
Usually when you use make install, there is no good way to uninstall. This is why it's often advisable to use the --prefix option to the configure script to specify a special directory for each application that's installed in this way.
Another good option is to make the extra effort to pack up an RPM, then you can use rpm to install and uninstall. But it's too late for you to do this after you've already done the install.
So, I think you will be left to try to find the files that were installed and remove them individually. Hopefully the makefile installed to /usr/local instead of /usr.
You might try searching by time range, that way you might be able to find all the files that were installed at the same time.

CMake + find package or check out and install

I just switched to CMake. And yet found it very useful and realized some simple apps and libs.
Somewhere I read that it's possible to query git to checkout repositories from within cmake scripts.
I'd like to check for the existence of a package with my Find(package).cmake
If it doesn't exist i'd like to initiate a checkout and add the new directory to the cmake script as subdirectory.
That way all my dependencies will get installed automatically.
Does somebody know how to accomplish this idea? Thank you!
Bye, Arthur
You're probably thinking about the ExternalProject module added in CMake 2.8. It's documented at http://www.cmake.org/cmake/help/cmake-2-8-docs.html#module:ExternalProject with an intro to it at page 14 of http://www.kitware.com/products/archive/kitware_quarterly1009.pdf. It allows you checkout/download a project and build it automatically.
I would try to find the package with find_package and if the package_FOUND variable is not set you have to call git manually with execute_process. If the source already contains a CMakeLists.txt simply add it by using add_subdirectory otherwise you have to write your own CMake instructions to build that package first.