generator-silverstripe-module

Scaffolds SilverStripe modules - so you don't have to.

Usage no npm install needed!

<script type="module">
  import generatorSilverstripeModule from 'https://cdn.skypack.dev/generator-silverstripe-module';
</script>

README

SilverStripe Module Generator

Version License

Scaffolds SilverStripe modules - so you don't have to.

Installation

  1. If you don't have Yeoman installed already run npm install -g yo
  2. Install the SilverStripe Yeoman Generator by running npm install -g generator-silverstripe-module

Usage

Run the generator with yo silverstripe-module which will scaffold a SilverStripe module in your current working directory.

The result will be:

_config/
  |-- config.yml
code/
css/
docs/
  |-- en/
      |-- userguide/
          |-- index.md
      |-- index.md
images/
javascript/
  |-- dist/
  |-- lang/
      |-- en.js
      |-- src/
          |-- en.js
  |-- src/
      |-- example-component.js
      |-- main.js
scss/
  |-- main.scss
templates/
tests/
  |-- javascript/
      |-- example-test.js
  |-- php/
      |-- ExampleTest.php
      |-- ExampleTest.yml
.editorconfig
.gitattributes
.gitignore
_config.php
CHANGELOG.md
composer.json
CONTRIBUTING.md
gulpfile.js
LICENSE.md
package.json
phpunit.xml
README.md

Building JavaScript and SCSS

Build the JavaScript and SCSS with npm run build. This will watch for changes to files in javascript/src/ and scss

JavaScript unit tests

Run them with npm run test

Code of Conduct

https://docs.silverstripe.org/en/3.1/contributing/code_of_conduct/