Skip to content

Commit 317d7e8

Browse files
committed
Added clean job
1 parent 6dc2803 commit 317d7e8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dash/development/build_process.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def build(self, build=None):
7676
self.npm()
7777
self.bundles(build)
7878
self.digest()
79+
self.cleanModules()
7980

8081
@job("compute the hash digest for assets")
8182
def digest(self):
@@ -146,6 +147,12 @@ def bundles(self, build=None):
146147
) as fp:
147148
fp.write(t.safe_substitute(versions))
148149

150+
@job("clean node_modules directory 🧹")
151+
def cleanModules(self):
152+
"""Job to clean node_modules directory from installed Dash package."""
153+
os.chdir(self.main)
154+
run_command_with_process("rm -rf node_modules")
155+
149156

150157
class Renderer(BuildProcess):
151158
def __init__(self):

0 commit comments

Comments
 (0)