prod-files 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +3 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -684,7 +684,9 @@ export async function prune(opts) {
684
684
  return results
685
685
  }
686
686
 
687
- const runAsScript = process.argv[1] === import.meta.filename
687
+ const entry = process.argv[1]
688
+ const runAsScript =
689
+ entry && import.meta.filename.endsWith(entry.replace(process.cwd(), ''))
688
690
 
689
691
  if (runAsScript) {
690
692
  const args = handleArgs()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prod-files",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Keep only prod files by pruning non-prod files from node_modules before deploying",
5
5
  "keywords": [
6
6
  "clean",