generator-francis-craft v0.7.3
generator-francis-craft
Francis Bond's Yeoman generator for scaffolding a Craft website with Gulp, Bower, Sass, inuit.css, Modernizr, and jQuery.

Features
- Set up a fresh copy of Craft
- Generate a Vagrantfile with provisioning via Puppet
- Deploy to a Dokku-powered server
- Copy databases between local and remote environments
- Automatically compile Sass with Autoprefixing
- Automatically lint your Javascript
- Image optimization (png, jpg, gif)
- Optionally include inuit.css and jQuery
Initialization
- Install:
npm install -g francisbond/generator-francis-craft - Run:
yo francis-craft - Run
gulp buildfor building andgulp watchfor preview - Use
gulp deploy-initto initalise a deployment environment - Run
gulp deployafter committing changes to deploy them - Use
gulp db-pushandgulp db-pullto push and pull databases between local and remote environments
Requirements
- For using the provided development environment, VirtualBox, Vagrant, and the Vagrant Host Manager plugin must be installed.
- The generator requires Ruby and Sass to be installed, and inuit.css requires at least Sass 3.3. Using the newest version available is recommended:
gem install sass. - Yeoman, Bower, and gulp.js should be installed globally via npm.
Available Commands
Deployment
gulp deploy-initInitialize a Dokku container for use in the project's deployment.
- Adds a git remote corresponding with the Dokku server.
- Pushes the repository to the Dokku remote.
- Defines a Buildpack for Dokku to use in the project's deployment.
- Sets up and links a new MariaDB container.
You should follow this command with gulp db-push.
gulp deployPushes the repository to the Dokku remote.
gulp db-pushDumps the local database to
/.tmp, and imports it to the linked Dokku MariaDB container.gulp db-pullDumps the remote Dokku MariaDB database to
/.tmp, and imports it to the local environment.gulp db-dumpDumps the local and remote databases, and saves them to
/databases.
Development
gulp watchWatches the project for changes in images, styles, javascript, HTML, etc. and performs appropriate actions. Skips some non-critical resource-intensive processes (e.g. image optimization).
gulp buildBuild the project for deployment. Performs all tasks including minification and image optimization.
Miscellaneous
bower installInstall project-specific Bower packages defined in bower.json. You should run this command when cloning an already initialized repository.
npm installInstall project-specific npm packages defined in the package.json. You should run this command when cloning an already initialized repository.
bundle installInstall
sassandsass-globbingwhich are required by the build system.
Known Issues
- Rerunning
gulp deploy-initwill fail, since a Dokku remote has already been created. Runninggit remote remove dokkuwill resolve this. gulp deploywill sometimes fail if a newer commit has been deployed but not pushed to the repository. You can override this by runninggit push origin dokku --force.