-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CLI Foundry Template #854
Closed
Closed
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
9a10b39
Semaphore identity example code bug fix
weipooppys93030 68df0d9
Receive suggestion for consistency
weipooppys93030 845e49c
chore: forge init
timou0911 7db237f
forge install: forge-std
timou0911 3924f5f
Foundry CLI First Draft
timou0911 c507097
Merge branch 'new_branch' of https://github.com/csiejimmyliu/semaphor…
csiejimmyliu 8e73c32
modules
csiejimmyliu db8db8e
forge install: semaphore
csiejimmyliu 1455706
forge install: zk-kit.solidity
csiejimmyliu 88b7b46
forge install: poseidon-solidity
csiejimmyliu 29228d9
forge install: openzeppelin-contracts
csiejimmyliu a062c6a
modules
csiejimmyliu 0ec856e
forge install: semaphore
csiejimmyliu de881bb
forge install: zk-kit.solidity
csiejimmyliu 967fade
forge install: poseidon-solidity
csiejimmyliu 4754073
forge install: openzeppelin-contracts
csiejimmyliu caf1e7a
modules
csiejimmyliu 3193f7d
forge install: semaphore
csiejimmyliu 4ac8c36
forge install: zk-kit.solidity
csiejimmyliu 7fba0cf
forge install: poseidon-solidity
csiejimmyliu a4e5fe9
forge install: openzeppelin-contracts
csiejimmyliu 92dae03
modules
csiejimmyliu 1f1214c
forge install: semaphore
csiejimmyliu 4a26225
forge install: zk-kit.solidity
csiejimmyliu 1eba2a9
forge install: poseidon-solidity
csiejimmyliu d553272
forge install: openzeppelin-contracts
csiejimmyliu 8197522
modules
csiejimmyliu 18446f8
forge install: semaphore
csiejimmyliu eb9b2c2
forge install: zk-kit.solidity
csiejimmyliu ba33b5d
forge install: poseidon-solidity
csiejimmyliu d1b755e
forge install: openzeppelin-contracts
csiejimmyliu bdfe270
modules
csiejimmyliu c13fef9
forge install: semaphore
csiejimmyliu fa7cf9a
forge install: zk-kit.solidity
csiejimmyliu a72abc9
forge install: poseidon-solidity
csiejimmyliu 997264f
forge install: openzeppelin-contracts
csiejimmyliu 7601e50
forge install: forge-std
csiejimmyliu 2473ad8
modules
csiejimmyliu df86f35
forge install: semaphore
csiejimmyliu d6b8b48
forge install: zk-kit.solidity
csiejimmyliu b22b15d
forge install: poseidon-solidity
csiejimmyliu e179470
forge install: openzeppelin-contracts
csiejimmyliu ceed128
modules
csiejimmyliu 0f05f4f
forge install: semaphore
csiejimmyliu 6266bb5
forge install: zk-kit.solidity
csiejimmyliu 6d9843c
forge install: poseidon-solidity
csiejimmyliu 2f874b6
forge install: openzeppelin-contracts
csiejimmyliu bb40b95
forge install: forge-std
csiejimmyliu d4e83b5
modules
csiejimmyliu ab8d1f6
forge install: semaphore
csiejimmyliu 1a561fb
forge install: zk-kit.solidity
csiejimmyliu 5de7d1b
forge install: poseidon-solidity
csiejimmyliu 589b080
forge install: openzeppelin-contracts
csiejimmyliu 8006eda
forge install: forge-std
csiejimmyliu cf5fedc
modules
csiejimmyliu a12b1b1
forge install: semaphore
csiejimmyliu 0c88ced
forge install: zk-kit.solidity
csiejimmyliu ba78da7
forge install: poseidon-solidity
csiejimmyliu 081bce4
forge install: openzeppelin-contracts
csiejimmyliu 877ad59
modules
csiejimmyliu 8e790ce
forge install: semaphore
csiejimmyliu c28befb
forge install: zk-kit.solidity
csiejimmyliu 5465816
forge install: poseidon-solidity
csiejimmyliu 5bc6eac
forge install: openzeppelin-contracts
csiejimmyliu b83d5c2
forge install: forge-std
csiejimmyliu 5a53df7
modules
csiejimmyliu f13c7e5
forge install: semaphore
csiejimmyliu e064f4e
forge install: zk-kit.solidity
csiejimmyliu d338f27
forge install: poseidon-solidity
csiejimmyliu 826b659
forge install: openzeppelin-contracts
csiejimmyliu 5bc93e7
forge install: forge-std
csiejimmyliu 76afd09
change test name
csiejimmyliu 56ae53b
modify declaration of semaphore and verifier
csiejimmyliu 673b801
Modify Test Function Name
timou0911 46b3c14
Add Test Chain Target
timou0911 721f26c
forge std install
csiejimmyliu 4832baa
refactor(cli-template-contracts-foundry): change default Anvil addres…
timou0911 22ea215
chore(cli-template-contracts-foundry): add comments
timou0911 52eea1b
refactor(cli-template-contracts-foundry): add Semaphore & SemaphoreVe…
timou0911 f02da82
chore(cli-template-contracts-foundry): add forge coverage for Makefile
timou0911 5373034
chore(cli-template-contracts-foundry): add env.example
timou0911 072b11f
docs(cli-template-contracts-foundry): add command instructions
timou0911 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[submodule "packages/cli-template-contracts-foundry/lib/forge-std"] | ||
path = packages/cli-template-contracts-foundry/lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std | ||
[submodule "packages/cli-template-contracts-foundry/lib/semaphore"] | ||
path = packages/cli-template-contracts-foundry/lib/semaphore | ||
url = https://github.com/semaphore-protocol/semaphore | ||
[submodule "packages/cli-template-contracts-foundry/lib/zk-kit.solidity"] | ||
path = packages/cli-template-contracts-foundry/lib/zk-kit.solidity | ||
url = https://github.com/privacy-scaling-explorations/zk-kit.solidity | ||
[submodule "packages/cli-template-contracts-foundry/lib/poseidon-solidity"] | ||
path = packages/cli-template-contracts-foundry/lib/poseidon-solidity | ||
url = https://github.com/chancehudson/poseidon-solidity | ||
[submodule "packages/cli-template-contracts-foundry/lib/openzeppelin-contracts"] | ||
path = packages/cli-template-contracts-foundry/lib/openzeppelin-contracts | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SEPOLIA_RPC_URL= | ||
SEPOLIA_API_URL= | ||
ETHERSCAN_API_KEY= | ||
PRIVATE_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Compiler files | ||
cache/ | ||
out/ | ||
|
||
# Ignores development broadcast logs | ||
!/broadcast | ||
/broadcast/*/31337/ | ||
/broadcast/**/dry-run/ | ||
|
||
# Docs | ||
docs/ | ||
|
||
# Dotenv file | ||
.env |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
-include .env | ||
|
||
DEFAULT_ANVIL_KEY := 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | ||
DEFAULT_ANVIL_ADDRESS := 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 | ||
DEFAULT_RPC_URL := http://localhost:8545 | ||
|
||
.PHONY: all test clean | ||
|
||
all: clean remove install build | ||
|
||
# Clean the repo | ||
clean :; forge clean | ||
|
||
# Remove modules | ||
remove :; rm -rf .gitmodules && rm -rf .git/modules/* && rm -rf lib && touch .gitmodules && git add . && git commit -m "modules" | ||
|
||
install :; forge install semaphore-protocol/semaphore privacy-scaling-explorations/zk-kit.solidity chancehudson/poseidon-solidity OpenZeppelin/openzeppelin-contracts foundry-rs/forge-std | ||
|
||
install-no-git :; forge install --no-git semaphore-protocol/semaphore privacy-scaling-explorations/zk-kit.solidity chancehudson/poseidon-solidity OpenZeppelin/openzeppelin-contracts foundry-rs/forge-std | ||
|
||
# Update Dependencies | ||
update :; forge update | ||
|
||
build :; forge build | ||
|
||
test :; forge test -vvv | ||
|
||
gas-report :; forge test --gas-report | ||
|
||
coverage :; forge coverage | ||
|
||
snapshot :; forge snapshot | ||
|
||
format :; forge fmt | ||
|
||
slither :; slither ./src | ||
|
||
#format :; prettier --write src/**/*.sol && prettier --write src/*.sol | ||
|
||
# solhint should be installed globally | ||
lint :; solhint src/**/*.sol && solhint src/*.sol | ||
|
||
# use the "@" to hide the command from your shell | ||
deploy :; @forge script script/DeployFeedback.s.sol:DeployFeedback --rpc-url $(DEFAULT_RPC_URL) --private-key $(DEFAULT_ANVIL_KEY) --broadcast -vvvvv | ||
|
||
deploy-sepolia :; @forge script script/DeployFeedback.s.sol:DeployFeedback --rpc-url $(SEPOLIA_RPC_URL) --private-key $(PRIVATE_KEY) --broadcast --etherscan-api-key $(ETHERSCAN_API_KEY) -vvvvv | ||
|
||
deploy-sepolia-verify :; @forge script script/DeployFeedback.s.sol:DeployFeedback --rpc-url $(SEPOLIA_RPC_URL) --private-key $(PRIVATE_KEY) --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvvvv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Semaphore Foundry Template | ||
|
||
This project demonstrates a basic Semaphore use case. It comes with a sample contract, a test for that contract and a sample script that deploys that contract. | ||
|
||
## Install | ||
|
||
### Install dependencies | ||
|
||
```bash | ||
make install | ||
``` | ||
|
||
## Usage | ||
|
||
### Compile contracts | ||
|
||
```bash | ||
make build | ||
``` | ||
|
||
### Test | ||
|
||
```bash | ||
make test | ||
``` | ||
|
||
You can also generate a test coverage report: | ||
|
||
```bash | ||
make coverage | ||
``` | ||
|
||
Or a test gas report: | ||
|
||
```bash | ||
make gas-report | ||
``` | ||
|
||
### Deploy contracts | ||
|
||
1. Copy the `.env.example` file as `.env`. | ||
|
||
```bash | ||
cp .env.example .env | ||
``` | ||
|
||
2. Add your environment variables. | ||
|
||
> [!NOTE] | ||
> You should at least set a valid Ethereum URL (e.g. Infura) and a private key with some ethers. | ||
|
||
3. And deploy your contract. | ||
|
||
```bash | ||
make deploy | ||
``` | ||
|
||
4. You can also deploy your contract in Sepolia test chain. | ||
|
||
```bash | ||
make deploy-sepolia | ||
``` | ||
|
||
```bash | ||
make deploy-sepolia-verify | ||
``` | ||
|
||
> [!NOTE] | ||
> Check the Semaphore contract addresses [here](https://docs.semaphore.pse.dev/deployed-contracts). | ||
|
||
### Code quality and formatting | ||
|
||
Run [ESLint](https://eslint.org/) and [solhint](https://github.com/protofire/solhint) to analyze the code and catch bugs: | ||
|
||
```bash | ||
yarn lint | ||
``` | ||
|
||
Run [Prettier](https://prettier.io/) to check formatting rules: | ||
|
||
```bash | ||
yarn prettier | ||
``` | ||
|
||
Or to automatically format the code: | ||
|
||
```bash | ||
yarn prettier:write | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[profile.default] | ||
src = "src" | ||
out = "out" | ||
libs = ["lib"] | ||
|
||
remappings = [ | ||
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", | ||
"@zk-kit/lean-imt.sol=lib/zk-kit.solidity/packages/lean-imt/contracts/", | ||
"@semaphore/contracts/=lib/semaphore/packages/contracts/", | ||
"poseidon-solidity/=lib/poseidon-solidity/contracts/" | ||
] | ||
|
||
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options |
1 change: 1 addition & 0 deletions
1
packages/cli-template-contracts-foundry/lib/openzeppelin-contracts
Submodule openzeppelin-contracts
added at
dbb610
Submodule poseidon-solidity
added at
8205c9
Submodule zk-kit.solidity
added at
a4e713
42 changes: 42 additions & 0 deletions
42
packages/cli-template-contracts-foundry/script/DeployFeedback.s.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
import {Feedback} from "../src/Feedback.sol"; | ||
import {Semaphore} from "@semaphore/contracts/contracts/Semaphore.sol"; | ||
import {SemaphoreVerifier} from "@semaphore/contracts/contracts/base/SemaphoreVerifier.sol"; | ||
import {ISemaphoreVerifier} from "@semaphore/contracts/contracts/interfaces/ISemaphoreVerifier.sol"; | ||
import "forge-std/Script.sol"; | ||
|
||
contract DeployFeedback is Script { | ||
function run() external returns (address, address) { | ||
|
||
address semaphoreVerifierAddress; | ||
address semaphoreAddress; | ||
|
||
if (block.chainid == 11155111) { | ||
semaphoreVerifierAddress = 0xe538f9DeeE04A397decb1E7dc5D16fD6f123c043; | ||
semaphoreAddress = 0x1e0d7FF1610e480fC93BdEC510811ea2Ba6d7c2f; | ||
} | ||
|
||
vm.startBroadcast(); | ||
|
||
if (semaphoreAddress == address(0)) { | ||
// Deploy SemaphoreVerifier for Semaphore | ||
SemaphoreVerifier semaphoreVerifier = new SemaphoreVerifier(); | ||
semaphoreVerifierAddress = address(semaphoreVerifier); | ||
ISemaphoreVerifier IsemaphoreVerifier = ISemaphoreVerifier(address(semaphoreVerifier)); | ||
// Deploy Semaphore for Feedback | ||
Semaphore semaphore = new Semaphore(IsemaphoreVerifier); | ||
semaphoreAddress = address(semaphore); | ||
} | ||
|
||
// Deploy Feedback | ||
Feedback feedback = new Feedback(semaphoreAddress); | ||
|
||
vm.stopBroadcast(); | ||
|
||
console.log("Feedback contract has been deployed to:", address(feedback)); | ||
|
||
return (address(feedback), semaphoreAddress); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
import {ISemaphore} from "@semaphore/contracts/contracts/interfaces/ISemaphore.sol"; | ||
|
||
contract Feedback { | ||
ISemaphore public semaphore; | ||
|
||
uint256 public groupId; | ||
|
||
constructor(address semaphoreAddress) { | ||
semaphore = ISemaphore(semaphoreAddress); | ||
|
||
groupId = semaphore.createGroup(); | ||
} | ||
|
||
function joinGroup(uint256 identityCommitment) external { | ||
semaphore.addMember(groupId, identityCommitment); | ||
} | ||
|
||
function sendFeedback( | ||
uint256 merkleTreeDepth, | ||
uint256 merkleTreeRoot, | ||
uint256 nullifier, | ||
uint256 feedback, | ||
uint256[8] calldata points | ||
) external { | ||
ISemaphore.SemaphoreProof memory proof = ISemaphore.SemaphoreProof( | ||
merkleTreeDepth, | ||
merkleTreeRoot, | ||
nullifier, | ||
feedback, | ||
groupId, | ||
points | ||
); | ||
|
||
semaphore.validateProof(groupId, proof); | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
packages/cli-template-contracts-foundry/test/TestFeedback.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
import {Feedback} from "../src/Feedback.sol"; | ||
import {DeployFeedback} from "../script/DeployFeedback.s.sol"; | ||
import {ISemaphore} from "@semaphore/contracts/contracts/interfaces/ISemaphore.sol"; | ||
import "forge-std/Test.sol"; | ||
import "forge-std/Vm.sol"; | ||
import "forge-std/StdAssertions.sol"; | ||
|
||
contract TestFeedback is Test { | ||
event MemberAdded(uint256 indexed groupId, uint256 index, uint256 identityCommitment, uint256 merkleTreeRoot); | ||
|
||
Feedback feedback; | ||
ISemaphore semaphore; | ||
|
||
function setUp() external { | ||
DeployFeedback deployFeedback = new DeployFeedback(); | ||
(address feedbackAddress, address semaphoreAddress) = deployFeedback.run(); | ||
feedback = Feedback(feedbackAddress); | ||
semaphore = ISemaphore(semaphoreAddress); | ||
} | ||
|
||
function testGroupCanBeSuccessfullyCreatedInConstructor() public view { | ||
uint256 groupCount = semaphore.groupCounter(); | ||
assertEq(groupCount, 1); | ||
} | ||
|
||
function testJoinGroup() public { | ||
// The commitment below is generated with private key of the first account in Anvil | ||
uint256 identityCommitment = 15072455385723004728391568434269917452175057560864330595979104241296826134229; | ||
|
||
vm.expectEmit(); | ||
emit MemberAdded(0, 0, identityCommitment, identityCommitment); | ||
|
||
feedback.joinGroup(identityCommitment); | ||
} | ||
|
||
function testSendFeedback() public { | ||
// The commitment below is generated with private key of the first account in Anvil | ||
uint256 identityCommitment = 15072455385723004728391568434269917452175057560864330595979104241296826134229; | ||
|
||
// proof | ||
uint256 merkleTreeDepth = 1; | ||
uint256 merkleTreeRoot = 15072455385723004728391568434269917452175057560864330595979104241296826134229; | ||
uint256 nullifier = 19686122779422310562166284157356225273555811832250923548604308577995736533741; | ||
uint256 _feedback = 10; | ||
uint256[8] memory points = [ | ||
12048312860461559338883155239253399933546666729690013703471566999549175452467, | ||
21840091385609522690103928000869734241136862303146585471149748945500784854265, | ||
10054166788431277732934266072748176286083365382773741957806739135617485223542, | ||
9116054769380232069869558420495933708797671282085269461846220481242548419978, | ||
6948551756635965397908570768367265912884504926499199123083878377204200654789, | ||
2245690128809758381379719477871572712156305432595569015554741897717367802975, | ||
5611601698470220983640634359607737788561497874240905720723835997666161640377, | ||
10003362076211645361201917446734540672642362716488164733173444779942043660944 | ||
]; | ||
|
||
feedback.joinGroup(identityCommitment); | ||
feedback.sendFeedback(merkleTreeDepth, merkleTreeRoot, nullifier, _feedback, points); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally love
Makefile
as a task runner.But I am wondering if it is appropriate for this repo.
This repo is very "node ecosystem" oriented. So we run tasks with
yarn
.On one side I agree it may not make much sense to use
yarn
as a task runner for a template that does not include anyjs,ts
files, makingmake
a good choice.One the other side, for the sake of consistency maybe we should stick to
yarn
: meaning all these make tasks belong rather in package.jsonscripts
. And eventually we need a package.json in order to publish the template as an npm package... so...What do you think @vplasencia @cedoor ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree! As soon as we have 1 non-NPM package only we should make it a NPM package. If there are many other non-NPM packages we can think of a system to download templates that is more language-agnostic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. Regarding if it's better to use Makefile or yarn, I think it depends on what developers prefer when using Foundry. If most devs prefer to use Makefile, we should provide the Foundry template with Makefile and if they prefer yarn (npm, pnpm) we should provide the Foundry template with yarn. If there are no strong opinions on that we could decide one.
If we have to decide one, I see pros and cons. I think for just contracts, Makefile could be lighter and easier to add but for bigger projects yarn (npm, pnpm) could be better.
I have seen projects using both, so another alternative to discuss could be if it's better to add both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about having
Makefile
as a task runner and apackage.json
to make it compatible/downloadable with our CLI?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also add a
package.json
to download the template and then remove it after it's downloaded, the same way we create theyarn.lock
file but removing a file instead of creating it.Or if we keep the
package.json
and add the scripts so that people decide the one they prefer and remove the Makefile or thepackage.json
andyarn.lock
files.What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to prefer the first option.
@sripwoud ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes let's go with the option of keeping the
Makefile
and removing thepackage.json
after it having been downloaded. (That's was the 1st option right?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timou0911 @sripwoud Is this PR ready to be merged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I was busy in the past few weeks. I will start handling it next week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem!