require all templates including files with underscores - brunch

With brunch, I can require all files in a folder like this
require('/templates/');
But that does not cover files with underscores, I still need to require them like this:
require('templates/_mood');
How could I require all files in the templates folder including files with underscores?

tl;dr you can’t simply.
require('/templates/'); does not load all files, instead it loads templates/index file by default. in index you can require all files in current directory and that way your problem will be solved

Related

Excluding Files and Folders from dupFinder

I'm trying to use dupFinder to scan for duplications in a .NET codebase. I have certain files and folders that I want to exclude from the scan but I'm struggling to get it working.
The command I'm running is:
dupfinder.exe --show-text --output="dupReport.xml" --exclude="Some.Folder.*;*Resource.designer.cs" MyCode.sln
So what I'm trying to do is:
Scan the MyCode.sln solution.
Ignore all folders matching the pattern Some.Folder.* e.g. Some.Folder.Code and Some.Folder.Tests (these folders are in the root of the repository alongside the solution file).
Ignore all files matching the pattern *Resource.designer.cs in any folder i.e. MyCode.Resource.designer.cs.
I'm sure I'm just doing something wrong but the dupFinder documentation doesn't show an example of using the exclude option.
I have eventually managed to get this working, the conclusion I've drawn is that you can't exclude folders only files.
I think because my original exclude pattern was trying to ignore folders the whole thing wasn't working.
I know this is an old question but I also searched for this.
To exclude complete folders you should use double *
e.g.
--exclude="**\Tests\**;**\Resource.designer.cs"
excludes all Files in all Tests folders and Resource.designer.cs in whatever folder.
Edit:
Tested and still working on JetBrains.ReSharper.CommandLineTools.2020.3.4. Which was the current version when I wrote the answer.
Current version seems to have a bug again and not excluding at all.

How to specify unprotected subdirectories in owasp.properties file?

I am using owasp csrfguard-3.0.0 for CSRF. I was able to specify unprotect js files from my Javascript folder using org.owasp.csrfguard.unprotected.JavaScript=javascript/*.js but I have other directories inside that folder as well how can I unprotect them.
e.g x/y/z is my folder structure how can I use org.owasp.csrfguard.unprotected to unprotect all the files from each directory.
I was able to resolve it by setting unprotected using .css/.js so that all the files of specified type will be ignored. That also helps even though those files are from different folders.

Scons Build Dependency Optimziation?

Well i have a build setup of 2 projects, one project takes .xml files from a directory and processes them into header files. These files are then used by the second project. Is there any way to check if his project needs to be re-run (the .xml files were modified or a new one was added)?
Just combine the two projects into one common source tree, and one single SConstruct (with as many SConscripts as you like in the subfolders, that get included by SConscript(file) ).
Then ensure that the header files in the include/ folder are always tried to be built, e.g. by adding them as default targets with env.Default().
SCons will only call each conversion .xml->.h when the corresponding source XML file has changed its content.

SUSY organization files?

I use method mobile first or a reponive webite and i use susy. How organize files _forms _typo _layout,_mixins etc.. for mobile (default) and breakpoints (tablet, desktop) and to have output files :
mobile.css
tablet.css
desktop.css
Thanks
Sass/Compass+Susy will create a file for every file in your source directory that is not preceded by an underscore.
So, simply place the code you want generated for those style sheets in files located in the source directory using any mixins from your own partials (files preceded by an underscore) or any of the extensions you're including on your project (such as susy)
A great document that talks about structuring your project is here: http://compass-style.org/help/tutorials/extensions/
Something else to look at: http://compass-style.org/help/tutorials/best_practices/
Great
i understand the technics with '_' files not generated but i search sample organization iles or responive website with susy .
if i use multiple files for layout header etc... (include or each at-breakpoint) the css file result contains miltiple declaration #media.... and not grouped .

Is it possible to use virtual paths / subfolders registering scripts in Orchard Themes?

I'm trying to build a new Orchard theme, and to keep things structures I'd like to put script includes in separate folders (this particular script include needs quite a bit of files so to put all of them in the root of the scripts folder doesn't seem so great).
Basicly I can't wrap my head around this:
Script.Require("~/ThemesFolderEtc/Scripts/libs/shadowbox/shadowbox.js");
it seems only possible to do something like this:
Script.Require("shadowbox.js");
Does anyone have any pointers on what virtual path to use, and if it's supported to use virtual paths?
I believe Script.Require is key/value dictionary of registered scripts. Try Script.Include("path"). This is what I do with my css file. I point it to a file on in public dropbox folder which makes changing the css super easy and no ftp!

Resources