Specific Angular 2/4 & Meteor quickstart/tutorial? - meteor

I've been all over the Meteor and Angular-Meteor websites (and Angular-Meteor github) looking for a pure Angular 2/4 guide to using Meteor (all I can seem to find is an Ionic one). Kind of confused as to how to use the CLI's together. Does anyone have a tutorial or know the steps to setting this up without Ionic? Or should I just be trying to follow the Ionic tutorial but using Angular CLI instead?

For anyone who is interested.
I spent most the day trying to use https://github.com/Urigo/angular-meteor with my app (used the quickstart), copied most of my apps src into the clients/imports directory and tried to keep the same app structure as the one on github, with a bit of messing around was able to get the angular bit working however if you are planning on using #angular/material, especially with a custom theme then you're in for a world of hurt (quite a few issues and comments re importing scss mixins from node_modules on the meteor github, meteors build system doesn't seem to like it).
To make it all work properly, follow the steps in The process I've done to recreate this section at https://github.com/Urigo/angular-meteor/examples/angularcli-meteor
If you already have an angular 4 app partially built then start in your apps root directory at step 3 (ng eject).
Instructions are fairly straight forward. Any steps where there isn't code examples (Now we need to create api/tsconfig.json) copy the file in question from the repo.
Hope that saves some others a heap of time.

Related

NextJS to ElectronJS

I have a web app in NextJS and TypeScript working fine. Now, I want to move it to ElectonJS so I can move from the web and create desktop app versions. I have tried different approaches but nothing worked for me. I also failed to find a good documentation or article about migrating NextJS to ElectronJS.
I am using nextron but I can also use some other if recommended.
Approach 1: I created a new nextron app using "yarn create nextron-app my-app basic-typescript" command as mentioned on nextron guide. Then I moved the whole code inside the renderer directory but it is showing an error when I compile. Error in Approach 1
Approach 2: I created a dummy nextron app and install all necessary dependencies there, then I copied the files, dependencies etc to my NextJS app and moved the pages folder to renderer along with the necessary files but it is also showing error.Error in Approach 2
My NextJS App
Can anyone help please?

ASP.NET - install React and typescript

So have created an ASP.NET 4.5.2 project and now need to install react and typescript. I installed node.js so wondering if its best to install via that. Also because I will be using TypeScript I will need the .d.ts files is there an easy way to install these in the project locally? Cause I assume everything else will be installed globally by npm as I might use them in other projects?
One other thing I am confused by all the different types of react packages available on npm, do i need a few or just one of them? I have worked on many projects involving this kind of tech stack but they are established and have never created one from scratch like i am doing now. So some really informative links or tips here would be immensely helpful! :)
So using Visual Studio 2017 I followed this tutorial and managed to get it working. The only issue left now is that i need to call webpack cmd on the project root when i make changes before refreshing the site. I am fine with this and will look into further into automating it as it kind of is a different and unrelated question.
One thing I will include is to always install npm packages globally (most of the time anyway) and just link them in using npm link. Was quite useful considering I went through the process a few times creating the project from scratch over and over again until I understood it all.

Less files not being integrated by Meteor

Purchased a theme for my new app, which is entirely based on LESS. However, Meteor is not recognizing the #varable variables in the LESS files. I have over 100+ such files and these error lines span for that long as well.
Is there anything that I'm doing wrong here by assuming Meteor will compile all the files because the layout isn't working correctly and these LESS file problems are the reason. Anything I can do to fix this problem?
Please check if the version of less used in your purchased theme is compatible with the version of Meteor that your app is using. I had a similar issue recently where my purchased theme used an older version of less which was not compatible with Meteor 1.2. So, when I updated my app to the latest version of Meteor, my app layout was messed up as the less files were not properly interpreted. Please see Breaking changes in Meteor 1.2 - point 3 under Build tool and package improvements
Just my $0.02

making ionic project with firebase on yeoman

there is yeoman generate for ionic and firebase and I know how to make them with yeoman-generator BUT I want ionic + firebase project.
some solution[1] [2] told me that making ionic project and add firebase js file by my hand, but I think firebasee can be added by bower or something easy way to go though.
should i generate inoic project and add firebase though bower?
should i generate firebase project and add ionic though bower?
which one is better way to make it? and what command should i use for this?
TLDR: Long story short, don't use yeoman. It's pretty easy to do it without yeoman.
I'd recommend setting up an ionic project, add the firebase.js files, link to it in your index.html, and add the firebase components to your module/relevant controllers. You'll find great step by step instructions here:
https://www.firebase.com/docs/web/libraries/ionic/guide.html
They won't tell you this up front, but you'll also want to look at the angularfire API here: https://www.firebase.com/docs/web/libraries/angular/api.html
In the Ionic guild they'll show you $firebaseArray, but that's it. For things like $firebaseObject, those docs are found in the angularfire API.
I'd forget yeoman to be honest. I'm sure you can set up custom projects for yeoman, but I wouldn't bother.

Meteor.isCordova Folder

The ability meteor gives through its interaction with cordova to create mobile applications is incredible. I have one question however concerning the file structure: (https://docs.meteor.com/#/full/structuringyourapp). There is no documentation concerning a folder specific to Cordova. As I have been writing my application, it seems incredibly tedious to use if (Meteor.isCordova) for any segment of code that I want specific functionality for the mobile app. I tried creating a top level folder cordova such as is already done with client, server etc... and removing the Meteor.isCordova wrapping my js code, but that process was unsuccessful. Is there a way to do what I am trying to do just in a different manner?
There are currently no special folder for code which should only run on mobile. However it is a nice feature and I have created an issue on GItHub. If you'd like to see this feature, I'd encourage you to comment on it.

Resources