Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Internal improvement: Update truffle-box docs & package.json #2104

Merged
merged 4 commits into from Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 20 additions & 3 deletions packages/truffle-box/README.md
Expand Up @@ -3,13 +3,31 @@ truffle-box

Truffle Box management functionality.

Provides behavior for unboxing a new project from a predefined Truffle Box.
Handles behavior for unboxing a new project from a predefined Truffle Box.

### Usage

```javascript
const TruffleBox = require("truffle-box");

// `truffle-box` prompts when unboxing into non-empty directories & before potential overwrites
// a `force` option can be passed to force unboxing. default is false
const unboxOptions = { force: false };

// .unbox() validates & unboxes truffle box repos
// pass the current working directory as directory to unbox into
TruffleBox.unbox("https://github.com/trufflesuite/truffle-init-default", process.cwd(), unboxOptions);

// or specify relative path to unbox into (path must already exist)
TruffleBox.unbox("https://github.com/trufflesuite/truffle-init-default", "some/relativePath", unboxOptions);

```


Box Configuration
-----------------

Truffle Boxes are configured via an optional `truffle-box.json` file in the
Truffle Boxes are configured via a required `truffle-box.json` file in the
box repo's root directory.

This box configuration file specifies an object containing the following
Expand Down Expand Up @@ -60,7 +78,6 @@ properties:
}
```


Available Unbox Hooks
---------------------

Expand Down
6 changes: 2 additions & 4 deletions packages/truffle-box/package.json
Expand Up @@ -4,7 +4,6 @@
"description": "Truffle project boilerplate utility",
"main": "box.js",
"scripts": {
"lint": "eslint ./index.js ./lib || true",
"test": "mocha --timeout 10000"
},
"repository": "https://github.com/trufflesuite/truffle/tree/master/packages/truffle-box",
Expand All @@ -17,17 +16,16 @@
"author": "g. nicholas d'andrea <gnidan@trufflesuite.com>",
"license": "MIT",
"devDependencies": {
"eslint": "^4.0.0",
"mocha": "5.2.0",
"sinon": "^6.3.4",
"truffle-config": "^1.1.13"
"sinon": "^6.3.4"
},
"dependencies": {
"fs-extra": "6.0.1",
"github-download": "^0.5.0",
"ora": "^3.0.0",
"request": "^2.85.0",
"tmp": "0.0.33",
"truffle-config": "^1.1.13",
"vcsurl": "^0.1.1"
},
"publishConfig": {
Expand Down
51 changes: 1 addition & 50 deletions yarn.lock
Expand Up @@ -5230,50 +5230,6 @@ eslint-visitor-keys@^1.0.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==

eslint@^4.0.0:
version "4.19.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300"
integrity sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==
dependencies:
ajv "^5.3.0"
babel-code-frame "^6.22.0"
chalk "^2.1.0"
concat-stream "^1.6.0"
cross-spawn "^5.1.0"
debug "^3.1.0"
doctrine "^2.1.0"
eslint-scope "^3.7.1"
eslint-visitor-keys "^1.0.0"
espree "^3.5.4"
esquery "^1.0.0"
esutils "^2.0.2"
file-entry-cache "^2.0.0"
functional-red-black-tree "^1.0.1"
glob "^7.1.2"
globals "^11.0.1"
ignore "^3.3.3"
imurmurhash "^0.1.4"
inquirer "^3.0.6"
is-resolvable "^1.0.0"
js-yaml "^3.9.1"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.3.0"
lodash "^4.17.4"
minimatch "^3.0.2"
mkdirp "^0.5.1"
natural-compare "^1.4.0"
optionator "^0.8.2"
path-is-inside "^1.0.2"
pluralize "^7.0.0"
progress "^2.0.0"
regexpp "^1.0.1"
require-uncached "^1.0.3"
semver "^5.3.0"
strip-ansi "^4.0.0"
strip-json-comments "~2.0.1"
table "4.0.2"
text-table "~0.2.0"

eslint@^5.5.0, eslint@^5.7.0:
version "5.16.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea"
Expand Down Expand Up @@ -5359,7 +5315,7 @@ eslint@~4.18.0:
table "4.0.2"
text-table "~0.2.0"

espree@^3.5.2, espree@^3.5.4:
espree@^3.5.2:
version "3.5.4"
resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7"
integrity sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==
Expand Down Expand Up @@ -12329,11 +12285,6 @@ regex-not@^1.0.0, regex-not@^1.0.2:
extend-shallow "^3.0.2"
safe-regex "^1.1.0"

regexpp@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab"
integrity sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==

regexpp@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
Expand Down