DAMn° Magazine website
The days of simple html pages are long behind us, sir. For most of our front-end apps, we distribute static packages, with dependency configuration and branched repo versioning. If this sounds scary, don't worry, its like rainbows and unicorns.
To install the required components for managing and compiling the DAMn website, we'll need following tools in our toolbelt: Composer, Git, npm, Bower and Gulp.
If you haven't done so, install Brew right away.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Start with installing Composer, the dependency manager.
brew tap josegonzalez/homebrew-php
brew install josegonzalez/php/composer
If you don't actively use one of the smaller versioning services, you'll probably end up with Github. Good choice too. Github has an awesome software client for managing your repositories locally.
Nodejs is basicly backend javascript. It’s lightweight and perfect for local builds of compile/distribution dependent projects. Since we’re taking this seriously, that’s just what we’ll do. Add Node.js and npm with brew:
brew install node
Gulp is a Task Runners, which will monitor, compress and compile the project. Gulp a nimble sytar, which makes you feel like you’re doing it for real. Install it with npm:
npm install -g gulp
Bower is the package manager we’ll be using in many projects. Additionally, most of the front-end frameworks come with a bower configuration.
npm install -g bower
####Install Sass Sass is a css extension language. It lets you nest, fragment, re-use, import and compile css code and files. While we're not using it in every project, you'll smell cupcakes and blow glitter out your working station when you do the first time.
sudo gem install sass
First, clone the damn-website project to your regular project folders location
git clone https://github.com/Cloudoki/damn-website.git
Now we willll have to install the roots/bedrock required components.
cd /local/path/to/damn-website
composer install
Copy the dotenv file and set up your local environment parameters.
cp .env.example .env
nano .env
The theme uses roots/sage as theme stack, install the required components
cd damn-sage
npm install
bower install
For more info on using roots/bedrock, head to roots.io/bedrock.
The theme is managed though Gulp. Some basic commands:
gulp #Compile and optimize the files in your assets directory
gulp watch #Compile assets when file changes are made
gulp --production #Compile assets for production
To connect the theme folder with the bedrock theme directory, add a symlink.
ln -s /local/path/to/damn-website/damn-sage/dist ../web/app/themes/damn-sage
For more info on using roots/sage, head to roots.io/sage docs.