👍 Thank you for taking the time to contribute! 👍
The following is a set of guidelines for contributing to STARPEACE client website and its packages, which are hosted in the STARPEACE Project Organization on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
What should I know before I get started?
- Git Commit Messages
- JavaScript Styleguide
- CoffeeScript Styleguide
- Pug Styleguide
- SASS Styleguide
- Vue and Nuxtjs Styleguide
This project and everyone participating in it is governed by the STARPEACE Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].
Please join Discord chatroom if you have any questions or would like to learn more about contributing!
STARPEACE Project is made up several repositories, each with unique responsibilities.
- starpeace-website - static client homepage and license content
- starpeace-client-website - client game application logic and webgl rendering website
- starpeace-client-website-assets - procedural generation and compilation logic of assets for client
- starpeace-documentation-website - static and dynamic documentation website
- starpeace-server-universe-api - STARPEACE Universe API interface (TBD)
- starpeace-server-galaxy-api - STARPEACE Galaxy API interface
- starpeace-server-galaxy-nodejs - STARPEACE Galaxy implementation in NodeJS using express
- starpeace-assets - raw media assets, gameplay resources, and simulation configurations
- starpeace-documents-public - public design, planning, and gameplay documents
- starpeace-project-website - project static content, auto-generated API documentation, and community information
When we make a significant decision in how we maintain the project and what we can or cannot support, we will document it in the starpeace-documents-public or starpeace-documents-private repositories. If you have a question around how we do things, check to see if it is documented there. If it is not documented there, please join Discord chatroom and ask your question.
This section guides you through submitting a bug report for STARPEACE. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
When you are creating a bug report, please include as many details as possible. Fill out the required template, the information it asks for helps us resolve issues faster.
Note: If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
Bugs are tracked as GitHub issues; create an issue and provide the following information by filling in the template.
Explain the problem and include additional details to help maintainers reproduce the problem:
- Use a clear and descriptive title for the issue to identify the problem.
- Describe the exact steps which reproduce the problem in as many details as possible.
- Explain which behavior you expected to see instead and why.
- Include screenshots and animated GIFs which show you following the described steps and clearly demonstrate the problem. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
- Include console output from developer tools pane where possible, including any details and stacktraces of ERROR log messages displayed.
- If the problem wasn't triggered by a specific action, describe what you were doing before the problem happened and share more information using the guidelines below.
Provide more context by answering these questions:
- Did the problem start happening recently (e.g. recent version of STARPEACE) or was this always a problem?
- Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.
Include details about your configuration and environment:
- Which version of STARPEACE did you see the problem? Version and client build information is located on screen, near the lower-right corner.
- What's the name and version of the OS you're using?
- What's the name and version of the web browser you're using?
- What screen resolution and window size do you have?
This section guides you through submitting an enhancement suggestion for STARPEACE, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
Before creating enhancement suggestions, please check this list as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please include as many details as possible. Fill in the template, including the steps that you imagine you would take if the feature you're requesting existed.
- Perform a cursory search to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
Enhancement suggestions are tracked as GitHub issues; provide the following information when creating an issue:
- Use a clear and descriptive title for the issue to identify the suggestion.
- Provide a step-by-step description of the suggested enhancement in as many details as possible.
- Provide specific examples to demonstrate the steps. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
- Describe the current behavior and explain which behavior you expected to see instead and why.
- Include screenshots and animated GIFs which help you demonstrate the steps or point out the part of STARPEACE which the suggestion is related to. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
- Explain why this enhancement would be useful to most players
- Specify the name and version of the OS you're using.
Unsure where to begin contributing to STARPEACE? Join Discord chatroom to discuss possible work or look through any existing issues or project tasks for ideas.
Local development can be accomplished in a few commands. The following build-time dependencies must be installed:
Retrieve copy of repository and navigate to root:
$ git clone https://github.com/starpeace-project/starpeace-client-website.git
$ cd starpeace-client-website
Install starpeace-client-website dependencies:
$ npm install
Build repository with npm command defined in package.json:
$ npm run generate
Local development with nuxt and interactive build can be started with a single command:
$ npm run dev
Nuxt webserver is started locally and can be accessed at http://127.0.0.1:11010. Only this specific local URL is whitelisted to retrieve assets from CDN (normally cross-site errors).
The process described here has several goals:
- Maintain STARPEACE's quality and performance
- Fix problems and add features that are important to users
- Enable a sustainable system for STARPEACE's maintainers to review contributions
Please follow these steps to have your contribution considered by the maintainers:
- Follow all instructions in the template
- Follow the styleguides
- After you submit your pull request, please engage project team for feedback and testing verification
While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.
STARPEACE is a global game with an international player-base, making language translations an important aspect of project. starpeace-client-website aims to support the following languages:
- English, French, Portuguese, German, Italian, and Spanish
If you'd like to see STARPEACE translated to your native language and can provide translations, or can help improve any existing translations, please create an issue or chat with project team.
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
Coffeescript is preferred, though if used, all JavaScript must adhere to JavaScript Standard Style.
- Prefer the object spread operator (
{...anotherObj}
) toObject.assign()
- Inline
export
s with expressions whenever possible// Use this: export default class ClassName { } // Instead of: class ClassName { } export default ClassName
- Place requires in the following order, then alphabetically:
- Built in Node Modules (such as
path
) - Third-party Modules (such as
PIXI
) - Local Modules (using relative paths)
- Built in Node Modules (such as
- Place class properties in the following order:
- Class methods and properties (methods starting with
static
) - Instance methods and properties
- Class methods and properties (methods starting with
- Set parameter defaults without spaces around the equal sign
clear = (count=1) ->
instead ofclear = (count = 1) ->
- Use spaces around operators
count + 1
instead ofcount+1
- Use spaces after commas (unless separated by newlines)
- Use parentheses if it improves code clarity.
- Avoid spaces inside the curly-braces of hash literals:
{a: 1, b: 2}
instead of{ a: 1, b: 2 }
- Include a single line of whitespace between methods.
- Capitalize initialisms and acronyms in names, except for the first word, which
should be lower-case:
getURI
instead ofgetUri
uriToOpen
instead ofURIToOpen
- Use
slice()
to copy an array - Add an explicit
return
when your function ends with afor
/while
loop and you don't want it to return a collected array. - Use
@
instead of a standalonethis
@method_call()
instead ofthis.method_call()
return @
instead ofreturn this
- Place requires in the following order, then alphabetically:
- Built in Node Modules (such as
path
) - Third-party Modules (such as
PIXI
) - Local Modules (using relative paths)
- Built in Node Modules (such as
- Place class properties in the following order:
- Class methods and properties (methods starting with a
@
) - Instance methods and properties
- Class methods and properties (methods starting with a