Git Product home page Git Product logo

grunt-init-sw4-template's Introduction

grunt-init-sw4-template

Create a Shopware 4.x frontend template with grunt-init.

Installation

If you haven't already done so, install grunt-init.

Once grunt-init is installed, place this template in your ~/.grunt-init/ directory. It's recommended that you use git to clone this template into that directory, as follows:

git clone [email protected]:ShopwareAG/grunt-init-sw4-template.git ~/.grunt-init/sw4-template

(Windows users, see the documentation for the correct destination directory path. For proper bower support, please install mysysgit using the option "Run Git from the Windows Command Prompt".)

Features

  • Check your Javascript using JSHint
  • Concatenate and uglify your Javascript
  • LESS Support for the popular css preprocessor
  • Use Twitter's bower to manage the dependencies of your template

Usage

At the command-line, cd into your Shopware templates directory, run this command and follow the prompts.

grunt-init sw4-template

Now cd into your newly created template directory and install grunt's dependencies:

cd emotion_my_template
npm install

Less support

Using the popular css preprocessor Less is as easy as writing pure css. Just place your Less files in the directory frontend/_resources/styles/less and just run the following command:

grunt less:development

Bower support

Bower is built right into the grunt file, so you can install bower components using grunt.

Installing bower package

In your template directory (where the Gruntfile.js is located), type the following command:

grunt bower-install:[pkg-name]

If you want to install jQuery as an example, you type the following command:

grunt bower-install:jquery

Uninstalling bower package

The uninstall process is as easy as installing a bower component into your template. As an example, we want to remove jQuery from our template, we just type the following command:

grunt bower-uninstall:jquery

Available tasks

  • grunt
    • Runs JSHint, compiles Less in production mode (minifing using yuicompress), concatenates and uglifies your Javascript + minifies your CSS
  • grunt build
    • Runs bower to install the dependenies, JSHint, compiles Less in production mode (minifing using yuicompress), concatenates and uglifies your Javascript
  • grunt install-bower:[pkg-name]
    • Installs the specific bower package
  • grunt uninstall-bower:[pkg-name]
    • Uninstalls the specific bower package

Please keep in mind that you can list all available tasks using the command grunt --help.

License

Copyright (c) 2013 "klarstil" Stephan Pohl. Licensed under the MIT license.

grunt-init-sw4-template's People

Contributors

klarstil avatar matthiasbreuer avatar

Watchers

James Cloos avatar  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.