How do I find the name of the asset to add to Bowerfile - angularjs

Sorry this is a super noob Bower question, but Google is really not turning anything up here.
How do I know the name of the library to include in my Bowerfile?
For example:
I want AngularJS. So I add asset 'angular' to my Bowerfile because I read it in a tutorial.
Now I want to add D3js. I found this bower.json in D3's github repo: https://github.com/mbostock/d3/blob/master/bower.json. Since its name is 'd3', does that mean I just add asset 'd3' to my bowerfile?
Is there some public site like that lists all the Bower components? For example with Ruby Gems there is RubyGems.org. For PHP's composer there is https://packagist.org/.

There is a list of package names ( the things you should include) here:
http://bower.io/search/
Also, yes, the 'name' attribute of the bower.json in some official repository whose code you want will match the asset you need to install.
The bower command line tool also has a search feature that will help you. Read this:
http://blog.teamtreehouse.com/getting-started-bower
Hope that helps. Post your bower.json up and what commands you are trying if it doesn't seem right.

Related

Webpack bundler

I am currently looking into React, React-habitat, and Webpack.
My question is does Webpack also bundle the index.html file where I reference the bundle or is this kept separate? Is it possible to exclude this without specifically stating this in the Webpack config file?
this is the current structure am envisioning.
https://imgur.com/a/98or9
I know that all the dependencies found in my entry file for Webpack are bundled. The reason I would like to know this is because I am doing some research on how a CMS can be built around the three topics I mentioned above. I need to know if the index.html file is also bundled or not because I would like to edit the original index file(if it is not bundled) instead of repackaging everything for every change.
Hope someone understands what am looking for.

Angular Material Calendar incompatibility?

I'm trying to use this cool little angular module:
https://angular-material-calendar.bradb.net/
When doing bower install I get:
Unable to find a suitable version for angular-material, please choose one by typing one of the numbers below:
1) angular-material#~0.11 which resolved to 0.11.4 and is required by material-calendar#0.2.14
2) angular-material#^1.0.9 which resolved to 1.0.9 and is required by public
It looks like this thing was developed in beta, and I can't get it to work with 1.0.9. Does anyone know any workarounds? This module is exactly what I'm looking for.
Thanks!
Use --force-latest or add component version to resoltions key in bower.json
Note
For more info you could check the issue here. I hope this helped.

how to run ngStorage with typeScript

is it possible to include ngStorage within typeScript? I get TS2304 error but I can't find .d.ts file at definitelyTyped I could include.
I wanna store tokens which I use in REST requests. Any other suggestions on this? I couldn't make it working with $sessionStorage either. Apparently I don't have enough knowledge about typeScript, I might not include something I should have.
Thanks in advance.
Short Answer
Yes!
Longer answer
Yes you can use ngStorage with TypeScript.
Being that TypeScript is a superset of JavaScript, so anything you can do in JavaScript you can do in TypeScript (Note there are some differences, but not in regards to using other libraries). If you are unable to find a .d.ts file for this module then you have two choices to use it.
Specify the type of any of the services/factories to have a type of any
Create your own .d.ts to represent this module, or at least the pieces of it that you are using
If you decide to head down the route of #2, it would be nice for the community to submit a pull request to the definitely typed repo to include the definition you created.
A one year old question. But just to update, there is a .d.ts file available for ngStorage.
Run the below command and off you go.
tsd install ngStorage --save --resolve

CakePHP Twitter plugin

Appologies if this is something obvious I've missed.
I'm trying to use this Cake plugin to add a twitter feed to my cake app (just display my latest tweet). I've followed the docs in the readme but I get this:
Missing Controller
Error: Twitter.UsersController could not be found.
Error: Create the class UsersController below in file: C:\wamp\www\mysite\app\Plugin\Twitter\Controller\UsersController.php
Heres what I've done so far (as the readme instructs):
Cloned all the files into app/Plugin/Twitter/
Rename Config/twitter.default.php to Config/twitter.php
Updated the config file with my twitter app keys
Visited mysite/twitter/twitter/connect - which gives me the above error.
The readme mentions that the plugin uses - http_socket_oauth, another cake plugin, I trust that this is included in this plugin and that I dont have to install that plugin aswel?
Could someone point me in the right direction?
Thank you

How do I install a CakePHP plugin?

More easy questions - this time, how do I install a CakePHP plugin? I get that I take the plugin folder and put it in the, well, the plugins directory.
so
/app
/plugins
/what is this?
And I ask this, because I just downloaded a plugin - here:
http://milesj.me/blog/read/changelog-forum-2.3
And the name of the folder that everything is in is milesj-cake-forum-29a0699
This doesn't appear to be a good plugin name... is there some place that lists or describes what the plugin should be called? I know i know, I'm going to try it out without the 29stuff, but I like things to be silky smooth, not "trial and error".
Yes, I am a terrible programmer.
Based on the plugin's documentation, they refer to models as Forum.Profile for example which suggests that the plugins should be installed in APP/plugins/forum as that's where the CakePHP autoloader will look unless instructed otherwise (section 2).
for example fb plugin ; Load the plugin in your app/Config/bootstrap.php file:
//app/Config/bootstrap.php
CakePlugin::load('Facebook');
You can use all or some of the Facebook plugin as you see fit. At the very least you will probably want to use the Facebook Helper
public $helpers = array('Facebook.Facebook');

Resources