When writing an #import statement in an SCSS file how does Compass know where to look?
I don't think this has been answered very well and I'm unable to find anything in the documentation.
I've been browsing the folders for the various Ruby gems and at one point I thought that any folder called stylesheets got added to some list somewhere (but where??). This can't be the whole explanation, however, since I've also seen #import's referencing files that are not inside such a folder. I also haven't been able to find any config files defining this inside the gems.
Where is this information located or how is it generated?
From http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#import:
"Sass looks for other Sass files in the current directory, and the
Sass file directory under Rack, Rails, or Merb."
You can shortcut imports by keeping them alongside the importing file and naming them "_[filename].scss" Then import them with #import "[filename]"
Compass scss/sass files are on your gem path:
gems/compass-[version]/frameworks/compass/
Related
I have compiled the labstreaminglayer library for an iOS app, which works fine. But I would like to do some configuration as described here. But I can't get the library to find the lsl_api.cfg file.
Just putting it in any of the folders in XCode doesn't work, even though I can see that is there by searching for it and printing the path. I can set the LSLAPICFG environment variable but again anything I can think to put in there for a relative path doesn't point to the right place and I can't find any other env variable in this list which gives the absolute path...
With the benefit of a nights sleep I realised I can just edit liblsl and add some logging to figure out what is going on. So liblsl tries to look for the config file in the ~ folder, giving the path:
/private/var/mobile/Containers/Data/Application/GUID1/
While the lsl_api.cfg file is copied to:
/private/var/containers/Bundle/Application/GUID2/APPNAME.app/lsl_api.cfg
And libsl can't seem to access files in the GUID2 folder at all, something to do with sandboxing perhaps?
But both liblsl and the App can both access the /Documents folder (perhaps because I enabled iTunes File Sharing?) so I can just chuck the cfg file in there and update libsl to find it. With the added benefit that I can just edit it on my mac.
So I'm still not sure what I would do if I didn't want to put the cfg file in the /Documents folder but at least this works!
So I'm trying to change the directory the integrated terminal runs my Python scripts in from the root workspace (the default, I guess) to the running file directory. I want to do this as I'm more used to work with paths relative to running file than to root dir. Also sometimes I use quite large directory trees and even paths to near directory files get quite long by starting them from root dir. This would also allow me to use Path Intellisense extension as it seems to base suggestions on the current file dir.
I heard about changing the lauch.json file but I'm looking for a definitive solution that avoids having to change this in all projects.
I have already tried to change settings.json cwd option to "terminal.integrated.cwd": "${fileDirname}" but it doesn´t seem to take any effect, even after reloading.
I'm not sure what other infos are relevant here, but nevertheless i'm running vscode on windows 11 version 21H2. Any other info feel free to ask.
Thank you all in advance
I've been told by Mason Wendell that I can use Breakpoint in my application without Compass.
I have gem 'breakpoint', '2.4.1' in my Gemfile and #import "breakpoint" in my application.css.sass but it fails to locate Breakpoint.
Mason stated "Just get your import paths to find the _breakpoint.scss partial and you should be all set.".
I'm a bit confused about how to actually do this.
Any ideas?
There are two styles of using Sass dependencies:
Fetch with RubyGems, apply with a pathless #import 'breakpoint';, made possible by Compass.
Fetch manually with Bower into a subfolder within your project folder, apply with a relative #import 'bower-components/breakpoint/stylesheets/breakpoint'.
There is a way to import Sass dependencies with a pathless #import of a RubyGems-installed dependency and without Compass: put the directory of where RubyGems stores Breakpoint into Sass' load_paths parameter. But you should consider this a workaround rather than a normal workflow.
I imported one project to another project by following this link tutorial
successfully build that two project. But when I added
#import <SampleSubproject/SampleSubproject.h> this to my main ViewController.m file error be occur.
Error : "SampleSubproject/SampleSubproject.h" file is not found.
Why is that error occurred ??
Is there any error ?
Please help me guys!
You have Headers search path settings at project configuration. Let's say there're directories A and B. With "SampleSubproject/SampleSubproject.h" Xcode looks for SampleSubproject.h at A/SampleSubproject/SampleSubproject.h and B/SampleSubproject/SampleSubproject.h. If there's a checked recursive flag for any directories, the search is performed at this directories and their subdirectories.
Now you'll need to check what is the headers search path for the target you are building keeping in mind that you might have several targets and the file with the import might not be included into all the targets.
As you also have a red library, you'll want to check the Libraries search path as well, it works in the same way.
I copied & pasted this text here. It seems the editor seems to format some parts randomly. ;)
I downloaded ZendGdata 1.9.6, extracted it & uploaded it to my site's
root folder ..., which I need for use with Youtube API to get videos onto my site.
I must say I’m new to all this, and so I would appreciate taking this into account.
The library folder is at /ZendGdata/library.
The problem I'm having is Step. 3 when I follow instructions
(http://code.google.com/intl/de-DE/apis/gdata/articles/php_client_lib.html#gdata-installation)
for setting it up for that purpose.
Download the Google Data Client Library files.
Decompress the downloaded files. Four sub-directories should be
created:
demos — Sample applications
documentation — Documentation for the client library files
library — The actual client library source files.
tests — Unit-test files for automated testing.
Add the location of the library folder to your PHP path (see the next section)
One of the suggested locations to add the path, apart from the .htaccess file is in php.ini.
My site is on shared hosting. I have no access to the main php.ini file, but I’m allow to create one if I need one. For Drupal CMS, for some functions, it suffices placing one in the root folder.
I added this line:
include_path=".:/usr/lib/php:/usr/local/lib/php:/home/habaris6/
public_html/site.root.folder/ZendGdata/library";
When I however go to mysite.com/ZendGdata/demos/Zend/Gdata/InstallationChecker.php to test the set up, like is mentioned in the
documentation on Youtube, I get the error:
PHP Extension ErrorsTested No errors found
Zend Framework Installation Errors: Tested 0
Exception thrown trying to access Zend/Loader.php using 'use_include_path' = true.
Make sure you include Zend Framework in your include_path which currently
contains: .:/usr/lib/php:/usr/local/lib/php
SSL Capabilities Errors: Not tested
YouTube API Connectivity Errors: Not tested
So my question is: Is that the correct way to “Add the location of the library folder to your PHP path” ?
I’m a bit mixed up.
Someone was saying the php.ini file is only active in the folder where it is located. If that is the case, which of the ZendGdata folders should have it?
As I said, my purpose is to have a the Zend framework properly set up to allow using Youtube API, something I also yet have to learn to do.
In Youtube API Google group, I was referred here. The documentation coming with the downloaded file & at zend.com pre-supposes, one knows much more than some beginners like me.
Another person said I try placing this
$clientLibraryPath = '/home/habaris6/public_html/site.root.folder/ZendGdata/library';
$oldPath = set_include_path(get_include_path() . PATH_SEPARATOR . $clientLibraryPath);
in mysite.com/ZendGdata/demos/Zend/Gdata/InstallationChecker.php
Whereas everything I had tried before failed, except fot the first test, when I placed the above snippet in the installation checker, I got positive tests for everything:
Ran PHP Installation Checker on 2009-12-09T21:16:08+00:00
PHP Extension ErrorsTested: No errors found
Zend Framework Installation Errors Tested No errors found
SSL Capabilities ErrorsTested No errors found
YouTube API Connectivity ErrorsTested No errors found
Does it mean if I place that snippet in install checker, all scripts needing the library can access it?
If not, please let me know what exactly to place in the self-made php.ini & in which folder(s) it should be.
Should that not work, and I were to use .htaccess files, what exactly, based on the folders mentioned above should be the content & exactly which folders should they be in? I read that the .htaccess files should be placed in each folder. Does it really mean I should place one in each of the ZendGdata folders?
I would be grateful for any guidance enabling me to finally start, after failing to sufficient get responses elsewhere.
Thanks in advance.
It's not necessary to put all the ZendGdata code under your website document root. In fact, as a rule I don't put PHP class libraries in a location that can be accessed directly by web requests, because if there's any way to do mischief by invoking the class files directly, then anyone can do it.
Instead, put libraries outside your document root and then reference them from scripts that are run directly. For example, you could create a directory phplib as a sister to your public_html directory. Then upload the ZendGdata bundle under that phplib directory.
You can set your PHP include path in a .htaccess file. You don't need to create a .htaccess file in every directory, because the directives in any .htaccess file apply to all files and directories under the directory where the .htaccess resides. See http://httpd.apache.org/docs/2.2/howto/htaccess.html for more information.
So I would recommend creating a .htaccess file at /home/habaris6/public_html/site.root.folder containing the following directives:
<IfModule mod_php5.c>
php_value include_path ".:/usr/local/lib/php:/home/habaris6/phplib/ZendGdata/library"
</IfModule>
See http://php.net/manual/en/configuration.changes.php for more info on this.
Note that this assumes your webhosting company allows you to use .htaccess files, and that they allow you to use the php_value directive in .htaccess files. Enabling these options is an Apache configuration and they could have their own policies against that for reasons of performance or security. You should contact them for this answer; no one on the internet can answer questions about your hosting provider's policies.
If you choose to use the set_include_path() PHP function to append a directory to your runtime include path, you need to do this in each file that serves as a landing point for a web request. That is, if you permit a request to be made directly to foo.php then you need to add the code to foo.php. Any files or classes subsequently included by foo.php use the include path you defined.
Note also that whatever method you use to define the include path, it has to take effect before your script tries to load any PHP class files via the include path. The .htaccess method should accomplish this, and if you use the code method you just have to put the code high enough in your PHP script.
I don't use the method of creating a custom php.ini file under each directory within your site document tree. That's a new feature of PHP 5.3.0, not supported by earlier versions of PHP. If you're using Apache you should just use .htaccess for the same effect.