PWA: where should I install it? (react) - progressive-web-apps

I try to install PWA in an existing project in react. There is a manifest.json file and a serviceworker.ts file in the project.
I try using PWA Studio on VS Code to diagnose the existing code but when it ask me the manifest, ok and when it ask me the serviceworker the file is grey...
Should I create new manifest and serviceworker file? Should I edit these files?
I tried with manifest.json but when I use the "generate icons" tool of PWA Studio, I have an error "you first need a web manifest".
Maybe the location of the files are not ok? Manifest.json is in the frontend/public folder and serviceworker.ts is in frontend/src. I don't know why it was chosen that these files were put in these folder, I think I cannot move them but I'm not sure...
I don't understand what I did wrong... Could someone guide me, please?

Related

Unverified breakpoint in VSCode in Flutter

My debug mode does not work as I see the unverified breakpoint notice in VSCode in debug mode.
I already checked the Launch json file and it is fine, but something else is wrong which I do not see what it is. Maybe something related to paths, etc.
I tried to make a new project in VSCode using the command and the new default Flutter project is OK.
So it seems like, if I can make a fresh project from my current project then my problem could be solved. But how? I tried to move my files from my current project to the newly made Default Flutter project but I do not think this is the way. Because I guess some of the files in my project are the source of issues...
I already deleted .vs file but no help.
Do you have any good idea how to fix this issue?
First try cleaning the project files using flutter clean then flutter pub get, try running the app without debugging and if you are down for making a new one just move the lib and assets folders and copy the content of pubspec.yaml file.

How to run files as a project in VS Code?

I'm trying to learn Vue.js as well so I create a simple folder called VueTest.
I have two files in the folder:
app.js
index.html
I found the info on how to configure the task runner to open up the current file and I have that setup to open in Chrome, which it does. However, because it's not running as a project, my index.html doesn't see the app.js file and so my Vue project is not working correctly. I just runs the HTML code an all I see is my mustache code (ex: {{Title}}).
How do I run files as a project?
If get it correct - you want to launch js app without opening teminals outside 'VS Code' then you have to see this
Have fun
I found my mistake, it's actually easy and I should have figured this out before posting.
To run Index.html on it's own, all I had to do was make a script reference in the page pointing to the app.js file. I didn't have to do that in JsFiddle.
you can't run files as a project in VS Code. it is just a text editor.

Change .vscode folder location

I'm programming a client side applications using SharePoint Designer 2013.
I want to change to VSCODE since it supports a lot of extensions for some Javascript library like angular, jQuery. And because of the Chrome/Node.js debugger extension.
But when I try to start any Debugger, I got the error:
Unable to create 'launch.json' file inside the '.vscode' folder (Error: UNKNOWN: unknown error, mkdir '\\servername\DavWWWRoot\sitename\Style Library\.vscode').
I get this error because it's impossible to create a folder in SharePoint where the name starts with dot.
So there's a possibility to change the name of this folder or the file location to any directory in my local computer?
No, it's not possible to move/rename that folder. VS code is a tool that bases project management on folder content. So it is essential that the project settings reside in the folder being managed.
You can move the "extensions" folder, but unfortunately not the argv.json (so the ".vscode" will, at least be recreated on vscode launch)
https://github.com/microsoft/vscode/issues/17691#issuecomment-559234574
I hope that'll finally change sometime .
https://github.com/microsoft/vscode/issues/3884
https://github.com/OmniSharp/omnisharp-roslyn/issues/953

Android Studio - Library reference ../google-play-services_lib could not be found importing project

I am trying to import from Eclipse to AndroidStudio a project of mine and I am getting the following error
First I do not understand why it does not replace the google play services lib for the corresponding entry in the gradle file.
What should I do in order to fix the situation? Any guidance or link to a tutorial would be helpful.
Well, there might be another way of solving this problem, but I ended up removing the line in the project.properties file that was making reference to the google-play-services_lib library.
The simplest solutions is remove this line of code , android.library.reference.2=../google-play-services_lib,from project file (you will find it in project's root folder ) rest android studio will handle itself
Find the file:
An alternative is to simply set the path. You'll need to have installed play services via the Android SDK to use it with Android studio anyway.
Once play services are installed, if you highlight the Google play services entry in the Android SDK manager it will show you the path to the install location. On MAC this is normally something like /Users/[homedir]/android-sdks/extras/google/google_play_services/libproject
Edit the path in project.properties to point to this file and it will import. You can then update your gradle build file as necessary.
I think "removing the line in the project.properties file that was making reference to the google-play-services_lib library" is not a good fix.
To really fix it do either of these :
Just edit the location of the path to google-play-services_lib in project.properties file in your Eclipse project root directory.
android.library.reference.1=path/to/the/google-play-services_lib
Note:If you are on windows path\comes\like\this you have to replace the backward slash with the forward slash and your path/will/become/like/this.
e.g :
C:/Users/username/AppData/Local/Android/sdk/extras/google/google_play_services/libproject/google-play-services_lib
or replace "\" with "\" like below :
android.library.reference.1=C:\\Users\\username\\AppData\\Local\\Android\\sdk\\extras\\google\\google_play_services\\libproject\\google-play-services_lib
otherway is - just look at the last portion of the last line of the error
....which resolves to ...folder_name/google-play-services_lib
just create a folder at that location and paste google-play-services_lib from your google_play_services\libproject\google-play-services_lib
I just changed it works for me
android.library.reference.2../google-play-services_lib which changed to
as
android.library.reference.google-play-services_lib
The easiest and simple solution is to copy google-play-services_lib folder from another project or SDK folder and past it to the location which is address in the error. By removing or commenting line in the project.properties will create errors in the project and won't allow you to build unless you take necessary steps and fix.

How do I create a new folder and deploy files to the 12 hive using VseWSS 1.3?

I have created a web part using VSeWSS 1.3. It creates a wsp file and my web part gets installed, everything works great.
I would like to also create a folder in the LAYOUTS directory of the 12 hive and place a couple files in there. How do I go about doing this? I know that I can manually place the files there, but I would prefer to have it all done in one fell swoop when I uses stsadm to install my solution.
Is there a best practices guide out there for using VSeWSS 1.3 to do this? They changed a bunch of stuff with this new version and I want to make sure I don't mess anything up.
You can create a new folder structure in your webpart project, like:
Templates/Layouts/CustomFolder and put your files in the CustomFolder directory and include them in your project.
When you go to the WSP View in Visual Studio, you can see in the manifest.xml that your files are being included in the deployment.
I have done this successfully on multiple projects now.
In case anyone is wondering, the VSeWSS 1.3 user guide is incredibly helpful. It is installed to the same directory as the tool itself, default in C:\Program Files\Microsoft SharePoint Developer Tools 9.0\VSeWSS13.CHM
You can see a working example with screenshots Here
A simple step-by-step tutorial for the above, along with deploy/retract scripts is here at Add New Files To 12-Hive Through A SharePoint Solution. Just follow the steps and in a few minutes you'll be able to add whatever you want to the 12-Hive!