Giter Club home page Giter Club logo

Comments (5)

sindresorhus avatar sindresorhus commented on July 28, 2024

For it to know the time each task takes you would have to specify your run script as arguments to timegrunt:

$ timegrunt eslint mocha 'uglify src/app.js > dist/app.js'

from time-grunt.

garygreen avatar garygreen commented on July 28, 2024

That's not really ideal though because it would mean one massive line of tasks / build configurations.

Ideally it would be nice if this plugin was split into two repositories; time-node and time-grunt. The time-node would be responsible for exposing an api to log .start and .end events for tasks, plus rendering (and expose CLI). The grunt task would just call api methods on it. That gives full flexibility in how you want to use the timer; in grunt, through CLI, or even by node thru the api itself. What do you think?

from time-grunt.

garygreen avatar garygreen commented on July 28, 2024

Similar to how a lot of profiler apps works -- just .start('name of task') then .end('name of task') and it can calculate how long it took. Similar thru the CLI it would be, with any mixture of tasks etc:

timegrunt --start 'building css'
timegrunt --end 'building css'
timegrunt --render

from time-grunt.

garygreen avatar garygreen commented on July 28, 2024

This is kind of how I envisaged using it:

"scripts": {
    "build": "timegrunt --start 'building...' && npm run clean && npm run js && npm run css",

    "postbuild": "timegrunt --render",

    "clean": "timegrunt --start 'clean' && rimraf public/dist && timegrunt --end 'clean'",

    "js": "timegrunt --start 'js' && mkdirp public/dist/js && browserify resources/assets/js/site.js -o public/dist/js/app.js && timegrunt --end 'js'",

    "css": "timegrunt --start 'css' && lessc resources/assets/less/site.less public/dist/css/site.css && timegrunt --end 'css'"
}

from time-grunt.

sindresorhus avatar sindresorhus commented on July 28, 2024

Closing as this project is deprecated because Grunt is no longer actively maintained, so it doesn't make sense for me to maintain this project either.

from time-grunt.

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.