Giter Site home page Giter Site logo

seafoam6 / magento-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jasonujmaalvis/magento-boilerplate

0.0 1.0 0.0 1.46 MB

Magento Boilerplate. Grunt & SASS ready along with other goods.

License: GNU General Public License v2.0

PHP 0.28% HTML 25.48% JavaScript 57.65% CSS 16.60%

magento-boilerplate's Introduction

Magento Boilerplate

Author: Jason Alvis
Author Email: [email protected]
Version: 0.0.1
License: Free General Public License (GPL)

Brief

Starting a Magento project the right way is a must for any developer. This project has many benefits and is the base framework for any new project I start. It adheres to the recommended Magento templating hierarchy and has been built from the ground up.

Note: This boilerplate is **NOT** complete, it is an ongoing project and it will take time to finish. The CSS has been written from scratch and I am slowly styling section by section as I go along, sit tight. If your expecting a fully fledged finished framework this is not for you.

A demo site will be added in due course.

Goods

Sass

The CSS has been written completely from scratch and is component based meaning each area is isolated making it highly re-useable. It is based of the HTML5 boilerplate and also includes the latest version of Normalize.

Removes default xml blocks

Magento by default bundles a handful of xml blocks that are rarely used and only causes bloat, so I removed them from within local.xml.

Note: They can be added back in if you need them by simply removing the line of code from local.xml.

Removes unnecessary JS files that are rarely used

Magento by default bundles a handful of JS files that are rarely used and only causes bloat/performance issues, so I removed them from within local.xml.

Note: They can be added back in if you need them by simply removing the line of code from local.xml.

Includes jQuery in no conflict mode

jQuery v1.10.2 minified in no conflict mode is included as default, you can change this to include a more up to date version if you wish. It gets included at the very bottom of the dom just like it should be.

This improves performance issues particularly on mobile devices as when a browser hits a script tag it actually waits for that entire asset to download before it proceeds, if it's in the head your going to block everything that renders visually on your page from starting.

Grunt

Grunt is all setup and ready to go. It comes with the following tasks:

Sprite Generation
LibSass
JSHint
Concat
Uglify
Watch

Installation

Drop in the directories app and skin within your Magento hierarchy e.g:

magento > public_html > app
magento > public_html > skin

Then you will need to change the package name in the admin panel to render the new package you have just installed (system > configuration > design > package).

Using Grunt

First off I'm going to assume you have successfully installed Node.js and Grunt, if you haven't you need to do this first. First install Node.js then install Grunt. Once you've done that proceed below.

cd into the skin theme directory like so

cd {site_path}/skin/frontend/magentoboilerplate/default

Install the project dependencies

npm install

Make changes to your files (sass and js) then you'll want to run grunt to initiate the tasks

grunt

Take it a step further and install the browser add-on LiveReload. With LiveReload you won’t have to go back to your browser and refresh the page. Page refreshes happen automatically and in the case of CSS, new styles are injected without a page refresh.

magento-boilerplate's People

Contributors

buric avatar jasonujmaalvis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.