This repository was archived by the owner on Jun 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,15 @@ export class BundleProducer {
36
36
}
37
37
38
38
public run ( opts : { chokidar ?: any , runType ?: string } ) : Promise < BundleProducer > {
39
+ console . log ( "RUN" ) ;
39
40
if ( opts ) {
40
41
this . chokidarOptions = opts . chokidar ;
41
42
}
43
+
42
44
/** Collect information about watchers and start watching */
43
45
this . watch ( ) ;
44
-
46
+ //this.runner = new BundleRunner(this.fuse);
47
+
45
48
return this . runner . run ( opts ) . then ( ( ) => {
46
49
47
50
this . sharedEvents . emit ( "producer-done" ) ;
@@ -51,7 +54,10 @@ export class BundleProducer {
51
54
return plugin . producerEnd ( this ) ;
52
55
}
53
56
} ) ;
54
- } ) . then ( ( ) => this ) ;
57
+ } ) . then ( ( ) => {
58
+ // this.bundles = new Map<string, Bundle>();
59
+ return this
60
+ } ) ;
55
61
}
56
62
57
63
public addUserProcessEnvVariables ( data : any ) {
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export interface SassPluginOptions {
8
8
macros ?: { [ key : string ] : string } ;
9
9
importer ?: boolean | ImporterFunc ;
10
10
cache ?: boolean ;
11
+ header ?: string ;
11
12
indentedSyntax ?: boolean ,
12
13
functions ?: { [ key : string ] : ( ...args: any [ ] ) => any }
13
14
}
@@ -58,9 +59,13 @@ export class SassPluginClass implements Plugin {
58
59
"~" : Config . NODE_MODULES_DIR + "/" ,
59
60
} ;
60
61
62
+ if ( this . options . header ) {
63
+ file . contents = this . options . header + "\n" + file . contents ;
64
+ }
65
+
61
66
const options = Object . assign ( {
62
67
data : file . contents ,
63
- file : context . homeDir + "/" + file . info . fuseBoxPath ,
68
+ file : context . homeDir + "/" + file . info . fuseBoxPath ,
64
69
sourceMap : true ,
65
70
outFile : file . info . fuseBoxPath ,
66
71
sourceMapContents : true
@@ -90,7 +95,7 @@ export class SassPluginClass implements Plugin {
90
95
let file = path . normalize ( url ) ;
91
96
92
97
if ( context . extensionOverrides ) {
93
- file = context . extensionOverrides . getPathOverride ( file ) || file ;
98
+ file = context . extensionOverrides . getPathOverride ( file ) || file ;
94
99
}
95
100
96
101
done ( { file } ) ;
Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ export class QuantumCore {
93
93
abstraction . quantumCore = this ;
94
94
this . producerAbstraction = abstraction ;
95
95
this . log . echoInfo ( "Abstraction generated" ) ;
96
-
97
96
await each ( abstraction . bundleAbstractions , ( bundleAbstraction : BundleAbstraction ) => {
98
97
return this . prepareFiles ( bundleAbstraction ) ;
99
98
} ) ;
@@ -225,6 +224,7 @@ export class QuantumCore {
225
224
if ( globals ) {
226
225
for ( let i in globals ) { globalsName = globals [ i ] ; }
227
226
}
227
+ //console.log("here", bundleAbstraction.packageAbstractions);
228
228
bundleAbstraction . packageAbstractions . forEach ( packageAbstraction => {
229
229
packageAbstraction . fileAbstractions . forEach ( ( fileAbstraction , key : string ) => {
230
230
let fileId = fileAbstraction . getFuseBoxFullPath ( ) ;
You can’t perform that action at this time.
0 commit comments