Ignore directories in brunch production build - brunch

How can I exclude my test directory from my production build?
I've looked through the documentation, and can't seem to find any option.

Use overrides config option to override files in production or other environment.

Related

Configure ESLint in WebStorm by some settings file

First, I wish to configure the ESLint plugin to look for a specific location to find the ESLint configuration file (so basically find .eslintrc.json - but I don't want to set it in the project root folder).
I could do it manually:
I could set Working directories to some random folder like the Documents one.
But I look for kind of automatic way, meaning, that if someone want the same configuration, he could clone my project and have it out of the box.
The equivalent scenario in VSCode is creating .vscode/settings.json file and then I could share this file. I do know I somehow(?) can use the .idea folder and configure a configuration file within this folder but I could find out how to do so.
I tried to export my project configuration:
But I couldn't see in the exported zip file any settings related with ESLint. I just used this export tool to maybe understand how to do so alone without the export tool.

How to remove cpp files from production build via webpack?

I use webpack 4 and electron-builder to bundle and build my Electron app. I noticed that native node modules inside the node_modules directory of the app.asar bundle still contain their C++ source files.
Is there a way to exclude certain file extensions from the build step?
electron-builder can exclude files in the files section of your package.json.
Default pattern / is not added to your custom if some of your patterns is not ignore (i.e. not starts with !). package.json and /node_modules// (only production dependencies will be copied) is added to your custom in any case. All default ignores are added in any case — you don’t need to repeat it if you configure own patterns.
Example
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}",

How to bundle project config files with parcel

I have created a common utility package which will be used by multiple node applications and for bundling it, I am using parcel which works fine but except one issue.
The common utility package consists of config files, which takes care of loading configuration as per env.
Issue:
While using this common utility package in a nodeapp I get the below error, when i try to run the app:
Error: loggerConfig config variable not found
at Object.n [as getLoggerConfig] (/Users/pm/Documents/example-service/node_modules/common.utils/dist/index.js:14:1037)
So It seems to me, the config files are not bundled along the build files generated.
Help Needed:
Is there a way we can tell parcel to bundle these config files as well?
Please guide me if I am thinking the wrong way.
Thanks in advance.

Is it possible to have a separate node_modules folder for devDependencies?

I've got a Node app that I'm deploying to Heroku. Their docs say it's best practice to check in your node_modules directory (i.e. don't gitignore it), for faster deploys and for dev/prod parity.
In my package.json, I've got loads of devDependencies (mostly Grunt plugins and all their deps) and a few regular production dependencies like Express. Heroku only needs the production deps. I'd rather not check in all my dev deps, because they come to about 50MB.
Is there some way to have a separate folder for you dev deps, e.g. node_modules_dev? If this was possible, then I could just add node_modules_dev to my .gitignore, and check in the regular production node_modules directory as per Heroku's advice.
Is there any way to do this? Or can you think of another way to do what I'm trying to do?
I use a CI server to build, test, and deploy my files — so I was looking for a similar solution that would prevent me from needing to deploy extra dependencies and/or re-build on Heroku.
After all my tests run, I run npm prune --production, which removes devDependencies from node_modules, and then I push the result to Heroku.
No extra files go to the server, and deployment times are much faster since Heroku avoids having to build all the binaries usually found in Gulp/Grunt plugins.
If you don't mind checking them in anyways, and your only concern is the resulting slug size (i.e.: not your git repo size, or transfer of that repo to Heroku), then simply add the relevant node_modules to .slugignore.
Docs: Ignoring files with .slugignore.

CruiseControl.NET: Ignore DB projects in a build

After upgrading to VS2010 we have a few .dbproj files that are causing issues in our CI builds. They do nothing except just store SQL files anyway, so I'd like to just ignore them. I'm running CruiseControl.NET and building my solution with devenv.com. Is there some way for me to tell the build that I want to ignore these projects, or all .dbproj projects?
One way to do it is to create a new solution configuration in Visual Studio. Go to the Debug menu and then Configuration Manager. Create a new configuration and then exclude your .dbproj projects.
Then use that configuration name in the command line of devenv.com instead of 'Debug' or 'Release'
Since its a just a files container project, you could just exclude it from build in Debug and Release
Use msbuild instead of devenv and it will support the 'excluded from build' feature (i think devenv doesn't)
An (somewhat) alternative would be to switch the project into a class library (which will actually will build nothing...)
An example MSBUILD task would be:
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<workingDirectory>project_solution_path</workingDirectory>
<projectFile>project_solution_file</projectFile>
<buildArgs>/p:Configuration=Debug /p:VCBuildAdditionalOptions="/useenv" /v:diag /t:rebuild</buildArgs>
<timeout>300</timeout>
</msbuild>
HTH

Resources