This is a MAMP specific boilerplate but can be adapted to your own needs.
- Uses SCSS partials to help structure the CSS.
- Uses AutoPrefixer to take advantage of CSS3 declarations so you don't have to worry about browser prefixes (-webkit- etc.).
- Gulp to take care of watching SASS, JS and minification.
- BrowserSync to watch your magic come to life
- Uses Normalize to reset browser styles.
Gulp and BrowserSync will do the watching and production part of your website.
Open up terminal (or command line)
npm install
Then use 'gulp' in the command line to run the watch task along with BrowserSync.
Once you are ready to push live use 'gulp deploy' in the command line to run concatination and minification.
I use bower as a package manager, the only dependancy is jQuery currently, so upon clone use.
bower install
This will pull down jQuery. If you want to add more to your project just run
bower install *package* --save
-
_animations.scssPut your CSS3 animations here. -
_mixins.scssReusable SASS mixins e.g. clearfix. -
_print.scssBasic print stylesheets to make your pages look better when printed. -
_reset.scssThis is normalize. -
_type.scssBasic styling for your typography. -
_varibles.scssPut all your variables in here e.g. colors, padding, border radius - this helps with consistency across your project.
-
_grid.scssPlace your grid here depending on project. -
_ie.scssAny styles that you need to add in order for Internet Explorer to work. -
_layout.scssThis is where your main styles go. I typically have header, footer, logo classes here. -
_shame.scssKeep this to hand for any quick and dirty CSS you need to add but plan to tidy later. -
_site.scssAny site specific styles - keep this to smaller parts, anything that doesn't warrent it's own Ui file.
#Modules
-
_elements.scssAll re-usable styles in here to keep to OOCSS - Remember DRY. -
_forms.scssSome basic form styles. -
_helper.scssHelper classes. -
_icons.scssThis is SVG icons -
_links.scssStyles for any text links and/or buttons. -
_notifications.scssAlerts to notify or give feedback to the user -
_tables.scssStyles for tables.
#Ui
-
slideshow.scssAll Ui specific styles go here in their own file. E.G - Slideshow -
main.scssThis brings all the partials together.
- I've included some basic Javascript including the latest jQuery and the document ready function. You only need to edit /assets/js/src/global.js for your site styles. You would then put any plugins with-in /assets/js/libs.
While dev'ing locally on MAMP, you will need to add you plugins directly into the footer. Once running Gulp this will concat into one main.js file, but this is for go live only.
Admireplate was originally based on Motherplate written by Lee Munroe.