Spaces:
Sleeping
Sleeping
pythonic-rag-FastAPIReact / frontend /node_modules /adjust-sourcemap-loader /codec /utility /get-output-directory.js
Download frontend/node_modules/adjust-sourcemap-loader/codec/utility/get-output-directory.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 825 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/adjust-sourcemap-loader/codec/utility/get-output-directory.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/adjust-sourcemap-loader/codec/utility/get-output-directory.js
-
curl -L -o get-output-directory.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/adjust-sourcemap-loader/codec/utility/get-output-directory.js
825 Bytes
| ; | |
| var path = require('path'), | |
| fs = require('fs'); | |
| var getContextDirectory = require('./get-context-directory'); | |
| /** | |
| * Infer the compilation output directory from options. | |
| * Relative paths are resolved against the compilation context (or process.cwd() where not specified). | |
| * @this {{options: object}} A loader or compilation | |
| * @returns {undefined|string} The output path string, where defined | |
| */ | |
| function getOutputDirectory() { | |
| /* jshint validthis:true */ | |
| var base = this.options && this.options.output ? this.options.output.directory : null, | |
| absBase = !!base && path.resolve(getContextDirectory.call(this), base), | |
| isValid = !!absBase && fs.existsSync(absBase) && fs.statSync(absBase).isDirectory(); | |
| return isValid ? absBase : undefined; | |
| } | |
| module.exports = getOutputDirectory; | |