Where is the file that generates the config.rb file? - ruby

When I create a new Compass project, it generates several directories and files and provides the config.rb file. Rather than changing the config file every time I start a project, can I set this up in a existing default file? and where is it?

Take a look at this pull request, it might help: https://github.com/kahlil/grunt-compass/issues/13

Related

Adding _includes and _layouts files to Jekyll directory

I'm new to Ruby and Jekyll, and I've been following this tutorial on how to create a static-site. I've reached the part where we're supposed to edit files inside the _includes and _layouts folders, but those folders don't appear in my directory. There is however a _site folder with an index.html file inside it, and it looks like that's what's showing when I run the website with 'jekyll serve'. Am I supposed to add these folders and files in myself, or should I edit _site/about/index.html to match what the tutorial has?
Here's a picture of what my current folder structure looks like:
Yes, you should add those folders and files yourself. Copy them from the theme repo and skip anyone you don't want to customize / override. The default theme config created by command jekyll new is https://github.com/jekyll/minima
The _site folder is being generated on the fly, it reflects the result of the customization.

Generated source files should not be edited in php storm

I am editing min.css file in php storm 2016.3 but its showing a message,
Generated source files should not be edited. the changes will be lost
And not saving what I add.
Laravel generated this file through MIX, so that file is a file that was generated by compiling the SCSS files on your project.
What Phpstorm is trying to tell you is that if you make changes in that file, and then run something like "npm run watch" its going to get overwritten by the SCSS compiler.
You may get this error if the IDE expects a file to be a Blade file (for example if it created in a subdirectory of views/base_templates) but it is not named as such.
In this case, the solution is to ensure the name of the file ends in .blade.php.

How do I edit a .sublime-settings file if it's inside a package?

I'm trying to set up a Node build system in Sublime Text. I thought I'd use tanepiper's, and I'm following its instructions exactly, but there's a problem: my Node executable isn't found (yes, it's in my system PATH). It says to edit Nodejs.sublime-settings if that happens, but that file is inside Nodejs.sublime-package, which is an archive.
I can't edit the file in-place in the archive. I've tried extracting the archive and then zipping it up again and calling the zip a sublime-package, but that doesn't work either.
So what am I supposed to do here?
You should create Nodejs.sublime-settings in your Packages/User folder. The settings will be merged properly. If you really feel you need to modify the packaged file, use https://github.com/skuroda/PackageResourceViewer, though I'd recommend against it (for settings) as placing a file with the same name in the Packages/User folder will do what you want.

Config file sharing in mercurial and VS

Our project uses custom xml config file, that is currently located under the project as .xml file, with Copy to output: always. Currently, it is present in the repository.
The problem is that every developer uses each own database (and each own configuration file), so ideally we need to have different configuration files, and we do not want to commit them to the external repository.
Sometimes the format of the configuration file is changed, and all of us need to update it. Also we have a build server that is configured to clean the folder before updating source from the repository and building it, so the default file (configured for build server) should be contained in the repository.
The problems is that sometimes a dev forget to check out it's local copy of the configuration xml when building, and his own config file goes to repository and brake many things. Is there any way to improve this schema so we don't need to remove config file from commit files every time we commit?
My solution is to exclude the app.config from VCS to prevent accidental commits to it. We have created an app.example.config which is checked in. A pre-build event validates if the app.config file exists and if it does not copies the .template to the .config file before compile of the codebase. This ensures the build server has a working config file which contains basic settings for all environments.
Example for PRe-build event in your project configuration:
REM copy .example files to .config files if needed
IF NOT EXIST "$(projectDir)\App.Config" IF EXIST "$(projectDir)\app.example.config" COPY "$(projectDir)\app.example.config" "$(projectDir)\App.Config"
IF NOT EXIST "$(projectDir)\Web.Config" IF EXIST "$(projectDir)\Web.example.config" COPY "$(projectDir)\Web.example.config" "$(projectDir)\Web.Config"
IF NOT EXIST "$(projectDir)\ConnectionStrings.Config" IF EXIST "$(projectDir)\ConnectionStrings.example.config" COPY "$(projectDir)\ConnectionStrings.example.config" "$(projectDir)\ConnectionStrings.Config"
IF NOT EXIST "$(projectDir)\Local.Config" IF EXIST "$(projectDir)\Local.example.config" COPY "$(projectDir)\Local.example.config" "$(projectDir)\Local.Config"
Config in repo contain data for TeamCity
Developers have MQ and patch in MQ-stack for converting default xml to local
Changed base xml require to edit (rebase) patch and remove conflicts
Here's another answer similar to the accepted one by Mark, but using the <Copy> task in the .csproj file, which you were apparently looking for:
how to ignore files in kiln/mercurial using tortoise hg "that are part of the repository"

Xcode 4.2 — add derived files to project

I'm using bison parser generator in my Xcode 4 project. I've written custom build rule for generating C++-source file from *.y grammar file:
/usr/local/bin/bison
--defines="${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.hpp"
--output="${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.cpp"
--verbose "${INPUT_FILE_PATH}"
As you can see, Xcode places generated files in $DERIVED_FILES_DIR folder. Now I need to export generated header file grammar.hpp with object files as library.
The problem is that Xcode doesn't allow export files, that aren't included in project.
The first solution, as it seems, is to create a group with absolute path set to $DERIVED_FILES_DIR. Well, it actually works until I change my build settings to build Release configuration, since $DERIVED_FILES_DIR is dependent on build settings.
The second solution is somehow set group path to literally variable, i.e.
path = $DERIVED_FILES_DIR
So far I've found two possible ways to do it: How to reference files with environment variables? and File references relative to DERIVED_FILE_DIR in Xcode. Either way doesn't work for me.
Maybe someone knows better way to add generated files to project?
Your best options are:
Generate the files in your SRCROOT
Generate the files in BUILT_PRODUCTS_DIR
These both have "Relative to..." options that should allow you to add the files to your project.
I ended up generating files in ${SRCROOT} directory with custom make build target using Makefile that handles regenerating derived files. I just added these generated files to project, and made all actual build target depend on this make target.

Resources