SCSS / SASS to CSS in special folder with PHPstorm 7 file watcher
AAAAAAArrrgh!
the "backslashes" were the problem.
output path
$FileParentDir$/css/$FileNameWithoutExtension$.css
How to set PhpStorm scss watcher if css and scss are separate sibling folders in static
I'd suggest changing arguments as follows:
Arguments: $FileName$:$ProjectFileDir$\static\css\$FileDirPathFromParent(scss)$$FileNameWithoutExtension$.css
Ouput paths to refresh: $ProjectFileDir$/static/css/$FileDirPathFromParent(scss)$/$FileNameWithoutExtension$.css:$ProjectFileDir$/static/css/$FileDirPathFromParent(scss)$/$FileNameWithoutExtension$.css.map
PhpStorm and SCSS compile scss file into one css file
if you have a primary SCSS file that imports other files (partials, their names usually start with underscore), you just need to make sure that '
Track only root files
' is enabled in File watcher settings to get the output merged into a single .cssIf you don't like
.map
files being created, pass--sourcemap=none
to compiler
Intellij: Sass to CSS: file watcher output folder
Try changing your watcher as follows:
Arguments: --no-cache --update $FileName$:$ProjectFileDir$/assets/css/$FileNameWithoutExtension$.css
Output paths to refresh: $ProjectFileDir$/assets/css/$FileNameWithoutExtension$.css:$ProjectFileDir$/assets/css/$FileNameWithoutExtension$.css.map
If your main.scss
imports all your partial .scss
files, and Track only root files is enabled in file watcher settings, the ../css/main.css
will be created/updated when you make changes in any of these files
How do I correctly setup the scss file watcher in PhpStorm?
From the manual: "In the Output Paths text box, specify the files where the transpiler stores its output: the resulting source code, source maps, and dependencies. Based on this settings, PhpStorm detects files generated through transpilation."
Is it possible in PhpStorm File Watcher to compile SCSS to CSS AND create minified css?
Possible solutions:
Create 2 files watchers -
SCSS->CSS
andCSS->MIN.CSS
. Use any available CSS uglifier for the second one - YUI Compressor, for example. See https://www.jetbrains.com/help/webstorm/2016.3/minifying-css.htmlcreate a batch script that does the job (calls SCSS compiler for your .scss and then compresses the resultant CSS) and set it up as a file watcher
Use Gulp/Grunt tasks to compile and minify your files. You can either set up Gulp/Grunt as file watchers, or use Gulp/Grunt
watch
tasks
PhpStorm SCSS file-watcher creates duplicates
There are 3 dots in the output path. Change it to:
../css/$FileNameWithoutExtension$.css:../css/$FileNameWithoutExtension$.css.map
Related Topics
Google Map V3 Initializing with Horizontal Gray Line W/ Foundation in Chrome
Text-Align: -Webkit-Center Vs Text-Align: Center
Overriding Styles in Semantic UI React
Internet Explorer Incorrectly Calculates Percentage Height for Generated Content in Td
How to Do Horizontal Scroll in Ionic 3
Tailwind CSS How to Code Pixel Perfect Design
Overriding Bootstrap Table-Striped CSS
How to Render Segoe UI Font in Different Navigators and Os's
Bootstrap 3.0 - Vertically Align 3 Panels in The Same Row (Auto Height)
Sourcemaps with Webpack CSS-Loader
Sorting CSS Properties into an Arbitrary Order
@Media: If Samsung Galaxy S4 Is 1920X1080
Bootstrap4 Make All Input-Group-Addons Same Width