jakecastelli / trongate-vscode

A vscode extension to complement the Trongate Framework which can help you build a scaffold module & view file at lightening speed.

Home Page:https://marketplace.visualstudio.com/items?itemName=jc-sf.trongate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trongate-logo

Scaffold & Code Snippets

This is a Visual Studio Code extension to compliment the Trongate ecosystem. Consisting of the Trongate framework and the Desktop-app. All tirelessly written by David Connelly, who I'd like to make special mention here for his continued dedication and commitment in keeping the web development doors open to everyone.

Features

New Trongate Module

A module is an essential building block of the Trongate Framework's HMVC architecture. However, creating a module from scratch is tedious and requires you to constantly concentrate on creating and naming your folders and files correctly. Then typing boilerplate code which becomes repetitive and open to errors. This is where this feature will help speed up the process with precision accuracy to create the module for you.


  • Quick Start
    • Ensure you have opened a Trongate project in your workspace
      • Right click on the modules folder for creating a general module or
      • Alternativly create a sub-module by right clicking on the parent module folder
      • Then select 'New Trongate Module' and give it a module name
    • If you want a view template
      • Then you will need to give it a name for your view file.
        • An example would be 'display'

  • Create a scaffold module on the fly
    • The extension can figure out what you are creating if it is a general module or a sub module, and give you the corresponding code.
    • With a starter class (default option), complete with api.json in the assets folder ready for you to create whatever is on your mind - enjoy!
    • With a view template, it allows you to name your view file and gives you a starter function index to guide you on the road.
    • now with v1.0.1+ you can create a view, complete with module specific linked CSS and JavaScript files
  • Prevent module naming errors
    • The extension will dynamically read your config.php and extract the MODULE_ASSETS_TRIGGER, if you accidentally name your module the same as the MODULE_ASSETS_TRIGGER, the process will terminate and you would be notified. This is a handy feature to avoid a blank screen.

vsc-101-view


Add PHP and custom Trongate code snippets to speed up your development.


Table of helpful Trongate snippets:

Snippet Name Prefix
Trongate For Loop In View File tg:for
Trongate if condition in View File tg:if
Trongate if else in View File tg:ifelse
Trongate Submit Function Scaffold tg:submit
Create new class the extends Trongate tgc
Create new method with or without args tgm, tgm1, tgm2, tgm3
Add an acnchor with url tga
Insert a Template tgt
Add [$data] = '' tgde
Add [$data] = $this-> tgdl
Quick php insert variable tgev
Quick php insert environment variable tge

snippets2


NITRO

A desktop app created by David Connelly originally for Speed Coding Academy members using Sublime Text 3 only but now available to VS Code users.

New to this release:

  • Click on the CSS framework name in the bottom status bar to quickly change frameworks
  • The Trongate CSS has been added and is now the default framework

Features

  • Insert popular frontend CSS frameworks and their elements into your view and template files

Use ctrl+win+alt+/ to bring up the dropdown selector to select your frontend framework


Table of Nitro inserts > Showing the Trongate CSS prefixes below:

Command Shortcut Prefix
Buttons ctrl+win+alt+b tg:t:button
BUttons Alternative ctrl+win+alt+u tg:t:button-alt
Contact Form ctrl+win+alt+c tg:t:contact
Download URL ctrl+win+alt+d tg:t:url
Form ctrl+win+alt+f tg:t:form
Grid ctrl+win+alt+g tg:t:grid
Info Page ctrl+win+alt+i tg:t:info
Login Form ctrl+win+alt+l tg:t:login
Modal ctrl+win+alt+m tg:t:modal
Password Form ctrl+win+alt+p tg:t:password-form
Table ctrl+win+alt+t tg:t:table
TAble Alternative ctrl+win+alt+a tg:t:table-alt
TEmplate ctrl+win+alt+e tg:t:template


PLEASE NOTE: The win key is the same as super in Linux and cmd on Mac

css

Requirements

You will need the Trongate Framework of course! ❤️

Why you should use Trongate Framework?

  • Imagine a PHP framework that allowed you to build large scale enterprise applications in minutes instead of months.
  • Imagine a framework that did NOT get rewritten constantly.
  • Imagine a framework that you could learn once and use for a lifetime.
  • Imagine a framework that was V1 forever!

You've just imagined Trongate

intro

Please report any issues or suggestions on our repo

About

A vscode extension to complement the Trongate Framework which can help you build a scaffold module & view file at lightening speed.

https://marketplace.visualstudio.com/items?itemName=jc-sf.trongate

License:MIT License


Languages

Language:TypeScript 94.2%Language:JavaScript 5.8%