An open API service indexing awesome lists of open source software.

https://github.com/uppercod/resolve-css


https://github.com/uppercod/resolve-css

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# resolve-css

This Package resolves the local or node_module path of the css file.

## install

```
npm install resolve-css
```

## Usage

```js
import path from "path";
import { stat } from "fs/promises";
import resolveCss from "resolve-css";

try {
const [file, stat] = await resolveCss(stat, base, process.cwd());
} catch (e) {
console.log("The file does not exists");
}
```

## Resolution

The resolution is local if this fault will then search node_modules, the search on node_modules by node instance.

## resolveCss

```ts
export type load = (file: string) => Promise;
export default function resolveCss(
load: load,
src: string,
dir?: string
): [string, Promise];
```