At the first, i am new to sass/compass and think it is a big step forward. But I still have a small problem. I try to set a default folder structure for new projects.
So, if i create a new project with:
compass create
it outputs the following folder structure for example:
├───.sass-cache
├───sass
│ ├───ie.scss
│ ├───print.scss
│ └───screen.scss
└───stylesheets
├───ie.css
├───print.css
└───screen.css
what can I do now, to say compass that I want a structure like that, for every new project:
├───.sass-cache
├───css
│ ├───ie.css
│ ├───print.css
│ └───screen.css
├───img
│ ├───ico
│ ├───jpg
│ └───png
├───js
│ ├───jquery-1.7.2.min.js
│ └───scripts.js
└───sass
├───ie.scss
├───print.scss
├───screen.scss
├───_config.scss
└───_mixins.scss
Is there a default-config.rb where i can define which files to load or do I have to create this structure manually for every new project?
I thank you in advance!
EDIT
Okay, I have found the best answer by myself:
Just create an extension for compass. So you can build your own folder & file structure.
Here is a nice starting point.
To create then a new project enter that compass create <project-name> -r extension_name -u gem_name into the terminal/console.
For everyone who needs a starter kit for that, take a look at my port of the "Kube Framework": compass-kube
Your preferred project structure isn't something Compass should handle. Instead, you should have your own skeleton, barebones, bootstrapped, template starting point which you copy to start new projects:
cp -r ~/barebones-project-starter .
or clone from a hosted version control system:
git clone https://github.com/kumiau/default-project
I don't think compass have this particular functionality. The closest thing i think you could do is fork the project on GitHub and modify it to your needs.
https://github.com/chriseppstein/compass
Just set dirs you need here:
%Ruby_Folder%\lib\ruby\gems\2.2.0\gems\compass-1.0.3\lib\compass\app_integration\stand_alone\configuration_defaults.rb
Related
I am trying to figure out how to optimize our builds by only building and testing what needs to be built and/or tested.
Let's say we have a 3-tier app in a single repository with structure with three "main" directories for each tier ("data", "api", "web") such as the below example.
.
├── data
│ ├── entities
│ ├── blah
│ ├── blah2
├── api
│ ├── blah
│ ├── blah2
├── web
│ ├── blah
│ ├── blah2
I would like:
if there is a change in source code in "data" - do a "full" build (build "data", "api" and "web)
if there is a change to source code in "api" - build "api" and "web" only
if there is a change to source code in "web" - build "web" only
I have been able to essentially accomplish the above using the "paths" element of the github action workflow. For example, in the web.yml workflow:
on:
push:
paths:
- 'web/**'
Or, in the api.yml workflow:
on:
push:
paths:
- 'api/**'
But, if the commit contains changes in more than one folder, this becomes problematic, because more than one workflow will start.
There's some ability to use concurrency: as below:
concurrency: ${{ github.ref }}
And, there's even the ability to use cancel-in-progress as below:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
But, here's the issue. How is there any priority to the cancellation?
For example, say a change is made to all three paths and all have the cancel-in-progress, how does github actions determine which two of the three to cancel.
Is there anyway to specify priority? In other words, can I specify in somewhat to keep the "full" build (or where paths: data)?
I can't figure out how to structure this to keep the workflow that starts the build in the correct spot in the dependency chain.
In other words, I would like:
If a change is made to all three, keep the "full" or "data" workflow
If a change is made to "api" and "web", keep the "api" workflow
If a change is made to "data" and "web", keep the "data" workflow
Thoughts?
I would like to add the "c" file in the "New File" button in the Resources Explorer by the System Register Editor:
I followed a tutorial on how to add options to the "New File" button in the Resources Explorer, and I added a "NewFile" Value in the ".c>ShellNew" Key I just made, with the value Template.c, after creating an empty file in the folder Windows>ShellNew (The folder is correct since I have AutoHotkey installed and there is "Template.ahk").
This is the register structure:
│ ├─.c
│ │ ├OpenWithProgids
│ │ ├PersistentHandler
│ │ └ShellNew
And these are the Values in each Key:
OpenWithProgids: (Default) REG_SZ (value not set)
PersistentHandler: (Default) REG_SZ {5e941d80-bf96-11cd-b579-08002b30bfeb}
ShellNew: (Default) REG_SZ (value not set)
FileName REG_SZ Template.c
My default handler for ".c" files is Notepad++.
I would like to know if the infos I provided are enough to solve the problem, and I am sorry if I have chosen the wrong platform to ask, I am new to coding, Register editing and Stack Overflow in general.
The default site setup for a new Jekyll site has a layout specified as "home" in index.md:
---
# You don't need to edit this file, it's empty on purpose.
# Edit theme's home layout instead if you wanna make some changes
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: home
---
If I follow the link, it tells me to create a _layouts folder and create a file in it named home.html and that will be used as the home layout. But if that file doesn't exist Jekyll defaults back to the normal home page.
Where is Jekyll pulling the default layout from?
This default layout comes from the theme, which is gem based and is stored on your computer.
To locate a theme’s files on your computer:
Run bundle show followed by the name of the theme’s gem, e.g., bundle show minima for Jekyll’s default theme. This returns the location of the gem-based theme files. For example, the Minima theme’s files might be located in /usr/local/lib/ruby/gems/2.3.0/gems/minima-2.1.0 on macOS.
Source
I would suggest to start without a theme. Invisible files do not really help you to understand an already quite abstract concept. Remove the theme and write your own layouts and CSS. When you get how it works, you also truly understand how a theme works and what it can and cannot do.
Removing the standard (or any other) theme is simple. Just go to the _config.yml file and remove theme: minima. Now you will use only visible files. You might also want to remove the 'Gemfile', but that requires you to also remove the 'jekyll-feed' plugin from the config. No problem, as you can easily roll your own: https://jekyllcodex.org/without-plugin/rss-feed/
From this version of the manual:
Run bundle info --path followed by the name of the theme's gem, e.g., bundle info --path minima for Jekyll's default theme.
The layout files will be in the _layouts sub-directory of the path returned by the command above.
Image does not appear in local host if saved in the _posts/ directory but appears if stored in another directory, e.g. posts/. Does anyone know why?
.md file:
![pressure plot]({{ site.baseurl }}/posts/fig/pressure-1.png) # appears
![pressure plot]({{ site.baseurl }}/_posts/fig/pressure-1.png) # doesnt appear
.html file from the .md file:
<img src="/my-awesome-site/posts/fig/pressure-1.png" alt="pressure plot" />
<img src="/my-awesome-site/_posts/fig/pressure-1.png" alt="pressure plot" />
config_yml:
baseurl: /my-awesome-site
Error message in Terminal after jekyll serve for _posts/:
ERROR `/my-awesome-site/_posts/fig/pressure-1.png' not found.
And the path in the error is actually correct (yes, the images can be found in _posts/fig/, I was testing things out by saving in different directories), but somehow the image just doesn't appear. Can anyone explain?
I dont think all these explain: OSF, OSF, OSF, Jekyll, unless I'm not understanding this whole thing.
Looking in Jekyll's documentation, _posts is one of the "reserved" directory, parsed by Jekyll for files named with the format YEAR-MONTH-DAY-title.MARKUP. Apart from the particular directories:
Every other directory and file except for those listed above [...] will be copied verbatim to the generated site.
So your image, while existing in your sources, will not be copied in the generated site (see the content of _site/), since it is in the directory _posts while not being named with the wanted format.
I ran into the same issue today. Turns out there's a useful plugin for resolving this issue called jekyll-postfiles!
Link to jekyll-postfiles
To install jekyll postiles, add the following to your GEMFILE:
source 'https://rubygems.org'
gem 'jekyll'
group :jekyll_plugins do
gem 'jekyll-postfiles'
end
Then run bundle. That's it!
Suppose you have the following structure:
_posts
|
|--> folder_a
|
|--> year-month-date-filename1.md
|--> picture.png
|
|--> folder_b
|
|--> year-month-date-filename2.md
|--> another_picture.ong
Then in filename1.md, you can invoke the image as:
<img src="picture1.png" width="700" height="500" class="center">
This is a very neat way instead of just putting pictures in a separate assets folder IMO.
Note: This plugin is not supported by Github Pages, host your site on services like https://netlify.com which support third party plugins.
I don't want PhpStorm to create an .idea folder. Is this possible?
I'm working in a new environment where I pretty much MUST figure out a way to remove them or I have to change IDE, which I really don't want to do.
Can't PhpStorm store the project files and settings in its own directory?
I don't want PhpStorm to create an .idea folder. Is this possible?
No, but workaround is very simple and described in the actual ticket body: http://youtrack.jetbrains.com/issue/WI-343 :
WORKAROUND: Actually you can do it for a long time - but only manually. Just create a new project anywhere where you want to store your project data, then go to "Settings | Directories" and detach its dir and attach your project root folder.
Just remember to open this folder instead of actual one next time.
Maybe, as an alternative, if you use a VCS, you can add .idea to your VCS ignore list? For example, for Mercurial it is called .hgignore and for Git - .gitignore.