Browse Source

Clean up npm package (#904)

* ignore everything but official contracts for npm

* add tests to npm package

* remove truffle migrations stuff

* remove seemingly unused npm dependency

* clean up dependencies
Francisco Giordano 7 years ago
parent
commit
0e5799c93b

+ 2 - 0
contracts/.npmignore

@@ -0,0 +1,2 @@
+mocks
+examples

+ 0 - 21
contracts/lifecycle/Migrations.sol

@@ -1,21 +0,0 @@
-pragma solidity ^0.4.21;
-
-import "../ownership/Ownable.sol";
-
-
-/**
- * @title Migrations
- * @dev This is a truffle contract, needed for truffle integration, not meant for use by Zeppelin users.
- */
-contract Migrations is Ownable {
-  uint256 public lastCompletedMigration;
-
-  function setCompleted(uint256 completed) onlyOwner public {
-    lastCompletedMigration = completed;
-  }
-
-  function upgrade(address newAddress) onlyOwner public {
-    Migrations upgraded = Migrations(newAddress);
-    upgraded.setCompleted(lastCompletedMigration);
-  }
-}

+ 0 - 0
migrations/.gitkeep


+ 0 - 5
migrations/1_initial_migration.js

@@ -1,5 +0,0 @@
-var Migrations = artifacts.require('Migrations');
-
-module.exports = function (deployer) {
-  deployer.deploy(Migrations);
-};

+ 0 - 9
migrations/2_deploy_contracts.js

@@ -1,9 +0,0 @@
-// var Ownable = artifacts.require("Ownable");
-
-// NOTE: Use this file to easily deploy the contracts you're writing.
-//   (but make sure to reset this file before committing
-//    with `git checkout HEAD -- migrations/2_deploy_contracts.js`)
-
-module.exports = function (deployer) {
-  // deployer.deploy(Ownable);
-};

+ 2 - 7
package-lock.json

@@ -1974,7 +1974,8 @@
     "dotenv": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz",
-      "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0="
+      "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=",
+      "dev": true
     },
     "drbg.js": {
       "version": "1.0.1",
@@ -6205,12 +6206,6 @@
         }
       }
     },
-    "mocha-lcov-reporter": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/mocha-lcov-reporter/-/mocha-lcov-reporter-1.3.0.tgz",
-      "integrity": "sha1-Rpve9PivyaEWBW8HnfYYLQr7A4Q=",
-      "dev": true
-    },
     "ms": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",

+ 5 - 4
package.json

@@ -2,6 +2,10 @@
   "name": "zeppelin-solidity",
   "version": "1.8.0",
   "description": "Secure Smart Contract library for Solidity",
+  "files": [
+    "contracts",
+    "test"
+  ],
   "scripts": {
     "test": "scripts/test.sh",
     "lint": "eslint .",
@@ -42,6 +46,7 @@
     "chai-as-promised": "^7.0.0",
     "chai-bignumber": "^2.0.0",
     "coveralls": "^2.13.1",
+    "dotenv": "^4.0.0",
     "eslint": "^4.11.0",
     "eslint-config-standard": "^10.2.1",
     "eslint-plugin-import": "^2.8.0",
@@ -51,13 +56,9 @@
     "ethereumjs-util": "^5.1.2",
     "ethjs-abi": "^0.2.1",
     "ganache-cli": "6.1.0",
-    "mocha-lcov-reporter": "^1.3.0",
     "solidity-coverage": "^0.4.15",
     "solium": "^1.1.6",
     "truffle": "^4.1.5",
     "truffle-hdwallet-provider": "0.0.3"
-  },
-  "dependencies": {
-    "dotenv": "^4.0.0"
   }
 }