Skip to content

A project for replacing the Node.js based build tools of Sage to PHP based ones

License

Notifications You must be signed in to change notification settings

gabor-udvari/phlomis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phlomis

Phlomis is a project for replacing the Node.js based build tools of Sage to a PHP based one with Composer, Composer Asset Plugin and Robo.

The name comes from the genus of plants called Phlomis. One of the members of the genus is Phlomis russeliana which has the common name Turkish sage. That and the "Ph" at the beginning makes it a perfect name for a PHP oriented fork of Sage.

Table of contents

Requirements

Prerequisite How to check How to install
PHP >= 5.6.x php -v php.net
Composer >= 1.0 composer.phar --version getcomposer.org
rsync >= 3.1.0 rsync --version rsync.samba.org

Installation

  • Clone the repository
  • Step inside the local folder
  • Install the dependencies with Composer, then run update right after it

Note: the update after the first installation is required because fxp/composer-asset-plugin is required for installing the actual Bower packages. The first installation will install fxp/composer-asset-plugin, then the second time it can install all the Bower packages.

git clone [email protected]:gabor-udvari/phlomis.git
cd phlomis
composer.phar install
composer.phar update

Usage

You can use all the original Gulp commands just like you used with Sage, except these are now Robo commands:

  • vendor/bin/robo build
  • vendor/bin/robo watch

Keeping up to date with Sage

Just edit your composer.json, increase the version number for Sage or put dev-master there and update with Composer:

sed -i '/bower-asset\/sage/ s/8\.4\.2/dev-master/' composer.json
composer.phar update

There are no issues with 8.2, 8.3, 8.4 releases, but 8.5 still refers to Bootstrap 4 beta. To resolve this, you can force the stable Bootstrap 4 version with fxp/composer-asset-plugin like this:

"config": {
	"fxp-asset": {
		"resolutions": {
			"bower-asset/bootstrap": "^4.0.0"
		}
	}
}

Comparison with Sage

Build process comparison

Sage Phlomis
bower: download packages natively:
  • modernizr
  • bootstrap-sass-official
And put them into bower_components
composer: download packages with composer-​asset-plugin:
  • modernizr
  • bootstrap-sass-official
And put them into vendor/bower-assets
gulp: download modules natively Robo: modules are either built-in to Robo or shipped with Phlomis
gulp: insert dependency paths with wiredep Robo: no task for depency insertion at this time
gulp: copy fonts with gulp-flatten Robo: FlattenDir task is built-in
gulp: compile Scss with gulp-sass Robo: compile Scss with leafo/scssphp
gulp: minifying JS with UglifyJS Robo: minifying JS with JSQueeze
gulp: minifying images with gulp-imagemin Robo: ImageMinify task is built in
gulp: watching files is built-in Robo: watching files is built-in
gulp: updating browsers with Browserify Robo: updating browsers not implemented yet, possible candidate: TomBZombie/NoF5

Tracking work required in upstream projects

  • Scss task in Robo: done
  • Overriding main files in composer-asset-plugin: done
  • FlattenDir task in Robo: done
  • ImageMinify task in Robo: done

About

A project for replacing the Node.js based build tools of Sage to PHP based ones

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published