App.css in laravel moves to previous state - laravel-5.1

Whenever I change something in app.css and then in app.scss and run npm run development, all my changes in app.css file vanished and previous state of the file appeared. How to save the changes in app.css in laravel

Related

Run Electron main process from URL

I am using webpack-dev-server to build and serve an electron app. I am using the multi-target support so it builds and serves both the Renderer and Main files. These are available at http://localhost:8080/, in my case the Main entry point is http://localhost:8080/background.js, and the Renderer index.html is http://localhost:8080/ which loads http://localhost:8080/js/main.js.
webpack-dev-server only builds the files in memory - they are never written to disk. However Electron only seems to run its Main process from files on disk. I.e. if I run electron path/to/background.js it works fine, but that file doesn't exist when using webpack-dev-server. If I run electron http://localhost:8080/ it just loads the Renderer index.html and never runs background.js.
Basically I want to do
electron http://localhost:8080/background.js
and have it download and run that file as the Main process. That command doesn't work (it just opens the background.js file as text. Is there any way to achieve this short of doing it manually with curl or whatever?
I settled on a workaround - you can make webpack-dev-server serve its output from memory and write the files to disk. I added this to the webpack config for my Main process:
devServer: {
writeToDisk: true
}
Note that due to a bug you need to add it to your Renderer config too, even though you don't need those files, otherwise nothing gets written.

Corodva serve command just reset the app erasing all my changes

I use the command cordova serve to test the app in browser. But when I issue the command, I find all the code changes I made to the app has been disappeared include newly added js files etc. The app just got a complete reset. How can I avoid this and still use cordova serve command to test in browser? Thanks.
I got the issue resolved. It took sometime to figure out what is happening under the hood. As I was making changes directly in platform IOS directory, the cordova prepare or serve statement just replaces the code from the parent www folder.
To conclude, I have to make changes in root www folder and then issue the prepare/serve command that copies the code to the platform to test it out.

Jekyll assets get deleted

I'm using jekyll to build a simple static website. My _config file is basically the default. I have an issue with including images in my website.
I have an images directory inside my _site/assets directory (which I simply copy pasted into). Upon running the website with bundle (locally), the images folder gets deleted from the directory. If I copy it back there then the images are properly shown on the site, but upon refresh they are deleted again.
As I understand it, I need to build the folder using bundle so it doesn't delete it, but the exact way this is done is unclear to me. Can someone please explain what is happening and how I could fix it?
I have an images directory inside my _site/assets directory (which I simply copy pasted into). Upon running the website with bundle (locally), the images folder gets deleted from the directory.
The _site folder is deleted and rebuilt after every change or jekyll build execution. You should put your files in the /images/ directory in the main project folder.
As I understand it, I need to build the folder using bundle so it doesn't delete it, but the exact way this is done is unclear to me. Can someone please explain what is happening and how I could fix it?
In Terminal, navigate to the root directory of the specific jekyll folder (e.g. /theme-name/) and use the command jekyll buildto rebuild the _site folder reflecting any changes you've made.
_site folder gets regenerated in each build, it is where jekyll outputs the final site.
You should place the images folder at the root directory, so it will be copied by Jekyll to _site/images.

yeoman creates project in Desktop even though I CD into directory

I am having a issue creating a yeoman project. I cd in the directory type yo and it says:
Here is it suppose to asked me project name etc and it wants to throw everything on my desktop not the file I cd into. It defaults to mvn and I want gradle. I even npm uninstall -g generator-jhipster
and reinstalled it and got the same issue.
If you have a .yo-rc.json file in a parent directory, Yeoman will load that configuration and generate from that file instead of prompting. This allows developers to run a yo command from any folder in the project and have it apply to the correct files.
To solve this, remove the .yo-rc.json from the parent directory, in your case /Users/drew/Desktop.
For example, if you are in the directory /Users/drew/Desktop/new-project but /Users/drew/Desktop has a .yo-rc.json inside, Yeoman will change to the parent directory (Desktop), load the configuration, and generate the files from that folder instead of the child folder.
Based on your log it's looks like you are running yo in a folder where a .yo-rc.json is already existing. Careful under windows the .yo-rc.json can be that is of type hidden and you can't see it in explorer. Because of an existing .yo-rc.json you are not asked anymore for info e.g. project name, build tool etc. My recommendation will be to create a new folder run inside yo command

Ruby change directory in code

So, I've came across an issue where I delete the current folder where my ruby script is executing ex:
/home/user/scriptfolder
Now i have my ruby gem running and I do this:
mycommand --deletefull
now mycommand is an GLI command, which should delete the content of the folder and the folder itself. I do that by using my custom class:
ClientModuleDir.rm_f(path)
now after deleting it I want to just do cd ..
however I've tried several methods:
system('cd ..')
Dir.chdir(dir) #dir is abs path without the scripfolder name, i've tried every combination with this command, nothing works so far.
However these methods are not working.
I still am in the
/home/user/scriptfolder
after executing these commands, but the folder DOES NOT EXIST. When I manually do cd .. and i do ls the folder is not there.
How do I change "physically" the folder in ruby code ?
The current working directory is always kept for the current program only. Changing the working directory in a program won't affect any other running programs, including its parent.
Thus, when you delete the directory in your Ruby script and change the working directory of the Ruby process one level down, this won't affect the shell process which has started your Ruby script.

Resources