Security News
npm Updates Search Experience with New Objective Sorting Options
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
arc-resolver
Advanced tools
arc
adapts files based on a filenaming convension:
style.css
style[android].css
Write your application as though the flagged version of the file did not exist:
@import url('./style.css');
When bundling the css (using arc-webpack
or arc-lasso
), if the android
flag is set, style[android].css
will replace style.css
in the output bundle.
Use the plus (+
) to specify that all of the listed flags need to match:
style[mobile+android].css
Use the comma (,
) to specify that one of the listed flags needs to match:
style[android,ios].css
The plus (+
) has higher precedence than the comma (,
), similar to how &&
has higher precedence than ||
in JavaScript.
For example,
style[mobile+ios,mobile+android].css
Is logically equivalent to:
(mobile && ios) || (mobile && android)
To increase the precedence of a group, you can wrap it in []
:
style[mobile+[ios,android]].css
This is logically equivalent to the previous example.
More Flags === Higher Specificity
Given the following files:
style.css
style[mobile,tablet,headset,desktop].css
style[mobile+[ios,android]].css
style[mobile+ios+chrome,safari].css
The matching logic looks something like:
if mobile & ios & chrome
'style[mobile+ios+chrome,safari].css'
else if mobile & ios
'style[mobile+[ios,android]].css'
else if mobile & android
'style[mobile+[ios,android]].css'
else if safari
'style[mobile+ios+chrome,safari].css'
else if mobile
'style[mobile,tablet,headset,desktop].css'
else if tablet
'style[mobile,tablet,headset,desktop].css'
else if headset
'style[mobile,tablet,headset,desktop].css'
else if desktop
'style[mobile,tablet,headset,desktop].css'
else
'style.css'
FAQs
<img src="https://img.shields.io/github/license/eBay/ar
The npm package arc-resolver receives a total of 114 weekly downloads. As such, arc-resolver popularity was classified as not popular.
We found that arc-resolver demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.