I've recently started developing in Ionic, and I find that once I've made changes to the index.html file and run it (ionic serve), it resets the index.html file.
I think I might be missing a step somewhere, any ideas?
Found the error. I was editing the file in the www folder and not the one in the src folder. Once I updated the index.html file in the src folder, the changes appear in the file in the www folder.
However, I find that when I update the controllers in the src/js folder, they are not updated in the www/js folder, so I have to make updates to the files in the www/js folder.
Not really sure of what's going on.
src folder is true development folder.
When ionic builds the app for you it automatically copies all the required files from src/ to www/.
If its not happening there might be something wrong with project, try removing and adding platform again.
Related
I installed gh-pages for my react project and ran into an error. I've shared an image which will make it clear. Due to that reason I can't save my package.json file.
After a simple debug, so many files are modified.
This is the print before debug:
This is the print after debug:
It happens in both platforms (iOS and Android).
The build folder is refreshed everytime you compile your app so all the changes that happen within it are shown here.
You can add a .gitignore to your build folder so these files won't be included in git. You generally don't need to back up/commit this folder as it will be created/refreshed every time you compile the app.
You can either add the whole folder to the main gitignore file or just use the command $ touch .gitignore inside your build folder with * as the content of the file.
If you're using VSCode I would recommend the GitLens extension which let's you (among other things) directly ignore a folder within VSCode.
I have an app in which I edited pubspec.yaml file and all files on /lib folder.
If I create a new project in flutter, which files are necessary to copy from that project to have a copy of that app? Is it only "those files that I edited" or there are some files automatically being edited when I edit pubspec.yaml or any file from /lib folder which I should also copy them in order to my older app work in a new project properly?
The generated files can be generated again, no worries. If you know for sure all the files you have edited, you can copy them. But if you change the package, you'd have to change the imports in the files as well. As João Soares said, you should also run flutter packages get to get all the packages you have on your pubspec.yaml
I have a servlets project called LoginPortal. In this project, I intend to add an html called login.html and a css file called login.css . I added them to Webcontent folder which is where I added other html files that I created in project it self.
Besides login.html and login.css, all other files were created n the project only and so work just fine.
The directory structure now looks like this:
However , I still get 404 error when I try to access this html file added externally :
URL :http://localhost:8080/LoginPortal/login.html
What could be the possible reasons ?
Eclipse seems to maintain a list of files which it will be deploy to target server when changed.
Since, you added those files externally and eclipse does not know about them yet, it will not deploy this files when changed.
You can do this. after adding this files externally go to eclipse project explorer. Refresh your project from your context menu(Right click -> refresh). This will include the file you added and get listed.
The files will be added instantly when ever there is a changes, and is reflected in the output.
I have an Eclipse project with some 50 different config files that currently reside directly under the src folder. I want to put them all in one folder, for example src/config so it's less cluttered.
But Eclipse doesn't seem to like it. Following advice from around here, I tried configuring the Build Path to include this folder, and the Run Configurations as well, but no luck.
What to do? Leave them all in the src folder?