I want to use Bourbon with Neat and Bitters for my next project. I have installed all three but I have no idea how to proceed.
Do I use the three folders separately in my project folder or do I need to add the different imports to _bourbon.scss so I have all imports in one main file?
For instance, there are button.scss, clearfix.scss and hide-text.scss in the Bourbon (in addons) and Bitters (in extends) folder, aren't these going to conflict when used together?
All help is appreciated :)
You have to import the files of the plugins (bourbon, neat and bitters) into one main file. Button.scss, clearfix.scss and hide-text.scss won´t conflict.
This is how I organize the project that im currently working on:
- project
|--css
|--base //(Bitters)
|--bourbon
|--neat
|--application.sass
|--application.css
|--js
|--img
|--index.html
In application.sass this is my initial code:
#import 'bourbon/bourbon'
#import 'base/base'
#import 'neat/neat'
So I import Bourbon, Bitters and Neat in my main .sass file so I can easily start using them. You can start changing the default settings in base/_variables.scss
Check this video for more info: http://www.youtube.com/watch?v=8ItNE_DX6Cc
Related
Hello,
I'm an eclipse plugin development newbie looking for pointers to get me started on a particular project.
I am trying to build an eclipse plugin that will automatically construct a working set from a text file that simply consists of a list of file path names. The files/items need not share any parent directories. The rough idea is represented in the following diagram:
I am not asking for the solution to this task. That's the over-arching goal. To achieve that goal, I want to conquer some smaller goals first.
With that in mind, here's the smaller goal I'm currently trying to tackle:
In Eclipse, how can I prompt the user for a single file's path, and then add that file to an existing working set?
I'm not sure where to start. Should I work directly off of the existing org.eclipse.ui.workingSets extension point? Or should I use a collection of other extension points? How do I convert strings into something that can be added to a working set? Do I write code that directly modifies the workingsets.xml file?
Even with a much simpler goal, I still feel quite overwhelmed with the vastness of eclipse extension options. There are probably many ways to go about implementing something like this, but I just need one to get started.
Thanks a bunch!
To manipulate working sets you use the working set manager interface IWorkingSetManager. Get this with:
IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
From this you can get a particular working by name with:
IWorkingSet workingSet = manager.getWorkingSet("name");
The contents of a working set is an array of IAdaptable objects:
IAdaptable [] contents = workingSet.getElements();
You add to the contents by adding to this array and setting the contents:
IAdaptable [] newContents
.... get new array with old contents + new contents
workingSet.setElements(newContents);
A lot of Eclipse objects implement IAdaptable, for a file in the workspace you would use IFile. You can use dialogs such as ResourceSelectionDialog to select resources from the workspace.
Ok, I am trying to learn to use a modular approach to my css for scalable and modular development. My file structure is similar to this.
File Structure
Now, I have a red border on every element that I toggle on and off it helps me visualize as I position elements. Its the first line of code in my _grid.sass file. I have a single file named main.sass with only
#import '_base.sass'
#import '_grid.sass'
#import '_colors.sass'
inside of it. Then, I use atom editor's auto compile to convert main.sass into main.min.css which is linked to the html file. So if I turn off the border property in _grid.sass. I have to save that file, then save main.sass, then save _grid.sass again. I have to be doing something wrong, because if I want to develop an entire site like this, I will have to save 3 times for each individual change, and that will add up to about 5 million redundant saves a minute. Can someone give me some information on this?
I'm assuming you are using the sass-autocompile package. While this is great for single file projects, it doesn't work so well for larger projects.
Instead I would advise using a build system like gulp or grunt. I am more familiar with gulp, so here is a modified version of my build system to work with your project structure.
In order to use this you will need to install gulp and the other packages imported.
var gulp = require('gulp');
var sass = require('gulp-sass');
var rename = require('gulp-rename');
gulp.task('default', function() {
return gulp.src('stylesheets/main.scss')
.pipe(
sass({
outputStyle: 'compressed',
includePaths: ['stylesheets/modules', 'stylesheets/partials', 'stylesheets/vendor']
}).on('error', sass.logError)
)
.pipe(rename('compiled.css'))
.pipe(gulp.dest('stylesheets'));
});
Also, you don't need to (and shouldn't) include the underscore and extension in your partial names, so use #import 'base'; instead of #import '_base.scss';
I'm just trying to begin develop a game in Marmalade (6.3). But when I have made my new sources (.cpp, and .h) and added them to the mkb, and then trying to run my program, then I got an error which says that Unable to find file.cpp in path(s). It's for all of my files except the files (game.h, game.cpp, main.cpp) which were made by Marmalade when I have chosen the new 2D game project. Should I add my .cpp and .h files to anywhere else?
Thanks
It is difficult to give a categorical answer without more info. However my guess is that you've copied and pasted from an example and not understood about the syntax of the files section. Basically:
files
{
(foo)
humbug.cpp
)
The "(foo)" might look very innocent, but it actually says that humbug.cpp is actually in directory foo - relative to the mkb file. It is common practice to actually use "(source)" and put all the source files in a directory of that name - making the source layout a bit neater.
Naturally if you have (source) and don't put the files actually in directory source, they won't be found. My guess is that is what you are seeing.
Just to clarify previous answer, The format of files directive is like this -
files
{
(<Path relative to MKB>,<Alternate Path>)
["Name of the parent Group in VS/XCode project","Name of the subparent group"]
fileName.cpp
fileName.h
}
for example I have two files SoundManager.h and SoundManager.cpp in System folder of Source, while MainMenu.h and MainMenu.cpp in Source/UI. Now the files directive would be -
files
{
(Source/System)
["Source","System"] #This part is not required, it's just to arrange your files in IDE project
SoundManager.h
SoundManager.cpp
(Source/UI)
("Source","UI")
MainMenu.h
ManinMenu.cpp
}
I've been trying to make a library in Dart and import it in my project. Though for some reason it won't do it.
Here's how it looks:
It says it can't find the library, though the path is correct. I also tried a bunch of other paths:
SmartCanvas.dart
SmartCanvas/SmartCanvas.dart
SmartCanvas
SmartCanvas/SmartCanvas
./SmartCanvas/SmartCanvas.dart
../SmartCanvas/SmartCanvas.dart
./SmartCanvas.dart
../SmartCanvas.dart
./SmartCanvas
../SmartCanvas
Note: The project I'm trying to import this library into is located somewhere totally different on my harddrave (my dropbox folder.)
Anyone knows what I should use as path, or how I can import the library properly?
Thanks!
#import expects a full path or correct relative path to a .dart file that has the #library line.
Here is an example from working code:
https://github.com/johnmccutchan/DartVectorMath/blob/master/test/console_test_harness.dart
At the top you see #import('../lib/vector_math_console.dart');
which is located:
https://github.com/johnmccutchan/DartVectorMath/blob/master/lib/vector_math_console.dart
Chopping off the github url prefix, we are left with:
test/console_test_harness.dart
lib/vector_math_console.dart
The import line uses the correct relative path from test/ into ../lib/ to find vector_math_console.dart (the library).
HTH,
John
Try this for windows
#import('/c:/users/pablo/pablo\'s documents/projects/smartcanvas/smartcanvas.dart');
To import local libraries in dart, I'd recommend using the the path dependency in the pubspec.yaml. This is a much cleaner approach then embedding absolute paths in the dart code.
Read about it here: https://www.dartlang.org/tools/pub/dependencies.html#path-packages
I have a view based iPhone project which performs some animations & suchlike, Seperately I have a C based command line tool project which I use to do some calculations.
I want to integrate the two, so that I can call my C based calculations function at a certain point in my original iPhone project.
The command line tool project is in the form of 2 files, calculations.pch & calculations.m.
I tried to add a new file to my original class & simply copy in the 2 new files (& importing calculations.pch in the View Controller) but upon building I get the error:
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Any suggestions? thanks in advance!
The .pch is quite sparse & looks like this:
//
// Prefix header for all source files of the 'Tester' target in the 'Tester' project.
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#endif
Simply remove the .pch file from your project, as the same .pch is already compiled with an iPhone project by default. If that fails, you can always just copy-paste your functions into a new file in your iPhone project.