How to change PhpStorm SCSS File Watcher Settings to Compile / Export css into different folder - scss-lint

I have SCSS and CSS folder into a project. I am writing my code into SCSS file which is located into SCSS folder. Now i want to output this code into CSS file and this file location will be CSS folder.
My project folder tree

|-CSS
|-SCSS
Arguments: --no-cache --update $FileName$:$FileParentDir$/css/$FileNameWithoutExtension$.css Working directory: $FileDir$ Output paths to refresh: $FileParentDir$/css/$FileNameWithoutExtension$.css
NOTE: add --style compressed to Arguments for minified output

Related

File watcher: "An output directory must be specified when compiling a directory"

cmd.exe /D /C call C:\Users\sebas\AppData\Roaming\npm\node-sass.cmd style.scss:style.css
An output directory must be specified when compiling a directory
The scss file I want the file watcher to watch is placed at the root of my project.
Watch the error appear: gif_link
How do I fix this error?
If you like the .css files to be generated in the same folder as original file, try the following settings:
Note the Create output file from stdout option - it has to be enabled, as node-sass writes CSS to stdout unless the -o option is passed.
If you like to place generated files in a separate folder, use the -o option:
I got same error working with webpack bundler and setting my scripts in package.json
In my case to resolve this issue you need to add output directory ( -o name-of-directory).
If working with scripts in package.json it should look like this:
scripts: {
"scss": "node-sass --watch src -o src"
}
src is folder where sass file which I want to compile is placed.
It means compile sass from src folder and send compiled files to src folder.
In this case css file will be placed on same place where sass file already is.
With node-sass for me is working to set Arguments to
$FileName$ -o . $FileNameWithoutExtension$.css
and unchecked "Create output file from stdout".

Fontawesome with Foundation 6 - Error

I'd like to incorporate fontawesome icons on my Foundation Sass project and I am having an issue. I have done everything as suggested by fontawesome team and yet it is not working...
I bower installed the fontawesome
I have added the scss file to the config.yml
I have changed the path name to fonts folder
https://postimg.org/gallery/1h018wsm8/
What I get in my browser is weird symbols and for some reason it is not working. Can you please tell me what I am missing? Thanks...
You have to #import the scss file from the bower_components folder in your Foundation _settings.scss or app.scss file.
The reference you have in config.yml is the PATH to the plugin/module not the import of the actual scss file. What this does is copy the *.scss files to the dist directory, but they still require referencing from your site/app code.
e.g. I use app.scss to import the various scss files and so my #import command for Font Awesome is:
#import '../../../bower_components/font-awesome/scss/font-awesome';
Note: this is to the specific file font-awesome.scss (where you set the font files path), not the whole directory so you also need to make sure you import the font files too which can be done via gulpfile.babel.js + config.yml.

Import many javascript files in a directory into Ember-CLI

If I have a repository in bower_components containing a folder with 50 JS files, I cannot include them one at a time in my Brocfile with app.import(). How do I include them all in the same call?
If I try to app.import an entire directory of js files, I get this error on compilation:
You must pass a file to 'app.import'. For directories specify them to the constructor under the 'trees' option.
what you are loocking for is the broccoli-static-compiler npm package which manage this perfectly, you can get it there : https://www.npmjs.com/package/broccoli-static-compiler and it's provieded with a nice documentation.

Why doesn't Django produce locale files from template files in another directory?

Version info:
Django version 1.3 pre-alpha SVN-13858
Ubuntu GNU/Linux 10.10
I'm totally new to i18n and l10n in Django and currently I'm trying to make my Django project available in Dutch (in addition to its default language: English). I tried to apply the instructions given at http://docs.djangoproject.com/en/dev/topics/i18n/translation/ and http://www.djangobook.com/en/2.0/chapter19/ but I had no success. I don't know if this is related to my directory structure and template files being in a completely different directory (I mean not as a subdirectory within the my Django project directory). My project directory looks like the following:
/home/emre/mydjango/myproject
/home/emre/mydjango/myproject/myapp1
/home/emre/mydjangotemplates
/home/emre/mydjangotemplates/myapp1
In the myproject and myapp1 directories I tried to issue the following command:
django-admin.py makemessages -l nl
But received the following error:
Error: This script should be run from the Django SVN tree or your project or
app tree. If you did indeed run it from the SVN checkout or your project or
application, maybe you are just missing the conf/locale (in the django tree)
or locale (for project and application) directory? It is not created automatically,
you have to create it by hand if you want to enable i18n for your project or
application.
So I tried to create locale directories within myproject and myapp1 directories. After that I issued the above command again (once in the project and once in the app directory) and this time without any error or warnings it said:
processing language nl
I checked the locale directories and saw that they were populated with sub-directories but there weren't any .po files at all:
$ tree
.
`-- nl
`-- LC_MESSAGES
2 directories, 0 files
I double checked that I have my .html files (template files) in home/emre/mydjangotemplates and that they include {% load i18n %} and some lines like {% trans "A piece of English text" %}.
What am I missing? Should I invoke the django-admin.py makemessages command with different parameters? Why doesn't Django create .po files even though I have some text to be translated in my .html template files?
makemessages only looks in directories under the current directory. You can try creating a symlink from somewhere under your project to your templates directory and add the -s to make it follow symlinks.

How to edit several directories as one project in PyCharm?

I created a django project and as it was recommended in django tutorial I placed static files like .js in separate folder as well as template directory.
The result structure is like:
MyProject >
scripts # place for .py files
static # .js, .jpg etc
templates
Now when I open MyProject directory in PyCharm, it wants all imports starting with "scripts". Like from scripts.myapp.mymodule import MyFunc. But it is ugly.
Is it possible to open all 3 directories as one project or tell PyCharm where the sources are?
Go to Settings | Project Structure and mark the 'scripts' directory as a source root.