For a AngularJS ui-grid feature currently I am using the below 2 dependencies directly through URL.
Are these available through 'Bower' tool please ?
<script src="http://ui-grid.info/docs/grunt-scripts/csv.js"></script>
<script src="http://ui-grid.info/docs/grunt-scripts/vfs_fonts.js"></script>
If you install pdfmake via bower you will find vfs_fonts.js in pdfmake/build/vfs_fonts.js. I know it's not exactly what you wanted but it is close.
Related
I am building a client/server app in Dart using Angular for the front-end and Shelf on the backend. When I do a pub build it generates the javascript for the Dart files as expected but is does not replace the dart references in my HTML files. So in my index.html I have the following script reference:
<script type="application/dart" src="main.dart"></script>
This makes my application not load correctly. If I manually change it to
<script src="main.dart.js"></script>
My application works as expected. My question is, is there a way to configure my pub build to do this automatically? Or are dart files references not supposed to be replaced with JS references? If so, how do I build a basic server?
I know this produces an error message in the browser console but never experienced any problems because of this.
I haven't used it myself yet but I think this transformer https://pub.dartlang.org/packages/dart_to_js_script_rewriter does what you want.
How is Bower different than jspm? Can Bower provide jspm functionality about SystemJS universal module loader?
Well JSPM is much larger and ambitious project than Bower. Bower has only one purpose-to download source files you need from the web to your hard disk. For you as a consumer, bower doesn't do anything else. If you want to execute script files from bower, you need to create your script tags for each of them.
While jspm is not only a module downloader. It downloads by default systemjs that you have mentioned. SystemJS is implemented as closely to https://whatwg.github.io/loader/ as possible. Actually author of JSPM is very active participant of the specification process. With systemjs, today you are able to load ES6(by transpiling them in the browser), CommonJS or AMD modules in the browser without building them. Not only ES6 modules, but all the other ES6 features supported by traceur/babeljs/typescript. Depending on which compiler you choose when running jspm init. SystemJS works 1:1 in node.js as well as in browser, so unit testing your app is easily done.
Also it can build the bundle for you(jspm build) when you need to go to production. So it is obvious that jspm(+systemjs) is a more powerful tool.
So as a rule of thumb:
need to quickly get jquery and include it in your serverside templated html? Go with a regular script tag. Bower has been deprecated.
need to build large JS app? Go with Webpack. JSPM has failed to reach critical mass and everyone's doing webpack now.
To add on to Capaj's answer:
If you have a small project, go with jspm anyway! It's the future! (who knows, things change, but this is a good bet).
Small project use:
$ jspm install jquery
then in your HTML:
<script src="jspm_packages/system.js"></script><!-- required -->
<script src='config.js'></script><!-- required -->
<script type="module">
System.import('path/to/your/main.js')
</script>
then in main.js:
import $ from 'jquery'; // ES6-style import
// do whatever with jQuery here.
You can use CommonJS, AMD, or ES 6 module formats. JSPM auto-detects them in your files (you can't mix and match in the same file though).
var $ = require('jquery'); // CommonJS-style import
// do whatever with jQuery here.
define(['jquery'], function($) { // AMD-style import
// do whatever with jQuery here.
})
I am using breeze with angular.
I have upgrade breeze to 1.4.11 and install breeze.angular.js.
The beginnings of a "breeze service" that tells Breeze to
use $q for its promises rather than Q.js
use $http for AJAX calls.
Consequently Breeze no longer requires the jQuery or the Q.js libraries
although non-Breeze code in your app may require either or both.
My problem is that I am still using breeze.savequeuing.js which requires window.Q.
Is there any official solution for this scenario or I have to manually change breeze.savequeuing.js?
It is simple. I can use HACK from angular.breeze.js breeze.Q is $q
We do not yet have an Angular version of breeze.savequeuing. It's on my backlog but way down the list as I try to discourage folks from getting in a situation where it is needed.
You are welcome to write one and contribute it. I recommend writing it as a real ng service rather than a simple Q-for-$q hack. If you like I'll look it over and give you my thoughts.
All the best.
As you mention "discouraging folks ..." I have to mention that the Breeze Todo Sample makes use of breeze.savequeuing.js:
<!-- 3rd party libraries -->
<script src="Scripts/angular.js"></script>
<script src="Scripts/jquery-1.8.3.min.js"></script>
<!-- Q is needed by breeze.savequeuing, not by Breeze-->
<script src="Scripts/q.min.js"></script>
<script src="Scripts/breeze.debug.js"></script>
<script src="Scripts/breeze.angular.js"></script>
<script src="Scripts/breeze.savequeuing.js"></script>
<script src="Scripts/toastr.js"></script>
Perhaps you may use this sample to show everyone to show how not to get into the situation where savequeuing.js is needed :-)
How to add jQueryUI plugin to my Blogger (Blogspot) site?
I know I can download it and use it offline, but (as far as I know), you can't upload separate files to Blogspot, so I can't call them with src.
You can download it for offline purpose, but for online purpose you particularly don't have to upload it somewhere. You can use online jQuery libraries direclty and add this snippet code in the footer (Recommended) or header area of the template as per your requirements.
jQuery on Google APIS
Snippet: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
note: 1.2.5 and 1.2.4 are not hosted due to their short and unstable lives in the wild.
jQuery UI on Google APIS
Snippet: <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
note: This library depends on jQuery. You must also load jQuery before loading this module. Version 1.8.3 is not hosted due to its short life, and the alias 1.8.3 actually loads 1.8.4.
OR
Add this code from their official web:
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
you can use the custom gadget facility on the blogspot.com site in which you can easily use the javascript and jquery code in one file .
Upload somewhere else, or just link it from google hosted libraries,
https://developers.google.com/speed/libraries/devguide#jquery-ui
Has anyone used the FullCalendar-mobile plugin? I am trying to use this in a jQuery Mobile app bundled with Phonegap. There are tons of js and css files in the src folder but I can't seem to figure out which one to use. Linking all of them to my html page didn't yield any results.
Pardon the very noob question. Kinda new to jQuery, HTML5 & CSS. Would greatly appreciate the help.
Thanks!
I'm just going through this myself. My understanding is that you'll need to do the following:
Download the files from
https://github.com/JordanReiter/fullcalendar-mobile using either git
or the 'download as zip' button.
Navigate to your downloaded directory
Type make zip, as per the instruction from the link above. (You'll need java installed apparently)
In the dist directory created by the above process you should see the fullcalendar directory containing the js and css files you need.
Copy those to your project and link appropriately. You are now officially good to go
I have the same problem with the css files. Until now I'm not able to combine the style sheets delivered with jquery and jquery mobile for the desired result:
http://thomkerle.blogspot.ch/2012/07/problems-with-jquerys-fullcalendar-and.html
Note:
for basic usage you can just take the latest fullcalendar version! There will be some events that are not supported (but basically you can press on a event and navigate through the calendar).
See also:
http://forum.primefaces.org/viewtopic.php?f=8&t=23763
Looks like you want to use the _loader.js file
just keep the structure of the directories that exists
I am working on this right now ill post updates as a reference. The documentation states:
<link rel='stylesheet' type='text/css' href='fullcalendar.css' />
<script type='text/javascript' src='jquery.js'></script>
<script type='text/javascript' src='fullcalendar.min.js'></script>
<script type='text/javascript' src='ui.core.js'></script>
<script type='text/javascript' src='ui.draggable.js'></script>
<script type='text/javascript' src='ui.resizable.js'></script>
None of these files are on github the last 3 are clearly from jquery UI