提交 de96d913 编写于 作者: L loicsaintroch

Form multi repos to mono repo workflow

上级 0567a4a7
# Contributing
Strapi is an open-source project administered by [the Wistity team](http://wistity.co).
We welcome and encourage everyone who want to help us on Strapi.
Before contributing, ensure that your effort is aligned with the project's roadmap by talking to the maintainers, especially if you are going to spend a lot of time on it. Feel free to [join us on Slack](http://slack.strapi.io) if you are interested in helping us or [drop us an email](mailto:hack@wistity.co) if you are interested in working with us.
## Maintainers
Strapi maintainers include Wistity employees and welcome other active community members:
- Loïc Saint-Roch ([@loicsaintroch](https://github.com/loicsaintroch)) (Wistity)
- Aurélien Georget ([@aurelsicoko](https://github.com/aurelsicoko)) (Wistity)
- Jim Laurie ([@lauriejim](https://github.com/lauriejim)) (Wistity)
- Pierre Burgy ([@pierreburgy](https://github.com/pierreburgy)) (Wistity)
The Wistity team have npm publishing rights for modules and also has the final say on releasing new versions.
## Reporting an issue
Before reporting an issue you need to make sure:
- You are experiencing a concrete technical issue with Strapi (ideas and feature proposals should happen [on Slack](http://slack.strapi.io)).
- You are not asking a question about how to use Strapi or about whether or not Strapi has a certain feature. For general help using Strapi, please refer to [the official Strapi documentation](http://strapi.io). For additional help, ask a question on [StackOverflow](http://stackoverflow.com/questions/tagged/strapi).
- You have already searched for related [issues](https://github.com/wistityhq/strapi/issues), and found none open (if you found a related _closed_ issue, please link to it in your post).
- Your issue title is concise, on-topic and polite.
- You can provide steps to reproduce this issue that others can follow.
- You have tried all the following (if relevant) and your issue remains:
- Make sure you have the right application started.
- Make sure you've killed the Strapi server with CTRL+C and started it again.
- Make sure you closed any open browser tabs pointed at `localhost` before starting Strapi.
- Make sure you do not have any other Strapi applications running in other terminal windows.
- Make sure the application you are using to reproduce the issue has a clean `node_modules` directory, meaning:
* no dependencies are linked (e.g. you haven't run `npm link`)
* that you haven't made any inline changes to files in the `node_modules` folder
* that you don't have any weird global dependency loops. The easiest way to double-check any of the above, if you aren't sure, is to run: `$ rm -rf node_modules && npm cache clear && npm install`.
## Code of Conduct
[The Wistity team](http://wistity.co) is committed to fostering a welcoming community for Strapi. If you encounter any unacceptable behavior, follow these steps to report the issue to the team. We are here to help.
### Our Pledge
In the interest of fostering an open and welcoming environment, we pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
### Our Standards
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
### Our responsibilities
The Wistity team is responsible for clarifying the standards of acceptable behavior and is expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
The Wistity team has the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
### Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by the Wistity team.
### Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the support team at [support@wistity.co](mailto:support@wistity.co). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers and contributors who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
**Node.js version**:
**npm version**:
**Strapi version**:
**Operating system**:
# Contributing
Strapi has an active and growing open-source community.
All work on the open-source framework occurs in the GitHub organization.
## Governance
The Strapi project governance model follows the spirit and tradition of open-source
by embracing consensus, forking, and individual ownership.
### Principles
Strapi is an open, inclusive, and tolerant community of people working together
to build a world-class Node.js framework and tools. We value diversity of individuals and
opinions, and seek to operate on consensus whenever possible.
We strive to maintain a welcoming, inclusive, and harassment-free environment,
regardless of the form of communication. When consensus is not achievable, we defer
to the owners of each individual module; the powers of the individual owner are kept
in check by the ability of the community to fork and replace dependencies on the
individual module and maintainer.
### Maintainers
Each repository has one or more lead maintainers responsible for:
- Daily operations: approving pull requests, responding to new issues,
guiding discussions, and so on.
- Seeking consensus on technical decisions.
- Making the final decisions when consensus cannot be achieved.
Wistity maintainers have npm publishing rights for modules and Wistity has the
final say on releasing new versions.
### Strapi lead maintainers
Strapi lead maintainers include Wistity employees and welcome other active
community members:
- Loïc Saint-Roch ([@loicsaintroch](https://github.com/loicsaintroch)) (Wistity)
- Aurélien Georget ([@aurelsicoko](https://github.com/aurelsicoko)) (Wistity)
- Jim Laurie ([@lauriejim](https://github.com/lauriejim)) (Wistity)
- Pierre Burgy ([@pierreburgy](https://github.com/pierreburgy)) (Wistity)
## Contributing
There are many ways you can contribute to the Strapi project.
All contributions are welcome!
### Submitting a pull request
1. Create a GitHub issue for large changes and discuss the change there before coding.
You can skip this step and submit the pull request for minor changes.
2. Fork the repository on GitHub.
3. Create a branch for you change/feature off of the master branch.
4. Make your change. Remember to update tests as well as code! Always run all the tests
to assure nothing else was accidentally broken. For bugs, adding a failing test and
submitting a pull request usually leads to the bug being fixed quickly.
For features, include tests that cover the entire feature.
5. Check for unnecessary whitespace with `git diff --check` before committing.
6. Make commits of logical units and push them to Github.
7. Use a descriptive commit message, and follow
[50/72 format](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
8. Use GitHub's pull requests to submit the patch. Feel free to issue the pull
request as soon as you have something partial to show and get reviewed.
You can add more commits to your pull request as you are progressing on the implementation.
The title of the pull request should start with "WIP" for "work in progress"
when the pull request is not complete yet.
9. Request a code review. Add a specific committer to speed up this process
(for example, `@loicsaintroch`, `@aurelsicoko`).
10. Make any requested changes and push to your fork. Make sure your changes are still based
on the latest code (use `git rebase upstream/master`).
### Reporting issues
Follow this basic process:
- Search existing issues. It's possible someone has already reported the same problem.
- Make sure you have a GitHub account.
- Create a new issue for the bug. Clearly describe the issue, including steps to reproduce.
Make sure you fill in the earliest version that you know has the issue.
SRC = lib/*.js
REQUIRED = --require should --require should-http
TESTS = test/application/* \
test/context/* \
test/request/* \
test/response/* \
test/middlewares/*
test:
@NODE_ENV=test node \
./node_modules/.bin/_mocha \
$(REQUIRED) \
$(TESTS) \
--bail
test-travis:
@NODE_ENV=test node \
./node_modules/.bin/istanbul cover \
./node_modules/.bin/_mocha \
--report lcovonly \
-- -u exports \
$(REQUIRED) \
$(TESTS) \
--bail
bench:
@$(MAKE) -C benchmarks
.PHONY: test bench
......@@ -6,104 +6,53 @@
[![Build status](https://travis-ci.org/wistityhq/strapi.svg?branch=master)](https://travis-ci.org/wistityhq/strapi)
[![Slack status](http://strapi-slack.herokuapp.com/badge.svg)](http://slack.strapi.io)
[Website](http://strapi.io/) - [Getting Started](#user-content-getting-started-in-a-minute) - [Documentation](http://strapi.io/documentation/introduction) - [Support](http://strapi.io/support)
[Strapi](http://strapi.io/) is an open-source [Node.js](https://nodejs.org/) rich framework for building applications and services.
Strapi is an open-source Node.js rich framework for building applications and services.
[Strapi](http://strapi.io/) enables developers to focus on writing reusable application logic instead of spending time building infrastructure. It is designed for building practical, production-ready Node.js applications in a matter of hours instead of weeks.
Strapi enables developers to focus on writing reusable application logic instead of spending time
building infrastructure. It is designed for building practical, production-ready Node.js applications
in a matter of hours instead of weeks.
## Features
The framework sits on top of [Koa](http://koajs.com/). Its ensemble of small modules work
together to provide simplicity, maintainability, and structural conventions to Node.js applications.
- **100% JavaScript**, the language you probably already are using for the front-end.
- **Rock-solid foundation** offering plenty of possibilities for web apps and APIs.
- **Useful CLI** that let you scaffold projects, APIs and migrations on the fly.
- **Front-end agnostic** and can be used with Angular, Backbone, React, Ember, Vue, iOS, Android, etc.
- **Easy authentication** with 150+ supported providers to easily manage your authentication processes.
- **Security layers** that just work and ships reusable security policies.
- **GraphQL implementation** for describing data requirements and interactions.
- **JSON API specification** to increase productivity by following shared conventions.
- **Smooth WebSockets** to handle realtime connections and events.
- **Flexible SQL dialect** full schema builder for migrations, query builder, transactions, and a lot more.
- **Elegant SQL ORM** featuring relations, lifecycle events, etc.
- **NoSQL support** if you need to plug specific data layers.
## Getting started in a minute
Convinced? [Get started!](http://strapi.io/start/)
### Installation
## Community support
Install the latest stable release with the npm command-line tool:
For general help using Strapi, please refer to [the official Strapi documentation](http://strapi.io/docs/). For additional help, ask a question on [StackOverflow](http://stackoverflow.com/questions/tagged/strapi).
```bash
$ npm install strapi -g
```
The community discussions take place [on Slack](http://slack.strapi.io).
### Link to the Strapi Studio
When opening [new issues](https://github.com/wistityhq/strapi/issues/new) or commenting on [existing issues](https://github.com/wistityhq/strapi/issues) on [GitHub](https://github.com/wistityhq/strapi), please make sure discussions are related to concrete technical issues of the Strapi framework.
> We advise you to use our Studio to build APIs. To do so, you need to create a Strapi account.
[Go to the Strapi Studio to signup](http://studio.strapi.io).
Studio is dedicated to developers to build applications without writing
any single line of code thanks to its powerful set of tools.
Also, you can follow and ping the Strapi team on [Twitter](https://twitter.com/strapijs) and [Facebook](https://www.facebook.com/Strapi-616063331867161).
After creating an account on the Strapi Studio, you are able to link your machine to your
Strapi Studio account to get access to all features offered by the Strapi ecosystem.
Use your Strapi account credentials.
## Badge board
```bash
$ strapi login
```
### Create your first project
You now are able to use the Strapi CLI. Simply create your first application and start the server:
```bash
$ strapi new <appName>
```
### Start your application
```bash
$ cd <appName>
$ strapi start
```
The default home page is accessible at [http://localhost:1337/](http://localhost:1337/).
### Create your first API
The Strapi ecosystem offers you two possibilities to create a complete RESTful API.
#### Via the CLI
```bash
$ strapi generate api <apiName>
```
For example, you can create a `car` API with a name (`name`), year (`year`) and
the license plate (`license`) with:
```bash
$ strapi generate api car name:string year:integer license:string
```
#### Via the Strapi Studio
The Strapi Studio allows you to easily build and manage your application environment
thanks to a powerful User Interface.
Log into the Strapi Studio with your user account ([http://studio.strapi.io](http://studio.strapi.io))
and follow the instructions to start the experience.
![Strapi Studio](http://strapi.io/assets/screenshots/studio.png "Strapi Studio")
*Simply manage your APIs and relations thanks to the Strapi Studio.*
## Manage your data
Strapi comes with a simple but yet powerful dashboard.
![Strapi Dashboard](http://strapi.io/assets/screenshots/create.png "Strapi Dashboard")
*Create, read, update and delete your data.*
![Strapi Dashboard](http://strapi.io/assets/screenshots/permissions.png "Strapi Dashboard")
*Manage user settings, login, registration, groups and permissions on the fly.*
## Resources
- [Roadmap](ROADMAP.md)
- [Contributing guide](CONTRIBUTING.md)
- [MIT License](LICENSE.md)
| Package | Version | Dependencies | Build |
|---------|---------|--------------|-------|
| [strapi](https://github.com/wistityhq/strapi/tree/master/packages/strapi) | [![npm version](https://img.shields.io/npm/v/strapi.svg)](https://www.npmjs.org/package/strapi) | [![npm dependencies](https://david-dm.org/wistityhq/strapi.svg)](https://david-dm.org/wistityhq/strapi) | [![Build status](https://travis-ci.org/wistityhq/strapi.svg?branch=master)](https://travis-ci.org/wistityhq/strapi) |
| [strapi-bookshelf](https://github.com/wistityhq/strapi/tree/master/packages/strapi-bookshelf) | [![npm version](https://img.shields.io/npm/v/strapi-bookshelf.svg)](https://www.npmjs.org/package/strapi-bookshelf) | [![npm dependencies](https://david-dm.org/wistityhq/strapi-bookshelf.svg)](https://david-dm.org/wistityhq/strapi-bookshelf) | [![Build status](https://travis-ci.org/wistityhq/strapi-bookshelf.svg?branch=master)](https://travis-ci.org/wistityhq/strapi-bookshelf) |
| [strapi-cli](https://github.com/wistityhq/strapi/tree/master/packages/strapi-cli) | [![npm version](https://img.shields.io/npm/v/strapi-cli.svg)](https://www.npmjs.org/package/strapi-cli) | [![npm dependencies](https://david-dm.org/wistityhq/strapi-cli.svg)](https://david-dm.org/wistityhq/strapi-cli) | [![Build status](https://travis-ci.org/wistityhq/strapi-cli.svg?branch=master)](https://travis-ci.org/wistityhq/strapi-cli) |
| [strapi-generate](https://github.com/wistityhq/strapi/tree/master/packages/strapi-generate) | [![npm version](https://img.shields.io/npm/v/strapi-generate.svg)](https://www.npmjs.org/package/strapi-generate) | [![npm dependencies](https://david-dm.org/wistityhq/strapi-generate.svg)](https://david-dm.org/wistityhq/strapi-generate) | [![Build status](https://travis-ci.org/wistityhq/strapi-generate.svg?branch=master)](https://travis-ci.org/wistityhq/strapi-generate) |
| [strapi-generate-api](https://github.com/wistityhq/strapi/tree/master/packages/strapi-generate-api) | [![npm version](https://img.shields.io/npm/v/strapi-generate-api.svg)](https://www.npmjs.org/package/strapi-generate-api) | [![npm dependencies](https://david-dm.org/wistityhq/strapi-generate-api.svg)](https://david-dm.org/wistityhq/strapi-generate-api) | [![Build status](https://travis-ci.org/wistityhq/strapi-generate-api.svg?branch=master)](https://travis-ci.org/wistityhq/strapi-generate-api) |
| [strapi-generate-migrations](https://github.com/wistityhq/strapi/tree/master/packages/strapi-generate-migrations) | [![npm version](https://img.shields.io/npm/v/strapi-generate-migrations.svg)](https://www.npmjs.org/package/strapi-generate-migrations) | [![npm dependencies](https://david-dm.org/wistityhq/strapi-generate-migrations.svg)](https://david-dm.org/wistityhq/strapi-generate-migrations) | [![Build status](https://travis-ci.org/wistityhq/strapi-generate-migrations.svg?branch=master)](https://travis-ci.org/wistityhq/strapi-generate-migrations) |
| [strapi-generate-new](https://github.com/wistityhq/strapi/tree/master/packages/strapi-generate-new) | [![npm version](https://img.shields.io/npm/v/strapi-generate-new.svg)](https://www.npmjs.org/package/strapi-generate-new) | [![npm dependencies](https://david-dm.org/wistityhq/strapi-generate-new.svg)](https://david-dm.org/wistityhq/strapi-generate-new) | [![Build status](https://travis-ci.org/wistityhq/strapi-generate-new.svg?branch=master)](https://travis-ci.org/wistityhq/strapi-generate-new) |
| [strapi-knex](https://github.com/wistityhq/strapi/tree/master/packages/strapi-knex) | [![npm version](https://img.shields.io/npm/v/strapi-knex.svg)](https://www.npmjs.org/package/strapi-knex) | [![npm dependencies](https://david-dm.org/wistityhq/strapi-knex.svg)](https://david-dm.org/wistityhq/strapi-knex) | [![Build status](https://travis-ci.org/wistityhq/strapi-knex.svg?branch=master)](https://travis-ci.org/wistityhq/strapi-knex) |
| [strapi-utils](https://github.com/wistityhq/strapi/tree/master/packages/strapi-utils) | [![npm version](https://img.shields.io/npm/v/strapi-utils.svg)](https://www.npmjs.org/package/strapi-utils) | [![npm dependencies](https://david-dm.org/wistityhq/strapi-utils.svg)](https://david-dm.org/wistityhq/strapi-utils) | [![Build status](https://travis-ci.org/wistityhq/strapi-utils.svg?branch=master)](https://travis-ci.org/wistityhq/strapi-utils) |
## Links
- [Strapi website](http://strapi.io/)
- [Strapi community on Slack](http://slack.strapi.io)
- [Strapi news on Twitter](https://twitter.com/strapijs)
# Roadmap
**v2.0.0**:
- Change ORM: from `waterline` to `sequelize`.
- Content-negotiation on the request and respond either a JSON or a view.
- Add JSON API support.
- Let the developers use custom global variables.
- Migration from `koa@1.x.x` to `koa@2.x.x`.
- Improve the UI of the admin panel.
# The Strapi monorepo
Juggling a multimodule project over multiple repos is pretty difficult for contributing.
Strapi follows a monorepo approach, all officially maintained modules are in the same repository-- this one.
Pros:
- Single lint, build, test and release process.
- Easy to coordinate changes across modules.
- Single place to report issues and track milestones.
- Easier to setup a development environment.
Cons:
- Codebase looks more intimidating.
- Repo is bigger in size.
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[{package.json,*.yml}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
############################
# OS X
############################
.DS_Store
.AppleDouble
.LSOverride
Icon
.Spotlight-V100
.Trashes
._*
############################
# Linux
############################
*~
############################
# Windows
############################
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp
############################
# Packages
############################
*.7z
*.csv
*.dat
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.com
*.class
*.dll
*.exe
*.o
*.seed
*.so
*.swo
*.swp
*.swn
*.swm
*.out
*.pid
############################
# Logs and databases
############################
.tmp
*.log
*.sql
*.sqlite
############################
# Misc.
############################
*#
.idea
nbproject
############################
# Node.js
############################
lib-cov
lcov.info
pids
logs
results
build
node_modules
.node_history
############################
# OS X
############################
.DS_Store
.AppleDouble
.LSOverride
Icon
.Spotlight-V100
.Trashes
._*
############################
# Linux
############################
*~
############################
# Windows
############################
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi