Is it possible to get Typescript 2.0 to look at jspm_modules for types? - systemjs

basically as the title - Is it possible to get Typescript 2.0 to look at jspm_modules for types?.
Currently, I duplicate all my deps as node_modules which works but just doesn't seem right..
I have seen the typeRoots property but again, I cant get this to actually work.
any ideas?

Related

What should I use for i18n in Flutter: S.of(context) or S.current?

I'm using the i18n plugin for Flutter (I believe it's this one) that comes with Android Studio.
And in every example I see it says to use S.of(context).my_string to get the Strings but it always returns null.
If I use S.current.my_string, it seems to work.
So is S.current the right way to do it and every doc/tutorial out there is wrong, are they the same or what?
What I'm basically asking here, is what is the difference between them.
Seems like S.of(context) is initially available way to access localised string.
But sometimes you need to use it without Build Context (in ViewModel, for example). So S.current was added for these cases.
More info here

Include CoffeeScript into another one

It is a noob question, but I am looking for a solution, to include one coffeescript into another one, like in SASS or Pug(former Jade).
Like in sass:
#import ../sass/vars.sass
or in jade
include ../jade/footer.jade
I cannot find something like this in CoffeeScript. Is there any way?
Coffeescript is just a semi-language that is being translated into JS later on anyways, it does not allow modularization by itself. To build your app module-way, i prefer to use RequireJS, it works fine with CS.
http://requirejs.org/

No JSONFormatter works in Safari 8.0 on Yosemite

I tried several JSONFormatter plugins to prettify the var_dump data from the framework laravel.
None of the plugins worked, though. I have no idea why. I tried everything, but it always gives me raw text instead of formatted text
Any ideas?
PS: For example, I tried this one: https://github.com/rfletcher/safari-json-formatter
I got that problem too. Although my json format is valid, the browser still does not show it in a pretty way.
Well, I translate my result using Jsend (https://github.com/shkm/JSend) and the returned result works fine in all browsers. I am not sure why but this is a viable option if you do not want to spend time investigating.
Found the solution! The problem was hiding in my 'homestead.yaml' file. I had to turn this:
sites:
- map: website.app
to: /home/vagrant/Projects/Website/public
hhvm: true
to this:
sites:
- map: website.app
to: /home/vagrant/Projects/Website/public
h hhvm: true was causing the problem. I removed it, backed up my database (gets deleted) and ran vagrant provision {your vagrant-id}
I don't know why, but now it works :)

Ember CLI project crashes when I change CSS file. Am I missing something?

I'm pretty new to Ember but have used Ember CLI to create a project and am on my way. Lots to learn but I'm very impressed so far.
Anyway, my understanding is that Ember CLI projects use broccoli's file-watching features to create a "continuous development" environment. I've seen it in action: as I change templates or javascript files, my changes are immediately apparent when I switch back to the browser.
But when I make changes to css files, my app crashes. Console output is below. Note that when I restart the app with ember server, everything works as exepected. So this isn't some CSS syntax error or the like.
So ... this sure seems like a bug to me, but I'm so new around here that I'm wondering if I'm just missing something very basic.
We're not talking SASS files, either. I'm getting this error if I change a single character in a very small /app/styles/app.css - the one generated by ember new. I've also tried moving the style rule to a file called my.css and leaving app.css empty except for this one line: #import 'my.css'; No love.
Can anyone help? Thanks in advance,
-Billy B
D:\BitBucket\dispatch-alert\node_modules\ember-cli\node_modules\broccoli-sane-watcher\node_modules\sane\index.js:246
Object.keys(this.dirRegistery[dir]).forEach(function(file, i, arr) {
^
TypeError: Object.keys called on non-object
at Function.keys (native)
at Watcher.detectChangedFile (D:\BitBucket\dispatch-alert\node_modules\ember
-cli\node_modules\broccoli-sane-watcher\node_modules\sane\index.js:246:10)
at Watcher.normalizeChange (D:\BitBucket\dispatch-alert\node_modules\ember-c
li\node_modules\broccoli-sane-watcher\node_modules\sane\index.js:280:10)
at FSWatcher.EventEmitter.emit (events.js:98:17)
at FSEvent.FSWatcher._handle.onchange (fs.js:1039:12)
Update:
Based on the help I've gotten so far (thank you guys) and poking around a bit, I have a theory: because I can edit files in other directories and other editors just fine, I conclude that app/styles is just plain not in the list of "watched" directories. This could be a simple error of omission, but I"m wondering if it isn't deliberate. Wouldn't this directory be one that is processed by Compass and other CSS preprocessors, which might have their own file watching systems or otherwise have problems with watched files? Perhaps the makers of ember-cli have deliberately omitted this directory?
How do I find this out? And what should I do? Head over to the ember-cli project and ask for assistance there? I tried to find where a list of watched directories might be kept, but have so far been unsuccessful.
A workaround for the moment is to alter the index.js in line 246 (according in your error and my error messages) in the sane module and add something like this:
if (!this.dirRegistery[dir]){
console.log('error',' empty/unkown dir',dir);
callback();
return;
}
No idea if this is is valid fix. Somehow this is related to sublime. (Caching, File-lock?)..

MagnificPopup won´t work with Typo3

I would like to use magnific popup for a site which is still in development, but unfortunately nothing happens after the installation and adding the static content in my template.
No matter what i try no popup comes up.
If someone would like to help me i will provide access to the site.
Thanks a lot!
First thing to do:
look at your source code: does the 'link' show any sign of 'magnific popup' code?
Added classes? id?
Second: do you see any extra javascript and/or stylesheet that is added by the extension?
If you answer negative to 1 of these, the extension does not output anything. Sounds logic, but it is the first step. Is it a solution? Nope, it means your live just got a bit more worse, but hang in there !
If it does show any code from the ext: look at your console, are there any js errors occurred ? (if you don't know what console is, or (even worse) you work with IE) please read about chrome console of at least install Firefox with firebug.
My best beth would be a JS error...
Can it be possible that the ext itself does not work?
Does your php error logs tell you that the extension is behaving badly?
Do you see errors in the typoscript analyser (or whatever it's called to analyse the css_styled_content and other TS spaghetti )
If not, then no, it is not the ext.
Again, i'm betting my wive, three horses and a barrel of beer on JS erros.
Good luck mate !
ps: IF i'm wrong, i'm not sending you my wife by postal service. Loads of trouble last time. Nor the horses, same shizzle ..