@@ -39,10 +39,28 @@ COPY package*.json ./
3939# RUN npm ci --only=production
4040RUN npm ci --no-optional
4141
42- # Removes unnecessary files in node modules
42+ # Removes unnecessary files/folders in node modules
43+ # Files
4344RUN find "$(pwd)/node_modules" -type f -name "*.ts" -exec rm -f {} \;
4445RUN find "$(pwd)/node_modules" -type f -name "*.md" -exec rm -f {} \;
45- RUN find "$(pwd)/node_modules" -type d -name "docs" -prune -exec rm -rf {} +;
46+ RUN find "$(pwd)/node_modules" -type f -name "*.swp" -exec rm -f {} \;
47+ RUN find "$(pwd)/node_modules" -type f -name "LICENSE" -exec rm -f {} \;
48+ RUN find "$(pwd)/node_modules" -type f -name "AUTHORS" -exec rm -f {} \;
49+ RUN find "$(pwd)/node_modules" -type f -name "CONTRIBUTORS" -exec rm -f {} \;
50+ RUN find "$(pwd)/node_modules" -type f -name "CHANGES" -exec rm -f {} \;
51+ RUN find "$(pwd)/node_modules" -type f -name ".prettierrc*" -exec rm -f {} \;
52+ RUN find "$(pwd)/node_modules" -type f -name ".npm*" -exec rm -f {} \;
53+ RUN find "$(pwd)/node_modules" -type f -name ".travis.yml" -exec rm -f {} \;
54+ RUN find "$(pwd)/node_modules" -type f -name "appveyor.yml" -exec rm -f {} \;
55+ RUN find "$(pwd)/node_modules" -type f -name "*.coveralls.yml" -exec rm -f {} \;
56+
57+ # Folders
58+ RUN find "$(pwd)/node_modules" -type d -name "docs?" -prune -exec rm -rf {} +;
59+ RUN find "$(pwd)/node_modules" -type d -name "tests?" -prune -exec rm -rf {} +;
60+ RUN find "$(pwd)/node_modules" -type d -name ".idea" -prune -exec rm -rf {} +;
61+ RUN find "$(pwd)/node_modules" -type d -name ".vscode" -prune -exec rm -rf {} +;
62+ RUN find "$(pwd)/node_modules" -type d -name "__tests__" -prune -exec rm -rf {} +;
63+ RUN find "$(pwd)/node_modules" -type d -name "coverage" -prune -exec rm -rf {} +;
4664
4765# Default port
4866EXPOSE 3000
0 commit comments