File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const { join } = require("path");
8
8
9
9
class PrePack {
10
10
LICENSE_FILENAME = "LICENSE" ;
11
+ NODE_MODULES = "node_modules" ;
11
12
12
13
constructor ( options ) {
13
14
this . logs = [ ] ;
@@ -155,6 +156,11 @@ class PrePack {
155
156
if ( await this . isReadable ( path . join ( this . currDir , "README.md" ) ) ) {
156
157
copies . push ( this . copyToDist ( this . currDir , "README.md" ) ) ;
157
158
}
159
+
160
+ if ( await this . isReadable ( path . join ( this . currDir , this . NODE_MODULES ) ) ) {
161
+ copies . push ( this . copyToDist ( this . currDir , this . NODE_MODULES ) ) ;
162
+ }
163
+
158
164
await Promise . all ( copies ) ;
159
165
await this . copy ( this . currDirDist , this . rootDistPackPath ) ;
160
166
}
@@ -175,7 +181,7 @@ class PrePack {
175
181
}
176
182
177
183
async copy ( input , output ) {
178
- this . log ( `Copy files from ${ input } to ${ output } ` ) ;
184
+ console . log ( `Copy files from ${ input } to ${ output } ` ) ;
179
185
180
186
return fse . copy ( input , output , { recursive : true } )
181
187
. catch ( err => {
You can’t perform that action at this time.
0 commit comments