This documentation is intended for new Molecule contributors, either new team members or regular users who'd like to add small features to improve their coding experience.
It should give you a general idea of how the project works, and how you can work on it.
The first step to contribute to Molecule is to download the code from Github. Run the following commands on your terminal:
git clone https://github.com/alanzanattadev/atom-molecule-dev-environment.git cd atom-molecule-dev-environment
Then, install Molecule in
apm command line, and run Atom in dev mode.
npm install apm link -d atom --dev
Note: We recommend you uninstall Molecule before installing it in dev mode. Atom sometimes produces hard-to-track bugs when a package is installed both in normal mode and in dev mode.
Writing your change
Whether you want to write a new feature or patch an existing one, the Molecule codebase provides you with tools to help with your development cycle.
The first thing you might want to add is a new UI. To help you quickly iterate on your UI code, Molecule integrates Storybooks.
We recommend you adopt a test-driven approach. Contributions are much more likely to be integrated into Molecule if they're bundled with self-explanatory unit tests.
Running your code
When you want to run your code to see your changes, start atom in dev mode. Note
that atom uses the code in the
build/ folder, which is produced by
yarn babel:watch # Another terminal atom --dev
You might want to inspect your code using Chrome Devtools. Atom provides the default set of tools, to which Molecule adds React Devtools and Remote Redux Devtools support. You can use them to inspect the values of your data structures.
Data relating to the regular execution of Molecule is logged in the Molecule Console.
Pushing your change
Test your code
Before your changes can be integrated into Molecule, they have to pass a minimum set of requirements, tested automatically on the Github CI:
npm test to check that your changes don't introduce new errors.
Note: In the future, we will also require that contribution don't have Flowtype errors.
Write a Pull Request
Molecule integrates changes to its codebase through Github Pull Requests. Once your feature or path is complete, submit a PR and will we get back to you as soon as we can.