Download the PHP package webspec-design/wordpress-elixir without Composer

On this page you can find all versions of the php package webspec-design/wordpress-elixir. 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 wordpress-elixir

Wordpress Elixir

A base WordPress theme prepped for Laravel Elixir and npm. If you design and develop custom WordPress themes and hate the cruft logic included in most "base" themes, this is the theme for you. Take it, use it, love it, fork it, make pull requests in the spirit of the theme.

Quick Start

About

This theme is designed to wrap all the goodness of Laravel's Elixir, which is a an abstraction of the Gulp task runner, into a WordPress theme. This allows us to cut down on requests and automate optimization.

What this isn't

This theme has no opinions on design (though comes with Bootstrap and Font Awesome for example's/convenience's sake). Its opinions lie in an efficient and performant development pattern. For that reason, it's intended to be directly forked as a new theme. This theme works great as a child theme, but you will not be able to use Elixir if you make a child from it.

If you do want to maintain drop-in updatability, consider not altering your gulpfile.js or elixir.json. If the theme is updated, you can drop in those two files to keep up. All other files should be specific to your theme, as what is included here should be simply a jumping-off point.

Requirements

Comes With

Either of these can be replaced or removed entirely. See your package.json and edit main.scss accordingly.

Setup

Installation with Composer

This theme makes use of composer/installers and its defined WordPress spec. The theme can therefore be installed using composer require webspec-design/wordpress-elixir and it will make its way to wp-content/themes. However, the theme should be forked following this, or a composer update will overwrite your changes. Either remove it from your composer.json and composer.lock or rename the theme's directory to avoid this.

Usage

Use gulp to run the gulpfile once, or gulp watch to run relevant tasks when changes are detected.

Sass compilation

The gulpfile is designed to compile your sass and any dependencies into one file at build/css/main.css, which is already enqueued in the functions file. The theme comes with Bootstrap and a navigation bar to go with it, but you can just as easily swap that out for Foundation or your favorite CSS framework.

Importing other sass libraries

Importing less

To use a library built on less, you have two options:

  1. Tinker with the gulpfile and elixir.json to compile sass, then compile less, and then concatenate the resulting files using mix.styles().
  2. Make creative use of the included gulplettes to accomplish #1.

See the Elixir documentation for more information on Elixir's capabilities.

Using vanilla CSS

To import a vanilla CSS library, you could simply write @import node_modules/animate.css/animate.css. However, this is directly translated to a CSS import rather than appended to your styles, so if you haven't successfully run npm install server-side, the import will result in a 404. Consider using the before_copy copy such files into something like sass/libs as an scss file, and then import it like you would any other scss file.

Browserify

The gulpfile is designed to compile your own Javascript and npm modules into one file using Browserify. Scripts are compiled to build/js/main.js, which is already enqueued in the functions file.

Install and use a new module

Modularize your own JavaScript

If you like to break your own Javascript into multiple files, you can include them all into your main one by using relative paths:

require('./maps.js')

A note about jQuery libraries/extensions

If you want to use a jQuery library or extension like slick, you'll need to enqueue it independently from a CDN or otherwise. For compatibility's sake, we want our theme to still depend on WordPress's bundled jQuery, and we haven't figured out how to shim jQuery libraries and extensions bundled via Browserify onto the global jQuery. If you figure that out, a PR would be appreciated.

If that library also has Sass/CSS to it, you can still import those into your own styles as described above.

Images

The gulpfile is designed to send your files through TinyPNG to make sure they're nice and optimized. Your TinyPNG API key should be placed in env.json, as this is sensitive information. Each image will have its MD5 hash placed in a file before being optimized. Comparison against this file prevents images that haven't been altered from being sent back through to TinyPNG, running up your bill. If your env.json file doesn't contain a TinyPNG key, the images will simply be copied to the build folder.

BrowserSync

Running gulp watch will begin BrowserSync, assuming you've successfully set bsProxy in your env.json file. This will open a new window in your browser, proxied on port 3000. When the system detects changes to build/css/main.css, the styles will be injected into the page. If it detects changes to other file types, the page should refresh automatically.

Config

If you want to configure some of Elixir's default behavior, see elixir.json. There isn't a lot of great documentation on this, so best of luck.

If you want to make configurations specific to your development environment or have a place to store sensitive information, consider env.json (which should be gitignored, as is the default).

Custom Gulp Tasks

In an effort to maintain the drop-in updatability of the theme, custom gulp tasks can be executed using what we've termed gulplettes.

At various times during the running of the built-in gulp tasks, gulp will look to tasks/main.js for specifically named hooks in which custom gulp tasks can be written, exposing the mix object and various arguments available at that time.

This is a great place to use some of Elixir's other functionality. It's also a great place to extend Elixir and have it run plain old gulp tasks for things it doesn't come with - perhaps spritesheet generation?

The table below contains the currently configured hooks in the order in which they occur:

Hook name Available args Notes
hook_start {} Runs before all other gulp tasks
hook_after_copy {} Runs after Bootstrap and Font Awesome fonts have been copied
hook_end {} Runs after all other gulp tasks

The functions.php file

The functions file is wrapped in a singleton class to avoid polluting the global namespace.

For example's/convenience's sake, the functions file:

And that's it. Feel free to remove any of it, as this theme is designed to be forked at the outset of development.


All versions of wordpress-elixir with dependencies

PHP Build Version
Package Version
Requires composer/installers Version 1.x.x
php Version >=5.4.0
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 webspec-design/wordpress-elixir contains the following files

Loading the files please wait ....