Generated source files should not be edited in php storm - laravel

I am editing min.css file in php storm 2016.3 but its showing a message,
Generated source files should not be edited. the changes will be lost
And not saving what I add.

Laravel generated this file through MIX, so that file is a file that was generated by compiling the SCSS files on your project.
What Phpstorm is trying to tell you is that if you make changes in that file, and then run something like "npm run watch" its going to get overwritten by the SCSS compiler.

You may get this error if the IDE expects a file to be a Blade file (for example if it created in a subdirectory of views/base_templates) but it is not named as such.
In this case, the solution is to ensure the name of the file ends in .blade.php.

Related

phonegap file .bithoundrc and ignored files

I've noticed a file in phonegap called .bithoundrc
I searched for it's use but didn't get good info
I know that it ignores some file
I have also a js file and i want to ignore it in build
will this file ignore it?
thank you all .

PhpStorm: Can't analyse webpack.config.js: coding assistance will ignore module resolution rules in this file

The error started appearing at the start up of PhpStorm after I have upgraded to 2017.3.3
Webpack.config.js is a default one from Laravel 5.5 build.
Tried to suppress it with no success. Very annoying. Any ideas?
If you want to get rid of this problem you can remove the notifications & log for the Webpack from Settings->Apperance&Behavior->Notifications->Webpack
Common Cause:
There's an error in the Javascript used in your Webpack config when evaluated by IntelliJ.
But it works on the commandline?
It may work fine from the command line but the context that IntelliJ evaluates the config is different than the command line.
How can I tell what the Javascript error is?
Below the Can't analyse webpack.config.js error message, look for Error details:. If it's a Javascript error, this will give you a hint of what's failing.
Example:
I saw the following error when I opened a project in IntelliJ
Can't analyse webpack.config.js: coding assistance will ignore module resolution rules in this file.
Possible reasons: this file is not a valid webpack configuration file or its format is not currently supported by the IDE.
Error details: Cannot read property 'require' of undefined
In this case, there was a plugin configuration in the webpack.config.js using require.main.require. This is fine when ran from the command line but fails in IntelliJ because of the way IntelliJ evaluates the webpack.config.js. When IntelliJ evaluates it, require.main is undefined.
Just an workaround. This will make some changes to your project, but you can revert everything back to its original state after if PhpStorm works fine.
STEP 1
Make sure your git status is clean.
Close your PhpStorm.
Remove package-lock.json and node_modules.
Then regenerate package-lock.json with npm install.
Start PhpStorm and open your project.
Confirm that now it works. Event log like
Module resolution rules from webpack.config.js are now used for coding assistance.
STEP 2
Discard all changes with git checkout ..
Revert under node_modules with npm ci.
Now your project is before the workaround but with coding assistance.

compile stylus sheets to a single file

I am trying to write a watch script for my app. I have a stylus sheet for each feature of my app and I'd like to compile them into a single one.
stylus -u nib src/*/*/**.styl -o out/css/ --include-css -w
But this brings as many files as there are features. Is there a way to ensure that each newly compiled css file is appended to my out/css/main.css file rather than written as a new out/css/feature.css file?
Many thanks
You can import all the features in one file (main.styl) and watch only it (stylus -w main.styl), isn't it? Any changes to these files will be detected by Stylus and main.styl file will be recompiled as well. There is a reason why you don't do it this way?

How do I edit a .sublime-settings file if it's inside a package?

I'm trying to set up a Node build system in Sublime Text. I thought I'd use tanepiper's, and I'm following its instructions exactly, but there's a problem: my Node executable isn't found (yes, it's in my system PATH). It says to edit Nodejs.sublime-settings if that happens, but that file is inside Nodejs.sublime-package, which is an archive.
I can't edit the file in-place in the archive. I've tried extracting the archive and then zipping it up again and calling the zip a sublime-package, but that doesn't work either.
So what am I supposed to do here?
You should create Nodejs.sublime-settings in your Packages/User folder. The settings will be merged properly. If you really feel you need to modify the packaged file, use https://github.com/skuroda/PackageResourceViewer, though I'd recommend against it (for settings) as placing a file with the same name in the Packages/User folder will do what you want.

Where is the file that generates the config.rb file?

When I create a new Compass project, it generates several directories and files and provides the config.rb file. Rather than changing the config file every time I start a project, can I set this up in a existing default file? and where is it?
Take a look at this pull request, it might help: https://github.com/kahlil/grunt-compass/issues/13

Resources