diff --git a/.gitignore b/.gitignore index 4c1fb8c..11219e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules/ +dist/ .pnp.* .yarn/* !.yarn/patches diff --git a/README.md b/README.md index 7176721..ab13367 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,4 @@ To run the vault decryptor locally, ensure both Beefy and Browserify are install `yarn build` -Then just include `bundle.js` in an HTML file. +This creates a `dist/` folder containing `index.html` and `bundle.js`. diff --git a/package.json b/package.json index 30dd082..ecdc03d 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,17 @@ { "name": "@metamask/vault-decryptor", "version": "1.0.0", - "private": true, "description": "Utility for decrypting MetaMask vault data", - "main": "index.js", + "files": [ + "dist" + ], "scripts": { + "build": "mkdir -p dist && browserify index.js -o dist/bundle.js && cp index.html dist/", + "build:clean": "yarn clean && yarn build", + "clean": "rimraf dist", + "prepublishOnly": "yarn build", "start": "beefy index.js:bundle.js --live --open", - "test": "jest && jest-it-up", - "build": "browserify index.js -o bundle.js" + "test": "jest && jest-it-up" }, "browserify": { "transform": [ @@ -56,7 +60,8 @@ "brfs": "^1.4.3", "browserify": "^17.0.0", "jest": "^29.4.1", - "jest-it-up": "^2.1.0" + "jest-it-up": "^2.1.0", + "rimraf": "^5.0.0" }, "directories": { "lib": "lib" @@ -72,5 +77,9 @@ "engines": { "node": ">=18.0.0" }, - "packageManager": "yarn@3.4.1" + "packageManager": "yarn@3.4.1", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + } }