Git Product home page Git Product logo

gruntfile's Introduction

gruntfile

Grunt Setup

Less to Css compilation

Grunt will automatically process all of the less into css. The proper css file is referenced in the index.html.

Open

This task has to be registered between the connect task and the watch task

Proxies

This was one of the more confusing parts of setting up this template. if you look in the connect object you will see that there are 2 servers running.

  1. **staticserver** - port **8001**
  2. **server** - port **9000**

The **server** server has all of the proxies attached to it. All requests hit the **server** server and are immediately proxied. If no route is found for the request in the predefined proxies, then the request is sent to the **staticserver**. This will then route the request as would normally be expected.

Templating

Handlebars is our template of choice. The templates are to be place in the templates/ directory and are to be referenced with a hbs! preceeding the file path and name.

Watch

We are watching all of the different types of files

  1. Gruntfile.js
  2. javscript
  3. css
  4. less
  5. html
  6. test files

Any of the files that are changed will cause the page to be refreshed. If a less file is changed, then it will be processed into css and then the page will be refreshed. When any of the js files are changed, the file will be linted and then the page will be refreshed.

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.