1.0.2 • Published 9 years ago

roi-grunt-tasks v1.0.2

Weekly downloads
14
License
-
Repository
-
Last release
9 years ago

Tareas de grunt comunes para projectos

Instalación en un proyecto

npm i --save-dev roi-grunt-tasks

Añadir los proyectos en el package.json

ejemplo para media, definir las webs en la propiedad apps

{
  "name": "medinahoteles",
  "version": "1.0.0",
  "description": "módulos web en proyectos",
  "main": "index.js",
  "scripts": {
    "test": "test"
  },
  "author": "roiback",
  "license": "ISC",
  "devDependencies": {
    "grunt": "^0.4.5",
    "roi-grunt-tasks": "^1.0.0"
  },
  "apps":[
    "corporativa",
    "antea",
    "olympus",
    "solysombra" 
  ] 
}

Uso en el Gruntfile del proyecto

const PATH_DYNAMIC_TEMPLATES = process.env.DYNAMIC_TEMPLATES ||
                               '../../libs/dynamic_templates';

module.exports = function(grunt) {

   const conf = require('roi-grunt-tasks').config(grunt, {
       project: grunt.file.readJSON('package.json').name,
       apps: grunt.file.readJSON('package.json').apps,
       dynamicTemplates: PATH_DYNAMIC_TEMPLATES
   });

   //// Add project specific config here
   // conf.task = ...

   grunt.initConfig(conf);

   grunt.loadNpmTasks('roi-grunt-tasks');

   //// Project specific tasks here
   // grunt.registerTask(..)

};

Settings de proyectos

Por defecto grunt lanza la tarea multi