Edit Page

Sending Pull Requests

This guide is designed to get you started contributing to the Sails framework. It assumes you know how to use Github, but should be applicable for contributors of all levels.

Contribution Guidelines

Like any open-source project, we must have guidelines for contributions. It helps protect the quality of the code, and gives all of us confidence that our framework will stay robust and dependable. Whether it's a bug fix or a huge new feature set, it's important that we consistently apply these checks and balances for all contributions to Sails.

Please check over the following requirements before submitting a pull request:

  • Bug fixes should have accompanying tests where possible. We use Mocha for testing.
  • Code should follow our style guide to maintain consistency (see .jshint and/or .editorconfig files in repo)

If you have a high priority hot-fix for the currently deployed version, please post an issue on Github, and mention @mikermcneil. Also, for emergencies, please feel free to tweet @sailsjs.

Now that we are all on the same page, lets get to coding some awesomeness of our own :D

Fork

Start by forking the repository:

Screen Shot 2013-02-12 at 2.37.04 PM.png

Clone

Then clone your fork into your local filesystem: git clone [email protected]:YOUR_USER_NAME/sails.git

Update

To merge recent changes into your fork, inside your project dir:

git remote add core https://github.com/balderdashy/sails.git
git fetch core
git merge core/master

For additional details, see github.

Code

Make your enhancements, fix bugs, do your thang.

Test

Please write a test for your addition/fix. I know it kind of sucks if you're not used to it, but it's how we maintain great code. For our test suite, we use mocha. You can run the tests with npm test. See the "Testing" section in the contribution guide for more information.

Screen Shot 2013-02-12 at 2.56.59 PM.png

Pull Request

When you're done, you can commit your fix, push up your changes, and then go into github and submit a pull request. We'll look it over and get back to you ASAP.

Screen Shot 2013-02-12 at 2.55.40 PM.png

Running your fork with your application

If you forked Sails, and you want to test your Sails app against your fork, here's how you do it:

In your local copy of your fork of Sails: sudo npm link

In your Sails app's repo: npm link sails

This creates a symbolic link as a local dependency (in your app's node_modules folder). This has the effect of letting you run your app with the version Sails you linked.

$ sails lift

Thanks for your contributions!

Using Sails at work?

If your company has the budget, consider purchasing Flagship support. It's a great way to support the ongoing development of the open source tools you use every day. And it gives you an extra lifeline to the Sails core team.

Sails logo
  • Home
  • Get started
  • Support
  • Documentation
  • Documentation

For a better experience on sailsjs.com, update your browser.

Documentation

Reference Concepts App structure | Upgrading Contribution guide | Tutorials More

Contribution guide

  • Code of Conduct
  • Code Submission Guidelines
    • Best Practices
    • Sending Pull Requests
    • Writing Tests
  • Contributing to the Docs
  • Contributor's Pledge
  • Core Maintainers
  • Issue Contributions
  • Proposing Features/Enhancements
    • Submitting a Proposal

Built with Love

The Sails framework is maintained by a web & mobile studio in Austin, TX, with the help of our contributors. We created Sails in 2012 to assist us on Node.js projects. Naturally we open-sourced it. We hope it makes your life a little bit easier!

Sails:
  • What is Sails?
  • Treeline IDE
  • Contribute
  • Logos/artwork
About:
  • The Sails Company
  • Security
  • News
  • Legal
Help:
  • Get started
  • Documentation
  • Docs
  • Enterprise
  • Hire us

© 2012-2018 The Sails Company. 
The Sails framework is free and open-source under the MIT License.