grunt html script 提取,Grunt: The JavaScript Task Runner

GruntThe JavaScript Task Runner

Why use a task runner?

In one word: automation. The less work you have to do when performing repetitive tasks like minification, compilation, unit testing, linting, etc, the easier your job becomes. After you've configured it through a Gruntfile, a task runner can do most of that mundane work for you—and your team—with basically zero effort.

Why use Grunt?

The Grunt ecosystem is huge and it's growing every day. With literally hundreds of plugins to choose from, you can use Grunt to automate just about anything with a minimum of effort. If someone hasn't already built what you need, authoring and publishing your own Grunt plugin to npm is a breeze. See how to get started.

Available Grunt plugins

Many of the tasks you need are already available as Grunt Plugins, and new plugins are published every day. While the plugin listing is more complete, here's a few you may have heard of.

f82d18e81dafa4b4e01f404a90b23444.png50b80565711d112b919fdec0308069de.png8c4e68818d2533cad6346ae662ddb2ea.png7e064e44086abbc94106d03202cb854d.png016abce397c0f78193f4f642945e53dd.pngf0fcae523dc1b3231d4ec14311ee4dd4.pngd72ce31e28db14cb46b9384021623d5c.png4a77bab41de8bf8275c0f1cba91d4e83.png

Here's a preview!

While installing grunt is simple, it's slightly more involved to get it running on your project. To see what your effort will win you, take a look at this example output from running Grunt in a sample project.grunt

Running "jshint:gruntfile" (jshint) task

>> 1 file lint free.

Running "jshint:src" (jshint) task

>> 1 file lint free.

Running "jshint:test" (jshint) task

>> 1 file lint free.

Running "qunit:files" (qunit) task

Testing test/tiny-pubsub.html....OK

>> 4 assertions passed (23ms)

Running "clean:files" (clean) task

Cleaning "dist"...OK

Running "concat:dist" (concat) task

File "dist/ba-tiny-pubsub.js" created.

Running "uglify:dist" (uglify) task

File "dist/ba-tiny-pubsub.min.js" created.

Uncompressed size: 389 bytes.

Compressed size: 119 bytes gzipped (185 bytes minified).

Done.

Who uses Grunt?

These are just a few companies and projects that are using Grunt.See more here.

e759dd51e079ff218907106176ddc3a9.png76ebfc1e993b2ebad767a1a1f9f92b5c.png901acc899b3944c6ece39e9ad759fe88.png46b44fc60b90ce93955311ba857d309a.png138737f61911f4b1ce2f8e03955ead6e.png880c677fd43f4bb22c9c34290bdb26b7.png25a89b60851a02e94862abd7a13b9c59.png9b4957abd250e0dd90c0b0d7b3d76be5.png

How do I get started?

Read the Getting Started guide for instructions on using Grunt in your projects. Once you've done that, check out a Sample Gruntfile and learn more about Configuring Tasks.

Grunt is an OpenJS Foundation project.

open-jsf-logo.svg

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值