1.1.0 • Published 8 years ago

joomla-watcher v1.1.0

Weekly downloads
6
License
ISC
Repository
github
Last release
8 years ago

Joomla-watcher

This module automates copy-pasting extension files from extension development directory to your local Joomla! setup. Currently this only supports components and modules. It takes care of source and destination paths so that you can set it up in minuts and focus on task at hand.

How to set this up

npm install joomla-watcher

Now create a directory. This directory will contain your modules and components. It's contents should look like

All your components go in components directory and modules go in modules directory. Joomla! components have a site part and a admin part. Joomla-watcher expects you to keep all your site files in site folder and admin files in admin folder. I plan to change this in future to add some flexibility but for now every component needs to have site and admin folder separation

your extensions.json should look something like this

{
  "joomlaDir": "/var/www/Joomla",
  "components": ["component1","component2"],
  "modules": [{"name":"mod_module1","type":"site"},{"name":"mod_module2","type":"admin"}]
}

JoomlaDir variable holds absolute path to your local joomla setup. components and modules contain information about what modules and components you want to watch. Component name should be your components xml name without .xml eg. for component1.xml it's name should be component1

Now joomla-watcher will automatically contain all the watch tasks. so your gulpfile.js will contain

var gulp=require('gulp');
var defaults=require('joomla-watcher')(gulp);

gulp.task('default',defaults);

defaults is array containing all the tasks created by joomla watcher. You can add your own tasks to this array by simply pushing it into defaults array.

Packages and release zips

You can run

$ gulp release:packages

and releases for your extensions will be created in releases folder. If you want to create a package zip then just put a valid Joomla package xml in root of your development directory

That's it. Just run gulp and of you go!

Will need to add following features for supporting development of complex extensions

  • watch templates
  • watch plugins
  • validate xml and create related warnings