Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
jspreprocess-brunch
Advanced tools
Adds C-style preprocessor directive support to JS brunch compilations. This allows you to have the same source files, but multiple config.coffee files to compile for different environments.
Add "jspreprocess-brunch": "x.y.z"
to package.json
of your brunch app.
In each config.coffee
file of your brunch app, add a line to specify your buildTarget
.
It can also be helpful to have different public paths for each config. That way different configurations with different buildTarget's will compile their output to different folders.
ex: config_prod.coffee
exports.config =
buildTarget: 'PRODUCTION'
paths:
public: 'prod'
...
ex: config_debug.coffee
exports.config =
buildTarget: 'DEBUG'
paths:
public: 'debug'
...
Directives for if, else, elif, and endif are available to control what javascript gets compiled. Each must be on its own line and prepended by the double slash comment op.
// #BRUNCH_IF (PRODUCTION)
...
// #BRUNCH_ELIF (DEBUG)
...
// #BRUNCH_ELSE
...
// #BRUNCH_ENDIF
Note the use of parentheses. Unlike C preprocessor directives, those parenthese will be required here for if and elif statements.
The #BRUNCH_IF
and #BRUNCH_ELIF
directives also support the OR (||) operator.
ex: // #BRUNCH_IF (PRODUCTION || iOS)
#BRUNCH_IF
statements are not yet supported.Using the config_prod.coffee and config_debug.coffee examples from before, you can compile each config like so:
brunch build -c config_prod
brunch build -c config_debug
FAQs
Adds C-style preprocessor directive support to js brunch compilations.
The npm package jspreprocess-brunch receives a total of 0 weekly downloads. As such, jspreprocess-brunch popularity was classified as not popular.
We found that jspreprocess-brunch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.