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

Commit

Permalink
Rename truffle-artifactor to @truffle/artifactor
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplantzzz committed Aug 30, 2019
1 parent 9a68f33 commit 4c80542
Show file tree
Hide file tree
Showing 30 changed files with 26 additions and 26 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# truffle-artifactor
# @truffle/artifactor

This package saves contract artifacts into JSON files

```javascript
const Artifactor = require("truffle-artifactor");
const Artifactor = require("@truffle/artifactor");
const artifactor = new Artifactor(__dirname);
artifactor.save({/*...*/}); // => a promise saving MyContract.json to a given destination
```
Expand All @@ -26,15 +26,15 @@ The artifactor can be used with [truffle-contract](https://github.com/trufflesui
### Install

```
$ npm install truffle-artifactor
$ npm install @truffle/artifactor
```

### Example

Here, we'll generate a `.json` files given a JSON object like [@truffle/contract-schema](https://github.com/trufflesuite/truffle/tree/develop/packages/contract-schema). This will give us a file which we can later `require` into other projects and contexts.

```javascript
const Artifactor = require("truffle-artifactor");
const Artifactor = require("@truffle/artifactor");
const artifactor = new Artifactor(__dirname);

// See truffle-schema for more info: https://github.com/trufflesuite/truffle/tree/develop/packages/contract-schema
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"private": false,
"name": "truffle-artifactor",
"name": "@truffle/artifactor",
"description": "A contract packager for Ethereum and Javascript",
"license": "MIT",
"author": "Tim Coulter",
"repository": "https://github.com/trufflesuite/truffle/tree/master/packages/truffle-artifactor",
"repository": "https://github.com/trufflesuite/truffle/tree/master/packages/artifactor",
"version": "4.0.30",
"main": "./index.js",
"scripts": {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/debugger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@truffle/box": "^1.0.35",
"@truffle/debug-utils": "^1.0.18",
"@truffle/workflow-compile": "^2.1.3",
"truffle-artifactor": "^4.0.30",
"@truffle/artifactor": "^4.0.30",
"truffle-migrate": "^3.0.32",
"truffle-resolver": "^5.0.16",
"webpack": "^3.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/debugger/test/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from "path";
import fs from "fs-extra";
import Contracts from "@truffle/workflow-compile";
import Debug from "@truffle/debug-utils";
import Artifactor from "truffle-artifactor";
import Artifactor from "@truffle/artifactor";
import Web3 from "web3";
import Migrate from "truffle-migrate";
import Box from "@truffle/box";
Expand Down
6 changes: 3 additions & 3 deletions packages/truffle-contract/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ v4.0.2 or higher.

### Full Example

Let's use `truffle-contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [truffle-artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/truffle-artifactor):
Let's use `truffle-contract` with an example contract from [Dapps For Beginners](https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/). In this case, the abstraction has been saved to a `.sol` file by [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor):

```javascript
// Require the package that was previosly saved by truffle-artifactor
// Require the package that was previosly saved by @truffle/artifactor
var MetaCoin = require("./path/to/MetaCoin.sol");

// Remember to set the Web3 provider (see above).
Expand Down Expand Up @@ -357,4 +357,4 @@ instance.setValue.estimateGas(5).then(function(result) {

# Testing

This package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [truffle-artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/truffle-artifactor) but will soon move here.
This package is the result of breaking up EtherPudding into multiple modules. Tests currently reside within [@truffle/artifactor](https://github.com/trufflesuite/truffle/tree/master/packages/artifactor) but will soon move here.
4 changes: 2 additions & 2 deletions packages/truffle-core/lib/commands/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const command = {
},

prepareConfigForRealMigrations: async function(buildDir, options) {
const Artifactor = require("truffle-artifactor");
const Artifactor = require("@truffle/artifactor");
const Resolver = require("truffle-resolver");
const Migrate = require("truffle-migrate");
const Config = require("truffle-config");
Expand Down Expand Up @@ -175,7 +175,7 @@ const command = {
},

run: function(options, done) {
const Artifactor = require("truffle-artifactor");
const Artifactor = require("@truffle/artifactor");
const Resolver = require("truffle-resolver");
const Migrate = require("truffle-migrate");
const Contracts = require("@truffle/workflow-compile");
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-core/lib/commands/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const command = {
const dir = require("node-dir");
const temp = require("temp").track();
const Config = require("truffle-config");
const Artifactor = require("truffle-artifactor");
const Artifactor = require("@truffle/artifactor");
const Test = require("../test");
const fs = require("fs");
const { promisify } = require("util");
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"spawn-args": "^0.1.0",
"temp": "^0.8.3",
"@truffle/compile-solidity": "^4.2.3",
"truffle-artifactor": "^4.0.30",
"@truffle/artifactor": "^4.0.30",
"truffle-config": "^1.1.20",
"truffle-contract": "^4.0.31",
"truffle-contract-sources": "^0.1.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-core/test/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var Contracts = require("@truffle/workflow-compile");
var Ganache = require("ganache-core");
var provision = require("@truffle/provisioner");
var Resolver = require("truffle-resolver");
var Artifactor = require("truffle-artifactor");
var Artifactor = require("@truffle/artifactor");

describe("config", function() {
var config;
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-core/test/ethpm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var Package = require("../lib/package.js");
var Blockchain = require("@truffle/blockchain-utils");
var Ganache = require("ganache-core");
var Resolver = require("truffle-resolver");
var Artifactor = require("truffle-artifactor");
var Artifactor = require("@truffle/artifactor");

describe.skip("EthPM integration", function() {
var config;
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-core/test/lib/commands/compile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var assert = require("chai").assert;
var Box = require("@truffle/box");
var Contracts = require("@truffle/workflow-compile");
var Artifactor = require("truffle-artifactor");
var Artifactor = require("@truffle/artifactor");
var Resolver = require("truffle-resolver");
var MemoryStream = require("memorystream");
var command = require("../../../lib/commands/compile");
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-core/test/lib/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var Box = require("@truffle/box");
var Create = require("../../lib/create");
var dir = require("node-dir");
var Resolver = require("truffle-resolver");
var Artifactor = require("truffle-artifactor");
var Artifactor = require("@truffle/artifactor");

describe("create", function() {
var config;
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-core/test/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var fs = require("fs-extra");
var glob = require("glob");
var Ganache = require("ganache-core");
var Resolver = require("truffle-resolver");
var Artifactor = require("truffle-artifactor");
var Artifactor = require("@truffle/artifactor");
var Web3 = require("web3");

describe("migrate", function() {
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-core/test/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var path = require("path");
var mkdirp = require("mkdirp");
var async = require("async");
var Resolver = require("truffle-resolver");
var Artifactor = require("truffle-artifactor");
var Artifactor = require("@truffle/artifactor");
var Contracts = require("@truffle/workflow-compile");

describe("NPM integration", function() {
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-core/test/profiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var glob = require("glob");
var Box = require("@truffle/box");
var Profiler = require("@truffle/compile-solidity/profiler");
var Resolver = require("truffle-resolver");
var Artifactor = require("truffle-artifactor");
var Artifactor = require("@truffle/artifactor");

// TOOD: Move this to @truffle/compile-solidity!

Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-environment/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Web3Shim = require("truffle-interface-adapter").Web3Shim;
const expect = require("@truffle/expect");
const TruffleError = require("@truffle/error");
const Resolver = require("truffle-resolver");
const Artifactor = require("truffle-artifactor");
const Artifactor = require("@truffle/artifactor");
const Ganache = require("ganache-core/public-exports");

const Environment = {
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-environment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@truffle/expect": "^0.0.10",
"ganache-core": "2.7.0",
"node-ipc": "^9.1.1",
"truffle-artifactor": "^4.0.30",
"@truffle/artifactor": "^4.0.30",
"truffle-interface-adapter": "^0.2.5",
"truffle-resolver": "^5.0.16",
"web3": "1.2.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/workflow-compile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@truffle/compile-solidity": "^4.2.3",
"@truffle/compile-vyper": "^1.0.27",
"@truffle/external-compile": "^1.0.16",
"truffle-artifactor": "^4.0.30",
"@truffle/artifactor": "^4.0.30",
"truffle-config": "^1.1.20",
"truffle-resolver": "^5.0.16"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/workflow-compile/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Config = require("truffle-config");
const expect = require("@truffle/expect");
const Resolver = require("truffle-resolver");
const Artifactor = require("truffle-artifactor");
const Artifactor = require("@truffle/artifactor");

function prepareConfig(options) {
expect.options(options, ["contracts_build_directory"]);
Expand Down

0 comments on commit 4c80542

Please sign in to comment.