https://github.com/uppercod/resolve-css
https://github.com/uppercod/resolve-css
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/uppercod/resolve-css
- Owner: UpperCod
- Created: 2020-08-29T15:00:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-30T05:43:22.000Z (almost 6 years ago)
- Last Synced: 2025-09-25T22:43:51.562Z (9 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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];
```