1.0.19 • Published 9 years ago

grunt-localserver v1.0.19

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

grunt-localserver

A powerful local develop server for freemarker developer

Example:

module.exports = function(grunt) {
    // load all tasks
    require('load-grunt-tasks')(grunt);

    grunt.initConfig({
        // watch files
        watch: {
            compass: {
                files: ['src/main/webapp/style/scss/**/{,*/}*.{scss,sass}'],
                tasks: ['compass:server']
            }
        },

        // Compiles Sass to CSS and generates necessary files if requested
        compass: {
            options: {
                sassDir: 'src/main/webapp/style/scss',
                cssDir: 'src/main/webapp/style/css',
                relativeAssets: false,
                assetCacheBuster: false,
                raw: 'Sass::Script::Number.precision = 10\nEncoding.default_external = "utf-8"\n'
            },
            server: {
                options: {
                    sourcemap: true
                }
            }
        },
        // localserver config
        localserver: {
            // multiple task
            dev: {
                options: {
                    // the config file
                    configFile: 'src/test/mock/project_config.cfg',
                    // the port
                    port: 8081,
                    // default is true for async, if used with [watch], it should be set to false
                    async: false
                }
            }
        },
        ftl2html: {
            test: {
                options: {
                    baseDir: '../../../',
                    sourceRoot: 'src/main/webapp/WEB-INF',
                    files: [{
                        ftl: '/tmpl/main.ftl',
                        tdd: 'src/test/mock/tdd/oglobal.tdd,src/test/mock/tdd/main.tdd'
                    }, {
                        ftl: '/tmpl/test1.ftl',
                        tdd: 'src/test/mock/tdd/oglobal.tdd,src/test/mock/tdd/test1.tdd'
                    }]
                }
            }
        }
    });

    grunt.registerTask('default', ['localserver:dev',  'watch']);

};
1.0.19

9 years ago

1.0.18

9 years ago

1.0.17

9 years ago

1.0.16

9 years ago

1.0.15

9 years ago

1.0.14

9 years ago

1.0.13

9 years ago

1.0.12

9 years ago

1.0.11

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago