Skip to content

Commit

Permalink
chore(monorepo): convert to monorepo an prepare for publish
Browse files Browse the repository at this point in the history
  • Loading branch information
ottodevs committed Jan 6, 2020
1 parent 5422f1d commit 4b0c9e2
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sol linguist-language=Solidity
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# aragon-cli
**/**/artifact.json

# coverage
*/**/coverage
*/**/coverageEnv
*/**/coverage.json
*/**/allFiredEvents
*/**/scTopics

# dotenv environment variables file
.env

# dependencies
node_modules
**/*/node_modules

# lerna
lerna-debug.log

# lock files
package-lock.json
yarn.lock

# logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# macOS env file
.DS_Store

# runtime data
pids
*.pid
*.seed
*.pid.lock

# truffle build artifacts
*/**/abi
*/**/build
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Token Manager Custom Quasi-transferable feature

[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)

## Development notes

### To update the upstream codebase from A1 repo
Expand All @@ -16,3 +18,9 @@
From that stage, solve any eventual merge conflict and then commit the changes

Remember to take care of keeping whitelist-oracle related code to avoid breaking the feature

## Publishing to npm

- Login with `npm login`
- Ensure tests are passing with `npm test` before trying to publish
- Run `npx lerna publish` and follow the steps
2 changes: 1 addition & 1 deletion apps/token-manager/contracts/TokenManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import "@aragon/os/contracts/lib/math/SafeMath.sol";
import "@aragon/apps-shared-minime/contracts/ITokenController.sol";
import "@aragon/apps-shared-minime/contracts/MiniMeToken.sol";

import { ITransferOracle } from "@autark/apps-whitelist-oracle/contracts/WhitelistOracle.sol";
import { ITransferOracle } from "@autarklabs/apps-whitelist-oracle/contracts/WhitelistOracle.sol";


contract TokenManager is ITokenController, IForwarder, AragonApp {
Expand Down
18 changes: 7 additions & 11 deletions apps/token-manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autark/apps-token-manager-custom",
"version": "0.0.1",
"name": "@autarklabs/apps-token-manager-custom",
"version": "0.0.0",
"main": "index.js",
"scripts": {
"compile": "truffle compile",
Expand All @@ -14,7 +14,7 @@
"test:gas": "GAS_REPORTER=true npm test",
"coverage": "SOLIDITY_COVERAGE=true npm run ganache-cli:test",
"truffle:dev": "truffle dev",
"ganache-cli:test": "./node_modules/@aragon/test-helpers/ganache-cli.sh",
"ganache-cli:test": "../../node_modules/@aragon/test-helpers/ganache-cli.sh",
"prepare": "npm run install:frontend",
"install:frontend": "cd app && npm install",
"abi:extract": "truffle-extract --output abi/ --keys abi",
Expand All @@ -28,20 +28,12 @@
"/contracts",
"/test"
],
"author": "Aragon Association <[email protected]>",
"contributors": [
"Jorge Izquierdo <[email protected]>",
"Pierre Bertet <[email protected]>",
"Oliver Nordbjerg <[email protected]>",
"Brett Sun <[email protected]>"
],
"license": "(GPL-3.0-or-later OR AGPL-3.0-or-later)",
"description": "",
"devDependencies": {
"@aragon/apps-shared-migrations": "1.0.0",
"@aragon/cli": "^6.0.0",
"@aragon/test-helpers": "^2.1.0",
"@autark/apps-whitelist-oracle": "^0.0.1",
"eth-gas-reporter": "^0.2.0",
"ethereumjs-testrpc-sc": "^6.5.1-sc.0",
"ganache-cli": "^6.4.3",
Expand All @@ -52,6 +44,10 @@
},
"dependencies": {
"@aragon/apps-shared-minime": "1.0.0",
"@autarklabs/apps-whitelist-oracle": "^0.0.0",
"@aragon/os": "4.2.0"
},
"publishConfig": {
"access": "public"
}
}
19 changes: 11 additions & 8 deletions apps/whitelist-oracle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autark/apps-whitelist-oracle",
"version": "0.0.1",
"name": "@autarklabs/apps-whitelist-oracle",
"version": "0.0.0",
"scripts": {
"compile": "truffle compile",
"apm:prepublish": "npm run compile",
Expand All @@ -12,7 +12,7 @@
"test:gas": "GAS_REPORTER=true npm test",
"coverage": "SOLIDITY_COVERAGE=true npm run ganache-cli:test",
"truffle:dev": "truffle dev",
"ganache-cli:test": "./node_modules/@aragon/test-helpers/ganache-cli.sh",
"ganache-cli:test": "../../node_modules/@aragon/test-helpers/ganache-cli.sh",
"abi:extract": "truffle-extract --output abi/ --keys abi",
"prepublishOnly": "truffle compile --all && npm run abi:extract -- --no-compile"
},
Expand All @@ -28,16 +28,19 @@
"description": "",
"devDependencies": {
"@aragon/apps-shared-migrations": "1.0.0",
"@aragon/test-helpers": "^2.0.0",
"eth-gas-reporter": "0.1.12",
"@aragon/test-helpers": "^2.1.0",
"eth-gas-reporter": "^0.2.0",
"ethereumjs-testrpc-sc": "^6.5.1-sc.0",
"ganache-cli": "6.1.8",
"solidity-coverage": "0.5.11",
"solium": "1.1.8",
"ganache-cli": "^6.4.3",
"solidity-coverage": "0.6.2",
"solium": "^1.2.3",
"truffle": "4.1.14",
"truffle-extract": "^1.2.1"
},
"dependencies": {
"@aragon/os": "4.2.0"
},
"publishConfig": {
"access": "public"
}
}
Empty file.
5 changes: 5 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hoist": true,
"packages": ["apps/*"],
"version": "independent"
}
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "token-manager-custom-monorepo",
"private": true,
"scripts": {
"postinstall": "lerna bootstrap",
"test": "lerna run test"
},
"devDependencies": {
"lerna": "^3.20.2"
}
}

0 comments on commit 4b0c9e2

Please sign in to comment.