Download the PHP package grrr-amsterdam/garp3-scaffold without Composer

On this page you can find all versions of the php package grrr-amsterdam/garp3-scaffold. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package garp3-scaffold

Build Status

Readme for Garp Scaffold

This is a scaffold set to initiate Garp 3 projects.

Getting started

Use Composer to create a Garp3 scaffolded project:

Next update/install all dependencies by running:

Create an Apache vhost pointing to the public folder. This should always be the preferred webroot of any Garp project.

Building assets

You can start a frontend build and watch by running:

or alternatively via:

You should now be able to visit localhost:3000 and get to your site.

Building assets for different environments

You can generate builds for different environments by running either:

or:

CSS

We use Sass for css compilation. However we prefer to stick as closely to vanilla css as possible. Definitely make use of variables, but try to limit your use of mixins and loops. Also never use extend.

We have a bunch more conventions for writing CSS. Please heed these conventions, they lead to more consistent and maintainable code. See the css coding standards for more info.

JavaScript

JavaScript is transpiled from ES6 to ES5 with Babel. We also use Browserify to allow you to import modules.

ES6 writing style is preferred, so please take full advantage of constants, arrow functions, modules, template literals and all that goodness.

That being said, there are some features that can’t be properly transpiled. Make sure you load the appropriate Babel polyfills for those. You can include just the polyfills you need.

Modernizr

We use Modernizr to test browser support for certain features. We can then use progressive enhancement to leverage those features for supported browsers. Usage of Modernizr.feature in JS, or .feature-class .selector in CSS will automatically be detected and Gulp will make sure the appropriate tests are included.

Note: this detection isn’t run when you’re using gulp watch, see gulp watch task below for more details.

Building with Gulp

Gulp is our task runner of choice. It takes care of building CSS, compiling JavaScript, and much more.

Gulp takes most of it’s configuration values—such as where to put build files, or which cdn to use—from app.ini. Gulp will tell you which values it uses when you start a build.

Although you can run all Gulp tasks from the command line, only a subset is actually suited for individual use. These are the tasks you can run:

Building

Builds everything. Defaults to a development build, use --e=[staging/production] for generating a staging or production build.

Watching

Runs a build and watches for file changes in CSS and JavaScript, as well as php/phtml files in the application/modules directory.

BrowserSync

gulp watch Also fires up a BrowserSync instance which proxies the domain set in app.ini. This instance is accessible through both localhost:3000 as well as localhost.example.com:3000.

Browsersync also comes in handy for checking your work on other devices connected to the same local network, such as mobile phones. Fire up a browser and point it to [local ip address]:3000 to access the site on your local machine.

Generating a Modernizr file

Modernizr is run on build, checks your CSS and JS, and includes the appropriate feature tests. The only caveat of this soluation is that Modernizr doesn’t account for inline CSS/JS. You will need to explicitely include these tests in the Gulp Modernizr task.

Also, we don’t re-run Modernizr when watching, so if you add a test while running gulp watch, so will either need to manually run gulp modernizr, or restart that watch task.

Using icons

You can place all svg icons in the public/css/img/icons folder, and they will be transformed into a sprite automatically.

In your views you can render an icon via the SVG helper as such, whereby [icon-name] is taken from the filename of the SVG:

Coloring icons is as easy as using fill: #f00 in css.

Note If your icons are not changing color, it is most likely because there are inline fill attributes on your SVG. Open up the SVG in your text editor and remove all fill attributes to make it colorable through CSS.

Preloading webfonts

Your browser will only load a font once it has downloaded your css and finds an element which uses the font. By using the <link rel="preload"> syntax you can tell the browser to start loading the font immediately, leading to faster render times. See layout.phtml for an example.


All versions of garp3-scaffold with dependencies

PHP Build Version
Package Version
Requires grrr-amsterdam/garp3 Version ^3.9.0
twig/twig Version ^1.24
ano/zf-twig Version master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package grrr-amsterdam/garp3-scaffold contains the following files

Loading the files please wait ....