File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed
packages/mercury/src/cli/internal Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export const ensureDirectoryExistsAndItsClear = (dirPath: string) => {
88 fs . rmSync ( dirPath , { recursive : true } ) ;
99 }
1010
11- fs . mkdirSync ( dirPath ) ;
11+ fs . mkdirSync ( dirPath , { recursive : true } ) ;
1212} ;
1313
1414export function * walkSync ( dir : string ) : Generator < FileMetadata > {
Original file line number Diff line number Diff line change 11import fs from "node:fs" ;
22import path from "node:path" ;
3+ import * as sass from "sass" ;
34
45import {
56 BASE_BUNDLE_WITH_BACK_SLASH ,
@@ -19,11 +20,16 @@ import {
1920import { BundleMetadata , FileMetadata } from "./types.js" ;
2021import {
2122 getBundleNameWithoutSpecialChars ,
22- replacePlaceholdersInBundle ,
23- transpileBundle
23+ replacePlaceholdersInBundle
2424} from "./utils.js" ;
2525import { printBundleWasTranspiled } from "./print-utils.js" ;
2626
27+ const transpileBundle = ( filePath : string , globant : boolean ) =>
28+ sass . compile ( filePath , {
29+ loadPaths : [ globant ? "src/config/globant" : "src/config/default" ] ,
30+ style : "compressed"
31+ } ) . css ;
32+
2733const CSS_CREATED_DIRS = new Set ( ) ;
2834const JS_CREATED_DIRS = new Set ( ) ;
2935const BUNDLES : BundleMetadata [ ] = [ ] ;
Original file line number Diff line number Diff line change 11import crypto from "node:crypto" ;
22import { styleText } from "node:util" ;
3- import * as sass from "sass" ;
43
54import {
65 FONT_FACE_PATH_PLACEHOLDER ,
@@ -29,12 +28,6 @@ export const getFileSize = (fileContent: string) => {
2928 return fileLengthInGB . toFixed ( 3 ) + "GB" ;
3029} ;
3130
32- export const transpileBundle = ( filePath : string , globant : boolean ) =>
33- sass . compile ( filePath , {
34- loadPaths : [ globant ? "src/config/globant" : "src/config/default" ] ,
35- style : "compressed"
36- } ) . css ;
37-
3831export const getHash = ( fileContent : string ) =>
3932 crypto . createHash ( "md5" ) . update ( fileContent ) . digest ( "hex" ) . substring ( 16 ) ;
4033
You can’t perform that action at this time.
0 commit comments