![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@svitejs/svelte-preprocess-svg
Advanced tools
Optimize inline svg in svelte components
npm install --save-dev @svitejs/svelte-preprocess-svg
svelte.config.js
import { sveltePreprocessSvg } from '@svitejs/svelte-preprocess-svg';
//...
export default {
//...
preprocess: [
//...
// sveltePreprocessSvg must be used AFTER other markup preprocessors like mdsvex
sveltePreprocessSvg({
/* options */
})
]
//...
};
export interface SveltePreprocessSvgOptions {
/**
* Filter function to only include some files
*
* @param {PreprocessorInput} input - filename and content of the file to process
* @return boolean true to include the file
*/
include?: (input: PreprocessorInput) => boolean;
/**
* Filter function to exclude some files
*
* @param {PreprocessorInput} input - filename and content of the file to process
* @return boolean true to exclude the file
*/
exclude?: (input: PreprocessorInput) => boolean;
/**
* Array of transformers to apply.
* name: unique name of the transform - this is passed to skipTransform
* transform: function to manipulate svg
*
*/
transforms?: SvgTransform[];
/**
* enable svgo transform, use object for custom svgo options.
* Without custom options it tries to load svgo config or uses defaults
*
* requires svgo to be installed as devDependency
*/
svgo?: boolean | object;
/**
* do not wrap svg content in {@html ``}
*/
disableAtHtml?: boolean;
/**
* skip a transform by name
* @param {PreprocessorInput} input - filename and content of the file to process
* @param {string} transform - name of the transform
* @param {string} svg - the svg to transform (previous transforms are already applied!)
*/
skipTransform?: (input: PreprocessorInput, transform: string, svg: string) => boolean;
/**
* Set to true to use a simple string search instead of svelte.parse.
* This is faster but not fault tolerant. misaligned html comments or svg inside string literals will trip it up
*/
useSimpleStringParser?: boolean;
}
FAQs
Optimize inline svg in svelte components
The npm package @svitejs/svelte-preprocess-svg receives a total of 3 weekly downloads. As such, @svitejs/svelte-preprocess-svg popularity was classified as not popular.
We found that @svitejs/svelte-preprocess-svg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.