npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

generator-joomla-spc

v0.0.14

Published

Joomla-spc generator for Yeoman. Creates Joomla 2.5 and 3.0 files

Downloads

96

Readme

SilverPC Logo

Helping you build a better Joomla

Generator-joomla-spc Build Status

Built with Grunt

Based on generator-joomla-component by Sean Goresht

A extension generator for Yeoman.

What It Does (Better)

Using this generator, you can quickly and effortlessly scaffold out a new joomla extension, using recommended MVC design pattern and coding standards. These include:

  • Internationalization language files
  • Tabs for indents
  • CamelCase variable notation
  • Proper MVC architecture
  • PHPDocumentor stubs for every method, as well as page-level doc blocks
  • Uses ' over ", because that's what the official Joomla library uses

So rather than manually creating your own config.xml and other config files, you just need to load up this generator, type in your options, and everything is set up for you. If you want to add a new model, view, or controller, just use the sub-generators!

What this generator does is place the code in a app folder for editing.

Stores user data in config.json in home directory for later usage with generators.

Makes use of gruntjs to do the following:

  • zip files for deployment

Getting Started

What is Yeoman?

Trick question. It's not a thing. It's this guy:

Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.

Not every new computer comes with a Yeoman pre-installed. He lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive. Make sure you clean up, he likes new and shiny things.

$ npm install -g yo

Other requirements

Gruntjs-cli

Yeoman Generators

Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.

Copy from git repository

or

To install generator-joomla-spc from npm, run:

$ npm install -g yo generator-joomla-spc

Finally, initiate the generator:

$ yo joomla-spc

Sub-generators

There are currently 4 subgenerators:

  1. model: yo joomla-spc:model "model-name"
  2. view: yo joomla-spc:view "view-name"
  3. controller: yo joomla-spc:controller "controller-name"
  4. helper: yo joomla-spc:helper "helper-name"

Component template levels

basic

Provides a basic level of scafolding for developing a basic component.

intermediate

Based on Joomla's HelloWorld sample. Provides a intermediate level of scaffolding for developing a intermediate component. Includes an sql file and install script.php file. Demonstrates the use of views of singular and plural types. Illustrates the use of graphics in menus.

advanced

Provides a intermediate level of scaffolding for developing a intermediate component. Includes an sql file and install script.php file. Demonstrates the use of views of singular and plural types. Demonstrates the use of a control panel for more complex projects.

Other generators

Select from list upon startup of yo joomla-spc

component: implemented

  • Component levels of basic, intermediate and advanced

module:Not yet implemented

plugin: implemented

  • Can select a group for the plugin - Content, Extension, authentication etc.

template: Not yet implemented

templateadmin: Not yet implemented

Usage

In this project directory

modify the index.coffee scripts

run

grunt 

this will compile the coffee scripts manually.

Other commands

grunt watch

this will watch changes in coffee script files, then carry out coffeelint, compile coffee scripts and use jshint on js files.

to use temporarily open up a command prompt in this project directory type

npm link

this will allow yo joomla-spc to be run in the working directory

For the working directory

Create a working directory open up a command prompt in the working directory

yo joomla-spc

after running the generator files will be stored in app directory modify files to your project requirements

from the command prompt in the working directory type

grunt 

this will zip (grunt's default task) up files located in app directory and place the zip file in dist directory.

Using the extensions generated

Recommend going here to download and install Bitnami Joomla for your system.

After creating the extension in your working directory run

grunt 

and the default task will zip up the app directory and place the file in the dist directory. This file can then be installed into Joomla using the normal procedure. By installing the extension it will register it and have the ability to be directly edited and debugged within the Joomla installation. The generated extension can be zipped up and installed by default.

References

The components and starting logic are derived form the book Learning Joomla 3 Extension Development Third Edition (you can also find this on other alternative locations on the internet by googling)

Joomla! Programming By Mark Dexter, Louis Landry here

Joomla-platform-examples

sublime text 2/3 joomla snippets

Javascript to Coffeescript

Coffeescript Website

To-do

read the todo.txt file

Help

Information on how to use sub-generators can be found by using:

yo  joomla-spc --help

or read the USAGE file in the app directory.

License

MIT License