-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from creative-commoners/pulls/5/cms5-compat
NEW CMS 5 compatability
- Loading branch information
Showing
43 changed files
with
240 additions
and
274 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/tests export-ignore | ||
/client/src export-ignore | ||
/.gitattributes export-ignore | ||
/.travis.yml export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/.gitignore export-ignore | ||
/.github export-ignore |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# CI | ||
|
||
The `ci.yml` file uses [`silverstripe/gha-ci`](https://github.com/silverstripe/gha-ci/) which does its best to identify which types of tests need to be run for your project, against which version of `silverstripe/installer`, with which PHP versions. | ||
|
||
If you find it isn't quite getting it right, there are configuration options available for you to define exactly what jobs you want to be run. See the readme of the gha-ci repository for more information. | ||
|
||
It is recommended that you make this run on a cron, referred to in GitHub Actions as a "schedule". See [the GitHub Actions documentation](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) for details. | ||
|
||
Make sure to remove this readme in your actual module! |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
ci: | ||
name: CI | ||
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
node_modules | ||
node_modules/ | ||
/vendor/ | ||
.DS_Store | ||
|
||
composer.lock | ||
*.js.map | ||
*.css.map | ||
yarn-error.log |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
10 | ||
18 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# Contributing | ||
|
||
- Maintenance on this module is a shared effort of those who use it | ||
- To contribute improvements to the code, ensure you raise a pull request and discuss with the module maintainers | ||
- Please follow the SilverStripe [code contribution guidelines](https://docs.silverstripe.org/en/contributing/code/) and [Module Standard](https://docs.silverstripe.org/en/developer_guides/extending/modules/#module-standard) | ||
- Please follow the Silverstripe CMS [code contribution guidelines](https://docs.silverstripe.org/en/contributing/code/) and [Module Standard](https://docs.silverstripe.org/en/developer_guides/extending/modules/#module-standard) | ||
- Supply documentation that follows the [GitHub Flavored Markdown](https://help.github.com/articles/markdown-basics/) conventions | ||
- When having discussions about this module in issues or pull request please adhere to the [SilverStripe Community Code of Conduct](https://docs.silverstripe.org/en/contributing/code_of_conduct/) | ||
|
||
- When having discussions about this module in issues or pull request please adhere to the [Silverstripe CMS Community Code of Conduct](https://docs.silverstripe.org/en/project_governance/code_of_conduct/) | ||
|
||
## Contributor license agreement | ||
By supplying code to this module in patches, tickets and pull requests, you agree to assign copyright | ||
of that code to MODULE_COPYRIGHT_HOLDER_HERE., on the condition that these code changes are released under the | ||
same BSD license as the original module. We ask for this so that the ownership in the license is clear | ||
and unambiguous. By releasing this code under a permissive license such as BSD, this copyright assignment | ||
|
||
By supplying code to this module in patches, tickets and pull requests, you agree to assign copyright | ||
of that code to MODULE_COPYRIGHT_HOLDER_HERE., on the condition that these code changes are released under the | ||
same BSD license as the original module. We ask for this so that the ownership in the license is clear | ||
and unambiguous. By releasing this code under a permissive license such as BSD, this copyright assignment | ||
won't prevent you from using the code in any way you see fit. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,109 +1,88 @@ | ||
# SilverStripe supported module skeleton | ||
# Silverstripe CMS supported module skeleton | ||
|
||
A useful skeleton to more easily create a [Silverstripe Module](https://docs.silverstripe.org/en/4/developer_guides/extending/modules/) that conform to the | ||
A useful skeleton to more easily create a [Silverstripe CMS Module](https://docs.silverstripe.org/en/developer_guides/extending/modules/) that conform to the | ||
[Module Standard](https://docs.silverstripe.org/en/developer_guides/extending/modules/#module-standard). | ||
|
||
This readme contains descriptions of the parts of this module base you should customise to meet you own module needs. | ||
This README contains descriptions of the parts of this module base you should customise to meet you own module needs. | ||
For example, the module name in the H1 above should be you own module name, and the description text you are reading now | ||
is where you should provide a good short explanation of what your module does. | ||
|
||
Where possible we have included default text that can be included as is into your module and indicated in | ||
Where possible we have included default text that can be included as is into your module and indicated in | ||
other places where you need to customise it | ||
|
||
Below is a template of the sections of your readme.md you should ideally include to met the Module Standard | ||
Below is a template of the sections of your `README.md` you should ideally include to met the Module Standard | ||
and help others make use of your modules. | ||
|
||
### Steps to prepare this module for your own use: | ||
## Steps to prepare this module for your own use | ||
|
||
Ensure you read the | ||
['publishing a module'](https://docs.silverstripe.org/en/developer_guides/extending/how_tos/publish_a_module/) guide | ||
and update your module's `composer.json` to designate your code as a Silversripe CMS module. | ||
|
||
- Clone this repository into a folder | ||
- Add your name/organisation to `LICENSE.md` | ||
- Update this readme with information about your module. Ensure sections that aren't relevant are deleted and | ||
- Update this README with information about your module. Ensure sections that aren't relevant are deleted and | ||
placeholders are edited where relevant | ||
- Review the README files in the various provided directories. You should replace these with `.gitkeep` or delete the | ||
directories | ||
- Review the README files in the various provided directories. You should ultimately delete these README files when you have added your code | ||
- Update the module's `composer.json` with your requirements and package name | ||
- Update (or remove) `package.json` with your requirements and package name. Run `yarn` (or remove `yarn.lock`) to | ||
- Update (or remove) `package.json` with your requirements and package name. Run `yarn install` (or remove `yarn.lock`) to | ||
ensure dependencies resolve correctly | ||
- Clear the git history by running `rm -rf .git && git init` | ||
- Add and push to a VCS repository | ||
- Either [publish](https://getcomposer.org/doc/02-libraries.md#publishing-to-packagist) the module on packagist.org, or add a [custom repository](https://getcomposer.org/doc/02-libraries.md#publishing-to-a-vcs) to your main `composer.json` | ||
- Require the module in your main `composer.json` | ||
- If you need to build a JS client | ||
- Ensure that `vendor/silverstripe/admin` is installed with `composer install --prefer-source` instead of the default `--prefer-dist`. You may need to first remove the module from the vendor folder. | ||
- Install third party dependencies in your module AND in `vendor/silverstripe/admin` by running `yarn install` in both locations | ||
- If you need to build your css or js and are using components, injector, scss variables, etc from `silverstripe/admin`: | ||
- Ensure that `silverstripe/admin` is installed with `composer install --prefer-source` instead of the default `--prefer-dist` (you can use `composer reinstall silverstripe/admin --prefer-source` if you already installed it) | ||
- If you are relying on additional dependencies from `silverstripe/admin` instead of adding them as dependencies in your `package.json` file, you need to install third party dependencies in `silverstripe/admin` by running `yarn install` in the `vendor/silverstripe/admin/` directory. | ||
- Start developing your module! | ||
|
||
## Requirements | ||
## License | ||
|
||
See [License](LICENSE.md) | ||
|
||
This module template defaults to using the "BSD-3-Clause" license. The BSD-3 license is one of the most | ||
permissive open-source license and is used by most Silverstripe CMS module. | ||
|
||
* SilverStripe ^4.0 | ||
* [Yarn](https://yarnpkg.com/lang/en/), [NodeJS](https://nodejs.org/en/) (6.x) and [npm](https://npmjs.com) (for building | ||
frontend assets) | ||
* Other module | ||
* Other server requirement | ||
* Etc | ||
To publish your module under a different license: | ||
|
||
- update the [`license.md`](LICENSE.md) file | ||
- update the `license' key in your [`composer.json`](composer.json). | ||
|
||
You can use [choosealicense.com](https://choosealicense.com) to help you pick a suitable license for your project. | ||
|
||
You do not need to keep this section in your README file - the `LICENSE.md` file is sufficient. | ||
|
||
## Installation | ||
Add some installation instructions here, having a 1 line composer copy and paste is useful. | ||
Here is a composer command to create a new module project. Ensure you read the | ||
['publishing a module'](https://docs.silverstripe.org/en/developer_guides/extending/how_tos/publish_a_module/) guide | ||
and update your module's composer.json to designate your code as a SilverStripe module. | ||
|
||
``` | ||
composer require silverstripe-module/skeleton 4.x-dev | ||
Replace `silverstripe-module/skeleton` in the command below with the composer name of your module. | ||
|
||
```sh | ||
composer require silverstripe-module/skeleton | ||
``` | ||
|
||
**Note:** When you have completed your module, submit it to Packagist or add it as a VCS repository to your | ||
project's composer.json, pointing to the private repository URL. | ||
|
||
## License | ||
See [License](license.md) | ||
|
||
We have included a 3-clause BSD license you can use as a default. We advocate for the BSD license as | ||
it is one of the most permissive and open licenses. | ||
|
||
Feel free to alter the [license.md](license.md) to suit if you wan to use an alternative license. | ||
You can use [choosealicense.com](http://choosealicense.com) to help pick a suitable license for your project. | ||
|
||
## Documentation | ||
* [Documentation readme](docs/en/readme.md) | ||
|
||
Add links into your docs/<language> folder here unless your module only requires minimal documentation | ||
- [Documentation readme](docs/en/README.md) | ||
|
||
Add links into your `docs/<language>` folder here unless your module only requires minimal documentation | ||
in that case, add here and remove the docs folder. You might use this as a quick table of content if you | ||
mhave multiple documentation pages. | ||
|
||
## Example configuration (optional) | ||
If your module makes use of the config API in SilverStripe it's a good idea to provide an example config | ||
here that will get the module working out of the box and expose the user to the possible configuration options. | ||
## Example configuration | ||
|
||
Provide a yaml code example where possible. | ||
If your module makes use of the config API in Silverstripe CMS it's a good idea to provide an example config | ||
here that will get the module working out of the box and expose the user to the possible configuration options. | ||
Though note that in many cases simply linking to the documentation is enough. | ||
|
||
```yaml | ||
Provide a syntax-highlighted code examples where possible. | ||
|
||
```yaml | ||
Page: | ||
config_option: true | ||
another_config: | ||
- item1 | ||
- item2 | ||
|
||
``` | ||
|
||
## Maintainers | ||
* Person here <person@emailaddress.com> | ||
* Another maintainer <maintain@emailaddress.com> | ||
|
||
## Bugtracker | ||
Bugs are tracked in the issues section of this repository. Before submitting an issue please read over | ||
existing issues to ensure yours is unique. | ||
|
||
If the issue does look like a new bug: | ||
|
||
- Create a new issue | ||
- Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots | ||
and screencasts can help here. | ||
- Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, | ||
Operating System, any installed SilverStripe modules. | ||
|
||
Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker. | ||
|
||
## Development and contribution | ||
If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# see https://docs.silverstripe.org/en/developer_guides/configuration/configuration/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.