grunt-acn-build
Build AngularJS projects
Last updated 2 years ago by thiagovilas .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install grunt-acn-build 
SYNC missed versions from official npm registry.

Grunt Build Task

This is a compose of several grunt tasks used to build AngularJS projects

To use this task on your project follow these steps:

git clone https://newsource.accenture.com/scm/a1673/grunt-acn-build.git
cd grunt-acn-build
npm link
mkdir your_app
npm link grunt-acn-build

To run this task your gruntfile.js must set some properties:

"use strict";

module.exports = function (grunt) {
    var minify = grunt.option("minify") || false;

    grunt.loadNpmTasks("grunt-acn-build");

    var arrLess = ["app/assets/less/core.less"];

    var lessConfig = {
        options: {
            dumpLineNumbers: "all"
        },
        dist: {
            files: [{
                src: arrLess,
                dest: "app/assets/styles/layout.css",
                filter: "isFile"
            }]
        }
    };


    grunt.initConfig({
        build: {
            main: {
                minify: minify,
                options: {
                    cwd: "app",
                    dest: "deploy",
                    src: "",
                    templates: {
                        "app.common": {
                            cwd: "app",
                            src: ["modules/common/directives/**/*.html", "modules/financiamento/directives/**/*.html"],
                            dest: "app/modules/common/templates.js"
                        }
                    }
                },
                copy: {
                    glyphicons: {
                        files: [
                            {
                                expand: true,
                                flatten: true,
                                src: ['app/bower_components/bootstrap/fonts/*.*'],
                                dest: 'app/deploy/assets/fonts',
                                filter: 'isFile'
                            }
                        ]
                    }
                },
                less: lessConfig
            }
        }
    });

    grunt.registerTask("default", ["build"]);
};

Current Tags

  • 1.2.13                                ...           latest (2 years ago)

1 Versions

  • 1.2.13                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |