2017 © Pedro Peláez
 

project cmsms

image

torfs-ict/cmsms

  • Thursday, August 2, 2018
  • by kristoftorfs
  • Repository
  • 2 Watchers
  • 1 Stars
  • 37 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 3 % Grown

The README.md

CMS Made Simple

This packages enables you to use Composer and Bower packages for the development and deployment of CMS Made Simple websites and modules., (*1)

It also provides a Vagrant box for easy setup of a development environment., (*2)

Setting up a development environment

  • Create a composer project: composer create-project torfs-ict/cmsms <path>.
  • Run vagrant up in the created project.
  • Browse to http://192.168.33.99/install and follow the CMSMS installation procedure.
  • Include the Composer autoloader in the CMSMS config.php file:
require_once(__DIR__ . '/vendor/autoload.php');

Trivia

  • The MySQL root password, username, user password and database name are all cmsms.
  • PHPMyAdmin gets installed in the Vagrant box and is accessible at http://192.168.33.99/phpmyadmin.
  • Running Composer in the development environment must ALWAYS be done in the Vagrant box.

Developing modules

All modules (in development) should be put in the modules directory of the development environment and have a valid composer.json file as you can see below in the example taken from the Google Maps module., (*3)

{
    "name": "torfs-ict/cmsms-google-maps",
    "description": "Google Maps module for CMS Made Simple",
    "version": "1.0.0",
    "license": "MIT",
    "authors": [
        {
            "name": "Kristof Torfs",
            "email": "kristof@torfs.org"
        }
    ],
    "require": {
        "torfs-ict/cmsms": "^2.1"
    },
    "extra": {
        "cmsms": {
            "module": true,
            "name": "GoogleMaps",
            "bower": {
                "gmaps": "~0.4.22",
                "hint.css": "^2.3.2"
            }
        }
    }
}

Composer.json requirements

  1. The version must be set.
  2. At least one author must be set.
  3. The extra/cmsms section must be defined.
    • The module field must be set to TRUE, so our dev environment knows it should treat it as a module when installing.
    • The name field must be set to the actual module name.
    • The bower field contains the Bower package requirements (optional). These will automatically be installed when installing/updating the composer package of your module.

Generating a new module

  1. Create the module directory and change to that directory.
  2. Run php ../../src/Module.php

Install module in the development environment

  1. Make sure your module directory is a Git repository.
  2. Add the VCS to the repositories in the development environment composer.json e.g. json "repositories": [{ "type": "path", "url": "modules/GoogleMaps" }]
  3. Add the module as a requirement in composer.json e.g. json "requires": { "torfs-ict/cmsms-google-maps": "*" }
  4. Run composer update in the root of the development environment.

Note: if you generated the module with our script, you can skip steps 1 & 2., (*4)

Deploying a completed project

  1. Use the Composer create-project command as when setting up the development environment.
  2. Make sure the webroot of your virtual host points to the cms directory.
  3. Navigate your browser to the install directory and complete the CMS Made Simple installation.
  4. Include the Composer autoloader in the CMSMS config.php file: require_once(__DIR__ . '/vendor/autoload.php');
  5. Remove the install directory.
  6. Run composer require for each module you need.

The Versions

02/08 2018

dev-idea/windows

dev-idea/windows

  Sources   Download

02/08 2018

dev-idea/linux

dev-idea/linux

  Sources   Download

10/01 2017
10/01 2017
18/11 2016

2.1.5.3

2.1.5.3 http://www.cmsmadesimple.org

CMS Made Simple

  Sources   Download

MIT

The Development Requires

by Kristof Torfs

composer development cms dev bower box vagrant cmsms cms made simple

14/11 2016

2.1.5.2

2.1.5.2 http://www.cmsmadesimple.org

CMS Made Simple

  Sources   Download

MIT

The Development Requires

by Kristof Torfs

composer development cms dev bower box vagrant cmsms cms made simple

11/11 2016

2.1.5.1

2.1.5.1 http://www.cmsmadesimple.org

CMS Made Simple

  Sources   Download

MIT

The Development Requires

by Kristof Torfs

composer development cms dev bower box vagrant cmsms cms made simple

31/08 2016

2.1.5

2.1.5.0 http://www.cmsmadesimple.org

CMS Made Simple

  Sources   Download

MIT

The Development Requires

by Kristof Torfs

composer development cms dev bower box vagrant cmsms cms made simple