This repository has been archived by the owner on Jan 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
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
This was referenced Apr 14, 2018
Open
65858f5
to
f340b88
Compare
I've changed my mind on this. Our one-line scripts are much more manageable if the seeding happens with the migrations. In addition, I discovered that you can tell the migrations whether or not to run on a per-network basis. So that takes care of my concern about running a seed data migration in production.
We'll be using a single command to build/deploy our contracts as well as our JS. Makes sense and makes the command simpler if all of the code is in the same directory. Also I think it's just simpler to have a single package in a repo.
Starts ganache, deploys contracts, builds JS, and watches for changes
Truffle is very rigid about its tests. It mandates that the truffle tests are placed in the `test` directory, no exceptions, and it tries to run all of the tests in that directory. In other words, we cannot put any origin.js integration tests in that directory. We could work around this, but at this point it starts getting messy, so I think it's definitely best to just keep the truffle code separate for now.
f340b88
to
f0151e6
Compare
Reasons for doing this: 1. Improving developer experience by allowing them to run `npm install` from the repo root. We could hack our way around this with the old scheme, but that gets weird really fast 2. Maintaining and exporting just a single npm package. What will be consumed is a simple npm package. That's what should be at the top level. 3. Simpler! This setup is more readable imo.
This is the proper way to set these options, because the platform will never run as a standalone application. It will be imported into some other environment. All options should be passed in explicitly into the constructor. This also makes local development easier, as environment variables can be set in just one place - the demo dapp.
We shouldn't ever need to access environment variables in origin.js, so it's safe to remove this dependency. All options should be passed in to the origin.js constructor.
f0151e6
to
9323d50
Compare
I took inspiration here from Ember.js, which serves browser tests along with the development server - no extra command needed. Now if a dev wants to run their tests, they can just `npm start` and then head over to localhost:8081.
I have moved all relevant information into the main readme.
4 tasks
16880f9
to
cde086f
Compare
cde086f
to
855880c
Compare
3e8b2d1
to
d8bd061
Compare
So cool! Just a little clarification in the readme and we're all set.
I might take a stab at the README in the morning. But again: Awesome to have this! This makes the onboarding experience light-years beyond our old mess of switching tabs and zillion steps. |
On truffle.js , can we actually change the port to 8545? That's the default port used by metamask, and would save people from having to configure a new RPC URL. |
@wanderingstan Yes we absolutely can! I thought about doing that here but decided to hold off as there is already a lot going on. I'll create a PR for that. |
Yeah good call on making a separate PR for the port. I remember aiham 's good advice to keep PRs pretty focussed, and you this one (by necessity) was already doing a lot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Checklist:
Description:
This is a huge restructure, but I think this moves us in the right direction.
npm setup
andnpm start
to get it up and running and linked locally. Bonus:npm run test:contracts
to run contract tests.npm start
really does everything:localhost:8081
New structure looks like:
Also, see accompanying PR in demo dapp repo. The main change there is that it updates the readme to correspond to these changes. OriginProtocol/origin#108
I've tested the process of walking through local setup using both readmes - but if other people could also try it out that would be great!