UNPKG

tooltwist

Version:
176 lines (158 loc) 3.72 kB
var IMAGE_DIR = '{{&HIDDEN_DIR}}/image'; module.exports = function(grunt){ grunt.initConfig({ {{#NEVER}} /* pkg: grunt.file.readJSON('package.json'), gitclone: { clone: { options: { repository: 'https://github.com/philcal/motionmap-webdesign.git', branch: 'development', directory: 'webdesign/guroopro' } } }, */ /* uglify: { options: { banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> *\/\n' }, build: { src: 'src/<%= pkg.name %>.js', dest: 'build/<%= pkg.name %>.min.js' } }, */ {{/NEVER}} /* notify: { // For OSX, must install https://github.com/alloy/terminal-notifier abc: { options: { title: 'Task Complete', // optional message: 'Whoopy Do Again!' } } }, */ exec: { generate_navpoints: { cwd: '{{&PROJECT_ROOT}}', command: 'tooltwist generate {{&PROJECT_NAME}} {{&GENERATE_OPTIONS}}' }, pair_fip_with_server: { cwd: '{{&HIDDEN_DIR}}/do_install', command: './pair.sh' }, install_using_fip: { cwd: '{{&HIDDEN_DIR}}/do_install', command: './DOIT' } }, wait: { "30seconds": { options: { delay: 30000, before : function(options) { console.log('Pausing ' + (options.delay/1000) + ' seconds, to allow the server to start'); } } }, "60seconds": { options: { delay: 60000, before : function(options) { console.log('Pausing ' + (options.delay/1000) + ' seconds, to allow the server to start'); } } }, }, copy: { {{#NOTYET}} jars: { expand: true, cwd: '{{&BUILD_DIR}}/exploded/WEB-INF/lib', src: '**', dest: IMAGE_DIR + '/tomcat/webapps/ttsvr/WEB-INF/lib', }, "web.xml": { expand: true, cwd: '{{&BUILD_DIR}}/exploded/WEB-INF', src: 'web.xml', dest: IMAGE_DIR + '/tomcat/webapps/ttsvr/WEB-INF', }, {{/NOTYET}} "war-contents": { expand: true, dot: true, cwd: '{{&BUILD_DIR}}/exploded', src: '**', dest: IMAGE_DIR + '/tomcat/webapps/ttsvr', }, "generated-files": { expand: true, dot: true, cwd: '{{&HIDDEN_DIR}}/do_generate/work', src: '**', dest: IMAGE_DIR + '/tomcat/webapps/ttsvr', }, "webdesign-projects": { expand: true, dot: true, cwd: '{{&HIDDEN_DIR}}', src: 'webdesign-projects/**', dest: IMAGE_DIR, }, "extension-projects": { expand: true, dot: true, cwd: '{{&HIDDEN_DIR}}', src: 'extension-projects/**', dest: IMAGE_DIR, }, } {{#NOTYET}} copy: { war: { expand: true, cwd: '{{&BUILD_DIR}}/exploded/', src: '**', dest: IMAGE_DIR + '/tomcat/webapps/ttsvr', }, "extension-projects": { expand: true, cwd: '{{&HIDDEN_DIR}}', src: 'extension-projects/**', dest: IMAGE_DIR, }, }, touch: { target: [ IMAGE_DIR + '/dummyBinDir/empty' ] } {{/NOTYET}} }); grunt.loadNpmTasks('grunt-contrib-copy'); // grunt.loadNpmTasks('grunt-notify'); grunt.loadNpmTasks('grunt-exec'); grunt.loadNpmTasks('grunt-wait'); {{#NOTYET}} /* grunt.loadNpmTasks('grunt-touch'); grunt.loadNpmTasks('grunt-contrib-compress'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-git'); */ /* grunt.registerTask('default', [ 'copy', 'touch' ]); */ {{/NOTYET}} grunt.registerTask('default', [ 'exec:generate_navpoints', 'copy', 'exec:pair_fip_with_server', 'exec:install_using_fip' ]); };