Giter Site home page Giter Site logo

Comments (3)

mrmartineau avatar mrmartineau commented on August 23, 2024

Update:
I have been trying this system out using load-grunt-configs and have grouped related tasks together, but I don't know if it makes it easier to use Grunt.

See below for an example:

module.exports.tasks={
    javascript : {
      // <%=javascript.distDir%>
      distDir  : 'js/dist/',

      // <%=javascript.distFile%>
      distFile : 'app.min.js',

      // <%=javascript.fileList%>
      fileList : [
        'js/helpers/console.js',
        'js/script.js'
      ]
    },

    watch:{
      js: {
        files: ['<%=javascript.fileList%>', 'Gruntfile.js'],
        tasks: ['uglify']
      }
    },

    /**
     * Uglify
     * https://github.com/gruntjs/grunt-contrib-uglify
     * Minifies and concatinates your JS
     * Also creates source maps
     */
    uglify: {
      options: {

        mangle: true, // mangle: Turn on or off mangling
        beautify: false, // beautify: beautify your code for debugging/troubleshooting purposes
        compress: false,
        // report: 'gzip', // report: Show file size report
        sourceMap: '<%=javascript.distDir%><%=javascript.distFile%>.map',
        sourceMappingURL: '/<%=javascript.distFile%>.map',
      },
      js: {
        src: '<%=javascript.fileList%>',
        dest: '<%=javascript.distDir%><%=javascript.distFile%>'
      }
    }
};

I would love to get some feedback on this.

from kickoff.

ashleynolan avatar ashleynolan commented on August 23, 2024

I like the split, but I'd keep the watch tasks together, as I think it makes it hard to get an overview of what is being watched.

Think the jschecks.js could be moved in with javascript though to simplify.

I like it otherwise, looks good.

from kickoff.

mrmartineau avatar mrmartineau commented on August 23, 2024

@ashleynolan has split the configs now. I think they improve our Grunt workflow from the time that I've used it. Have a look at https://github.com/tmwagency/kickoff/tree/next/config and https://github.com/tmwagency/kickoff/blob/next/Gruntfile.js for what it will look like

from kickoff.

Related Issues (20)

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.