Skip to content

mt-gareth/sage-flex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Library: SAGE-FLEX

Latest Stable VersionTotal DownloadsLicense

Extends Sage Acorn to add commands to scaffold flexible components quickly

Install

In sage theme run

composer require motiontactic/sage-flex

To publish files that are used in most sites run:

wp acorn publish:mt

these files will be added or updated:

/app/View/Composers/Flex.php
/resources/assets/scripts/app.js
/resources/assets/styles/app.scss
/resources/assets/scripts/flex/index.js
/resources/assets/styles/flex/index.scss

/resources/assets/scripts/common/index.js
/resources/assets/scripts/common/responsive-bgs.js

/resources/assets/styles/common/fonts.scss
/resources/assets/styles/common/global.scss
/resources/assets/styles/common/grid.scss
/resources/assets/styles/common/index.scss
/resources/assets/styles/common/mixins.scss
/resources/assets/styles/common/spacing-modifiers.scss
/resources/assets/styles/common/variables.scss

/resources/views/partials/bg.blade.php
/resources/views/partials/content-page.blade.php

mu-plugins/site.php
mu-plugins/site/composer.json
mu-plugins/site/advanced-custom-fields-pro

Usage

Commands

Main Scaffolding Command

wp acorn make:flex ComponentName

Where ComponentName is the name of the new flexible component you would like made, should be in CamelCase.

wp acorn remove:flex ComponentName

Where ComponentName is the name of the old flexible component you would like removed, should be in CamelCase.

Other Commands

wp acorn make:flex-controller ComponentName
wp acorn make:flex-script ComponentName
wp acorn make:flex-style ComponentName
wp acorn make:flex-template ComponentName

wp acorn remove:flex-controller ComponentName
wp acorn remove:flex-script ComponentName
wp acorn remove:flex-style ComponentName
wp acorn remove:flex-template ComponentName

Each command makes or removes a single file.

wp acorn publish:flex
wp acorn publish:base-files
wp acorn publish:acf

Each command published files that are used on most sites.

An Optional Template Can Be Added To Any Make Command

wp acorn make:flex ComponentName template

Where template is the name of the template you would like to be used, if omitted a default is used.

Template Options

default
hero