For a while now, my client has been using some Node and Bower components to build projects. Whenever a new developer comes in, it's easy for that person to simply run
npm install
bower install
And then be ready to work.
We are working on a new project and this time we want to use JSPM instead of Bower. However, we want to leverage our existing private libraries (20+ of them) and we don't want to spend stupid amounts of time rewriting them. Plus they still need to work as regular Bower components for other projects.
So far, this worked. We used jspm-git to set the registry. However, JSPM fails in one regards: it does not install the Bower dependencies of those libraries it installed.
How would we go about that? I would love the other devs in the team to be able to check out the project and run
npm install
jspm install
And be on their way. It doesn't seem possible so far. Any set up we have forgotten? Any guidance will be greatly appreciated.
You need the jspm bower endpoint:
npm install jspm-bower-endpoint --save-dev
Then you need to register the bower endpoint with jspm:
jspm registry create bower jspm-bower-endpoint
Then you can install bower packages:
jspm install bower:angular-bootstrap-multiselect
Hope this helps :)
Just installed it successfully with jspm install npm:bootswatch, then required it in code with <require from="bootswatch/slate/bootstrap.min.css"></require>
Also posted this info on the bootswatch-dist project on github here: https://github.com/dbtek/bootswatch-dist/issues/32
Related
I'm using react-leaflet v.2.8 in my project. I want to upgrade the react-leaflet to v.3. But how? When I write "npm i react-leaflet", it installed only react-leaflet v.2.8.
One way:
npm uninstall react-leaflet
npm install react-leaflet
Another way:
Go to your package.json, and change whatever version number react-leaflet has to the latest one that is listed on npm. It should then look like this in the package.json:
"react-leaflet": "^3.2.0"
Then run npm install react-leaflet
Keep in mind there are lots of breaking changes from version 2 to version 3, so be prepared to update your codebase.
I cd to my react-native project directory, and run flow, it prompts me Launching Flow server for /Users/... Wrong version of Flow. The config specifies version ^0.32.0 but this is version 0.33.0. How do I install the previous version flow with Homebrew?
If you run brew info flow in the console, you'll see a line similar to the following:
flow: stable 0.33.0 (bottled), HEAD
This means that the person managing the flow homebrew formula is removing old versions as the version gets updated, so it's impossible for you to access any old versions, barring performing some behind the scenes business I'm unaware of.
Luckily, there's a solution for you. I assume you're using npm, in which case you can try the following:
npm install flow-bin#0.32 -g
This will install a binary wrapper for flow, packaged through npm, in which previous versions are all available. By installing globally, you can use the flow commands in the command line.
If you don't want to install globally, for fear of conflicting with other projects, etc., you can still install locally and use flow:
npm install flow-bin#0.32
Now, add the following to package.json:
"scripts": {
...
"flow": "flow ."
},
And now, you'll be able to run flow on your project with the command:
npm run flow
I see from here https://github.com/jquery/jquery-ui that jquery-ui's latest release is 1.11.4. However, when I use "npm install jquery-ui", it's only 1.10.3. I checked this version in node_modules/jquery-ui/jquery-ui.js.
Is there any way for me to install the latest version?
jQuery-ui specifically needs to be build after installation. To avoid this, use npm install jquery-ui-dist
T J gave the right answer, but it is a bit short / too generic.
The GitHub project is at https://github.com/jquery/jquery-ui/
So the real command would be npm install github:jquery/jquery-ui (you can even skip github: as npm defaults to it).
But this would bring you the latest, unstable version (around 1.12 at time of writing), and it didn't even work when I tried.
So it is better to fetch a tagged version:
npm install github:jquery/jquery-ui#1.11.4
Generic note: AFAIK, if the project hasn't a package.json file, this kind of install can still fail.
Here is the current latest version (1.11.4), same package that bower is using, including all themes.
npm install github:components/jqueryui#1.11.4
You can install it like
npm install github:mygithubuser/myproject
as mentioned in the install documentation
I am trying to use Bower to install jquery.
The frustrating problem I have been running into is that bower downloads the entire repro. I was hoping to tell bower to install a certain version of jquery and have only those files downloaded.
I did try the suggestion here with no luck. The entire repo is still downloaded even after clearing the bower cache
I would rather have something else manage which files to download than me manually specifying the file names in bower.json
bower.json in the repo : https://github.com/jquery/jquery/blob/master/bower.json
Thank you
I think you didn't unterstand the meening of bower:
Bower is handling you dependencys, so if you do a:
bower install jquery
it should download all files.
Now to you question:
you have following options:
declare wich file you want to download:
bower install http://code.jquery.com/jquery-2.1.0.min.js
but remember:
this file cant be updated easily
search for a js only package:
expample with bootstrap:
bower install bootstrap-css-only
but remember:
these packages sometimes are not up to date
use bower-installer (recommended):
install the bower-installer:
npm install bower-installer --global
and now follow the tutorial:
bower-installer github
sorry for my bad english :-)
I'm very interested in some of the concepts in ReactJs and would like to play around with it. I'm trying to start a project to play around with it but I've been looking all over and I can't seem to find it on bower. But then again bower search kind of sucks...
Is it on there and I'm just not seeing it? If is there something about it that makes it not a good fit for the bower model? I would expect that both projects are popular enough they would work together.
I'm not sure on the particulars of bower, but we have this repository:
https://github.com/reactjs/react-bower
which should be available as bower install react.
$ bower lookup react
react git://github.com/facebook/react-bower.git
$
To bower installation, you need to install to Git Shell, using command promt of it, your project have got a bower file. When you installed them, you should be follow the command below:
> cd d:/yourappfolder/
> bower install