Giter Club home page Giter Club logo

grunt-extjs-example's Introduction

grunt-extjs-example

A simple Ext.js project with a full Grunt build showing concat, testing, code coverage

Getting Started

You need the following installed:

  • node.js
  • grunt-cli - with node installed run npm install -g grunt-cli

Sync up this repository

Run:

$ git clone git://github.com/mattgoldspink/grunt-extjs-example.git
$ cd grunt-extjs-example
$ npm install
$ grunt

To view it in your browser quickly I'd recommend installing the servedir npm module:

$ npm install -g servedir
$ servedir .
Serving /Users/matt_goldspink/development/grunt-extjs-example/ on http://localhost:8000

You should then be able to see the development version on

http://localhost:8000/www/

and the built version on

http://localhost:8000/build/www/

You can also see Code Coverage reports on

http://localhost:8000/build/reports/lcov-report/index.html

And a Plato code complexity report on

http://localhost:8000/build/reports/plato/index.html

What's in this grunt file?

At the moment the grunt file runs the following tasks:

  • JSHint - for code validation and to enforce a coding standard
  • Clean - to clean out the build directory before building into it
  • Sencha_Jasmine - Runs any Jasmine tests and sets up the Ext framework to work nicely in it
  • Sencha_Dependencies - Calculates the dependencies that your project uses in the correct order for them to work when concatenated
  • Uglify.js - Concatenate, minify and generate Source Maps so you can debug the minified code against the original source code
  • Copy - Copy over additional required files (CSS, images, extra JS files) and also the index.html which we'll process to inject our concatenated JS file
  • Istanbul - When the tests are run we also generate code coverage and output an html report in build/reports/lcov
  • Plato - Generates code complexity reports

What else could be added

There's more tasks that I'll likely add over time. At my current company we also use the following Grunt tasks:

  • JSDuck - Generate documentation for all the files
  • Compass - Compile our Compass style sheets

grunt-extjs-example's People

Contributors

mattgoldspink avatar

Stargazers

Nguyen Viet Manh 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.