LiveScript with Meteor.js - javascript

I wonder if there is an easy way to get LiveScript files compiled to js in Meteor.js app. Found this mrt extension:
https://atmosphere.meteor.com/package/livescript-latest
But doing mrt add livescript-latest only gives error:
While building package `livescript-latest`:
package.js:3:9: Package.register_extension() is no longer supported. Use Package._transitional_registerBuildPlugin instead.
In the git repo of this extension the error is already fixed. So I can this directly to smart.json:
"livescript-latest": {
"git": "https://github.com/Whoaa512/meteor-livescript.git",
"branch": "master"
}
This seems to be installed fine, but when I try adding .ls files to the project, they are not seems to be compiled.
Anyone else tried LiveScripting with Meteor.js apps?

Try using the other livescript package. I'm not sure why someone created the livescript-latest package - both seem to be using version 1.2.0 of livescript.
mrt add livescript
This worked for me back when I was using LiveScript.

meteor add vasaka:livescript-compiler
https://atmospherejs.com/vasaka/livescript-compiler

Related

Unable to run the Angular Project

I am following some TUTORIAL for a simple login example and I am using Angulario latest version. I tried to understand the logic and downloaded the code from REPOSITORY, but can someone help me to see this in action? After downloading the project I just changed the directory to downloaded folder and then issued npm install and then issued ng serve , but it's giving me different errors like angular.json couldn't be found etc., Have searched online to overcome these errors, but no luck. I think I am making blunder, but please go easy as I am new to Angular.
It is a version conflict. from angular6 requires new file angular.json which is not found on your project.
Try running
ng update #angular/cli --migrate-only --from=1.7.4

yeoman-App --> grunt serve --> Warning: not found: compass

This is my problem:
I've installed a yeoman angular app and now i run "grunt serve".
I've installed this. Maybe i did something wrong while installing compass. Could it be a gruntfile.js problem?
Edit (For User555's Comment):
After trying to install grunt-contrib-compass i get this:
Information:
I see that this is already in the package.json and it is installed already through npm:
This is compass specific version error. Follow the discussion here: https://github.com/Compass/compass/issues/1618. You will need to updatecompass version or rollback to 0.12.3.
For those who experience the same problem: I dont know what i did wrong with the gem install sass stuff (it shouldnt be that hard to type this in the cli you might think).
No it isn't that hard and it is installed so all dependencies should be installed and ready for grunt-contrib-compass / grunt-contrib-sass (I tried with both)
Now i solved it with this it is a compiler in c++ so i dont need that stuff mentioned above... So actually I dont really know what was my mistake.. well now i can compile my scss files properly.

How to get angular2 to work in eclipse with typescript

So I was starting researching about angular2 and since I saw so many references to typescript being prefered I am trying to switch to it from javascript. Problem is, I saw a nice little guide I could follow to install it all in eclipse (angular, javascript, everything needed to launch the 5 minute guide code on the main page of angular), so I did it and managed to get it to work.
Now I would like to do the same with typescript, but I find myself lost since it doesn't seem to be working, I can't launch code, it's like node.js isn't working anymore, but since I do not know what the expected result is, I am not sure what is missing.
For example, I re did the 5 minute guide and notice as a difference that I do not have the installation of the modules, nor any run-as configuration ready, in fact, I can't manage to run as any typescript code I try to do.
What I did was:
1- Install Eclipse Mars, other guys uses older versions
2- Install Node.js
3- Install WildFly Server
4- Install TypeScript plugin https://marketplace.eclipse.org/content/typescript
5- Import my project in eclipse, you may have to create a new static web project and add your files in there. The 5 minute quick start is not an eclipse web project so you may not be able to import this. Do not forget to copy and past the same structure with the node modules that you have
6- Right click on the project > Configure > Enable Typescript Builder
7- Right Click the project > Properties > TypeScript > Compiler and configure as follows:
I hope this will do it for you.
Remember, this plugin does not respect json configuration file, so you have to do this manually as in the screenshot. Also, if you are going to provide arguments to your component constructor, You will have errors. Let me know if you got those. Another thing to mention is that using some annotations like #Input will not work, you will have to use inputs:[] inside your #Component annotation.
You can try to add those plugins on top of Mars:
https://github.com/angelozerr/angular2-eclipse
https://github.com/angelozerr/typescript.java
Those 2 are incubating but already provide good features. There is another one, that I didn't try but which has some popularity:
https://github.com/palantir/eclipse-typescript
Eclipse >= Neon
sudo npm install -g angular-cli (ng help must work)
See: https://github.com/angelozerr/angular2-eclipse
Install it and restart Eclipse
Open a .ts file
Eclipse Oxygen
Default javascript installation, then added the default free plugin for angular 2 / typescript from here:
angular2.ide - http://oss.opensagres.fr/angular2-eclipse/1.3.0/
After installing I opened an existing Angular 4 / TS project, worked fine. I then installed support for .scss from http://www.liclipse.com/text/updates. All setup and configured with Typescript 2.4.1 / nodejs v6.9.4.
But within days it now fails to open .ts files at all. Re-installation of the ng plugin did not fix it, I uninstalled liclipse plugin and no change either. It basically leaves eclipse unusable for ng4 projects as is.
The logs show the following errors.
org.eclipse.core.runtime.CoreException: Plug-in "ts.eclipse.ide.jsdt.ui" was unable to instantiate class "ts.eclipse.ide.jsdt.internal.ui.editor.TypeScriptEditor".
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
...
Caused by: java.lang.NoClassDefFoundError: org/eclipse/wst/jsdt/ui/text/JavaScriptSourceViewerConfiguration
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
...
Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.wst.jsdt.ui (441).
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:112)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
...
Caused by: java.lang.ClassFormatError: Name index 1 in LocalVariableTable has bad constant type in class file org/eclipse/wst/jsdt/internal/core/JavaModelManager
I found
TypeEcs plugin for Typescript
it provide below.
•Syntax highlighting
•Code Completion
•Code Outline
•Find References
•Rename / Refactor
•Open Type
•Code Compilation
•Format Code
•Comment Code
•Open Declaration
•Mark Occurences
•Type Script Debug

Getting error while adding phonegap LocalFileSystem plugin

I'm trying to add LocalFileSystem plugin into my project. But when i execute this command phonegap plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git from '../assets/www/' directory i get this error : JScript runtime error 800A1391 'window' is undefined
I don't think you're in the right directory, you want to be in the root of your Cordova/PhoneGap application (where the config.xml is located). For you, it looks like it might be your /assets/ directory. Also, try this command:
cordova plugin add org.apache.cordova.file
Taken from: http://plugins.cordova.io/#/package/org.apache.cordova.file
Try going to the main folder of your project (The highest level folder) and execute
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git
at the CLI. You also need to configure config.xml and AndroidManifest.xml according to the docs: Phonegap Docs
See phonegap-android-localfilesystem-is-not-defined
I was using phonegap 3.0. I updated phonegap to latest version 3.4 and that solved my problem. The .cordova folder was not present in my project directory.

Yeoman angular-feature generator cdnify task not found

I've been looking for some automatic way to generate an angular app. I tried to use the angular generator on YEOMAN, but I didn't like the app structure provided.
I found out this other generator angular-feature(https://github.com/codigo-pl/generator-angular-feature) which seems to solve my problem. But so far I could not make it works. Every time when I try to generate the app(on feature structure) returns me an error:
command: grunt build (even if I try grunt server returns me the same)
C:\Users\xxxxxx\WorkFolders\temp\testGenerator>grunt build Loading
"cdnify.js" tasks...ERROR
Error: Unable to parse C:\Users\xxxxxx\WorkFolders\temp\testGenerator .bowerrc:
Unexpected token v Warning: Task "cdnify" not found. Use --force to
continue.
Aborted due to warnings.
UPDATE:
Inside the file .bowerrc:
{
"directory": "app\vendor/bower_components"
}
My folder after running generator:
testGenerator
--app
----src
------common
--node_modules
There's no bower_components folder in any place in my APP folder.
Has anyone already used this YEOMAN generator and had the same problem?
Is there another YEOMAN generator structured by feature like this one?
Try this command in your project to fix the issue.
npm install --save-dev grunt-google-cdn
I am really not sure why this isn't documented officially anywhere nor why the default Yeoman project generation script builds with errors. I had to execute searches to find out about this command.
Also, make sure you are using a stable version of Node/npm. One of my problems was that I was using the latest version of npm, which is 0.11.12. However, according to Node.js's website, that version is unstable. Instead, I had to use version 0.10.26, their latest stable version.
Links:
https://github.com/yeoman/generator-angular/issues/12
https://groups.google.com/forum/#!topic/yeoman-dev/3LFTPpqRInU
the problem was sorted out and it was facing me all the time.
Problem
{
"directory": "app\vendor/bower_components"
}
Solution
{
"directory": "app/vendor/bower_components"
}
The generator is generating backslash instead slash. But the strange thing it seems be happening only on windows. Ubuntu and Mavericks I don't have this problem.

Categories