File tree 2 files changed +28
-1
lines changed
2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change
1
+ var fs = require ( 'fs' ) ;
2
+ var path = require ( 'path' ) ;
3
+ var glob = require ( 'glob' ) ;
4
+ var Promise = require ( 'bluebird' ) ;
5
+
6
+ module . exports = function ( $logger , $projectData , $usbLiveSyncService ) {
7
+ // delete all scss files from compiled sources
8
+ var platformsData = $injector . resolve ( 'platformsData' ) ;
9
+ return Promise . each ( platformsData . platformsNames , function ( platform ) {
10
+ var sassFilesPath = path . join ( platformsData . getPlatformData ( platform ) . appDestinationDirectoryPath , 'app/**/*.scss' ) ;
11
+ var sassFiles = glob . sync ( sassFilesPath ) . filter ( function ( filePath ) {
12
+ var path = filePath ;
13
+ var parts = path . split ( '/' ) ;
14
+ var filename = parts [ parts . length - 1 ] ;
15
+ return path . indexOf ( "App_Resources" ) === - 1 && filename . indexOf ( "_" ) !== 0 ;
16
+ } ) ;
17
+ return Promise . each ( sassFiles , function ( sassFile ) {
18
+ return fs . unlinkSync ( sassFile ) ;
19
+ } ) ;
20
+ } ) ;
21
+ }
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nativescript-dev-sass" ,
3
- "version" : " 0.3.0 " ,
3
+ "version" : " 0.3.1 " ,
4
4
"description" : " SASS CSS pre-processor for NativeScript projects." ,
5
5
"scripts" : {
6
6
"test" : " exit 0" ,
13
13
"type" : " before-prepare" ,
14
14
"script" : " lib/before-prepare.js" ,
15
15
"inject" : true
16
+ },
17
+ {
18
+ "type" : " after-prepare" ,
19
+ "script" : " lib/after-prepare.js" ,
20
+ "inject" : true
16
21
}
17
22
]
18
23
},
22
27
"url" : " https://github.com/ToddAnglin/nativescript-dev-sass.git"
23
28
},
24
29
"dependencies" : {
30
+ "bluebird" : " ^3.4.6" ,
25
31
"node-sass" : " *" ,
26
32
"glob" : " *" ,
27
33
"nativescript-hook" : " ^0.2.0"
You can’t perform that action at this time.
0 commit comments