Skip to content

Commit

Permalink
Remain true to initial mission: sugar for vagrant up
Browse files Browse the repository at this point in the history
  • Loading branch information
spktklr committed Apr 12, 2019
1 parent e734cf3 commit 312be97
Showing 1 changed file with 2 additions and 49 deletions.
51 changes: 2 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,67 +3,20 @@ Sugar for `vagrant up` when using [Seravo/wordpress](https://github.com/Seravo/w

## Features
* [Kage](https://github.com/kehittamo/kage) starter theme initialization (during vagrant up).
* Master gulpfile asset pipeline with
* Error notifications
* SASS/LESS preprocessing
* CSS source maps and minification
* JavaScript processing and bundling with Webpack
* Styles and scripts linting
* Image minification
* .pot file creation
* Style guide creation
* Livereload server
* Asset building on production and staging (with BitBucket pipelines).
* Adds tags in the production and staging environments automatically, incrementing the latest SEMVER tag available.
* A working pull production database script (during vagrant up).
* .env initialization
* Yarn execution
* Yarn execution & asset building
* Support for project specific scripts
* Optionally adds Kehittamo Seravo Library during theme generation (during vagrant up).

## Prerequisites
* [Vagrant 2.0.4](https://seravo.com/docs/development/how-to-install/)
* [Yarn](https://yarnpkg.com/en/docs/install)
* A [Seravo/wordpress](https://seravo.com/docs/development/how-to-install/) project

## Installation
$ `composer require --dev kehittamo/kehittamo-seravo-addons:^2.0.0`
$ `composer require --dev kehittamo/kehittamo-seravo-addons:^3.0.0`

$ `vagrant up`

## Usage
During $ `vagrant up`, you will have new options to choose from (see [features](#features)).

Develop the theme's assets in:
`htdocs/wp-content/themes/THEMENAME/assets`

The following scripts are available for theme development:

$ `yarn serve` BrowserSync + reload

$ `yarn build` Builds files for production (used in pipelines)

$ `yarn lint` Lint the project's theme (scss & js, used in pipelines

$ `yarn lint:scss` Lint scss

$ `yarn lint:js` Lint js

$ `yarn fix` Fix the project's theme (scss & js)

$ `yarn fix:scss` Fix scss

$ `yarn fix:js` Fix js

## Development
Remember to increment the version in `package.json.example`, add a `git tag` with the same version, and `git push --tags` the new tag.

## Troubleshooting
The assumption is your project directory and the project name in config.yml are the same. If not, edit your gulp.config.js proxy address to match your project name.

Currently automatic tagging is tied to the production and staging servers. The tags are used for cache busting. If tagging fails a fast fix may be to clear the tags after connecting via ssh:

$ `git tag -d $(git tag | grep "production\|staging")`

The kage theme and Kehittamo Seravo Library are currently version constrained with ^2.0.0.

0 comments on commit 312be97

Please sign in to comment.