Comments (5)
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.
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.
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.
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.
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)
- Execution start time is always in UTC HOT 8
- Feature request: Ignore Tasks HOT 3
- allow custom barChar character, or non utf8 option HOT 4
- builder is not defined HOT 1
- Ctrl+C not working HOT 4
- `createBar` invalid array length exception due to negative maxBarWidth HOT 4
- [feature] Allow depth configuration or whitelist HOT 4
- Execution time (date+time) is wrong HOT 1
- --no-color flag does nothing HOT 3
- TypeError: chalk.stripColor is not a function HOT 1
- Maintainer needed HOT 4
- xo 0.15.0 throwing lint error
- Abstracted grunt hooks package HOT 4
- Not outputting total elapsed time unless grunt is called with `--no-color` option HOT 5
- Disable for independent runs
- Callback is not called when exit HOT 1
- Prevents Jest from completion HOT 1
- LESS option 'spawn HOT 1
- grunt-contrib-watch option 'spawn': false blocks time-grunt? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from time-grunt.