website in here, feel localization to do well, estimate has pit dug also pretty. Installation run:NPM install-g GRUNT-CLIThis is a launcher, a bit like the Express creation project that thing. It is also recommended that you install it globally and estimate that each project will be available.To install in a project, you can use the command:NPM Install grunt--save-devIt is downloaded and saved to Package.j
() {returnGulp. SRC ('./sample.js'). Pipe (Uglify ()). Pipe (Size ()). Pipe (Gulp.dest ('./build'));});Gulp's core API is only 5, mastering 5 APIs and learning to gulp, then you can combine the tasks you want with your pipeline flow.
gulp.task(name[, deps], fn): Registering Tasks
nameis the task name; it deps is an optional array that lists the tasks to be performed in this task, the fn task body, which is the core of Gulp.js and takes time to thoroughly understand it, see here for
Now watch has integrated the livereload, so put them together to illustrate.Watch can monitor specific files, automate custom tasks such as Livereload, and so on when adding files, modifying files, or deleting files.1. InstallationProject definition on GitHub, address: Https://github.com/gruntjs/grunt-contrib-watchCan be installed directly via NPMInstall Grunt-contrib-watch--save-devAfter installation, you
In the company to access the network has restrictions, even their own website can not do, the release of WordPress is blocked, empty again to do, so first publish the article to csdn above 1, the purpose
Automate multiple font files for Base64 encoding 2, step
Download installation package from Nodejs official website, Windows is a fool type, after installation should be NPM (Nodejs package Manage) Nodejs package management tools, DOS command check whether the installation was successful.
NO
Plug-in Name
Function description
Grunt-contrib-uglify
Compression and obfuscation for JavaScript code
Grunt-contrib-jshint
Syntax validation for JavaScript code
Grunt-contrib-watch
Monitor file changes in real time and invoke configured tasks
Gru
GruntIs a task-basedJavaScriptThe project command line build tool runs on the Node. js platform.GruntYou can quickly create projects from templates, merge, compress, and verify CSS JS files, run unit tests, and start static servers. The previous article Grunt: a task-based JavaScript Project Build tool introduces Grunt's steps for installing and creating a project framework. This article describes how to use Grun
Grunt vs GulpAlthough Gulp has been out for a long time, but has not been used. Thanks to the recent project needs, try it out, here are a few points to talk about the differences between the use of grunt and gulp, focusing on the problems found during the use of gulp. The best of both tools is the reader's own judgment.1. How to WriteGrunt use the idea of configuration to write packaging scripts, everythin
Grunt the current folder that needs to be downloaded when the plugin is used in different places, because it is the current path when looking for a module, which can cause multiple projects to be downloaded multiple times, which should not exist in the project, so all modules should be installed globally, Then under the project only need to exist gruntfile.js 1, the global installation grunt,
1. Install the NODEJS environment (including NPM) 2, $ npm install-g grunt-cli//Callable Grunt version 3-1 in the same directory as Gruntfile, NPM install-g grunt-init most of the The nbsp;grunt-init template will automatically create a project-specific Package.json file 3-2, the NPM init//command will create a basic
nottheforon how to configure grunt: http://gruntjs.com/getting-startedto find Gruntfile.The error hint Gruntfile.js file could not be found, but the project already has a Gruntfile.js file that was later found to be installed with the npm module is grunt not complete (may be interrupted in the installation, but grunt the module directory already exists with the n
This article describes how to use the Grunt plug-in LiveReload to automatically refresh pages. For more information, see the following code:
Npm install -- save-dev grunt-contrib-watch connect-livereload
2. install the browser plug-in: Chrome LiveReload
3. configure a Web Server (IIS/Apache). LiveReload needs to run in the local server environment (File :///File path support is not very good ).
4. modify
With the rapid development of front-end projects, more and more projects, more and more documents, front-end engineering tools are more and more. Here are four of the most popular build tools--grunt, Gulp, Browserify, WebpackAll build tools are based on Nodejs and NPM, so you need to install node using any of the following toolsFirst, Grunt1. Two files required:Gruntfile.js--grunt Execution Task File: Descr
the publication number, it means the installation is successful.Update Nodejs version can be command line input: NPM update npm-g--------------------------------------------------------------------------------------------------------------"" Grunt "is not an internal or external command"Workaround:1. PurposeAutomating multiple font files for base64 encoding2. StepsDownload the installation package from NodeJs official website, Windows is a fool-type,
Recently learn about Hintjs, learn the next use Grunt Run Hintjs method, recorded. 1. Download and install Nodejs 2. Install the grunt command line NPM install-g grunt-cli 3. New Package.json file under project directory, content is an empty JSON array: {} 4. Switch to the project root and execute the command install plugin grunt:npm install--save-dev
Now watch has integrated the livereload, so put them together to illustrate.Watch can monitor specific files, automate custom tasks such as Livereload, and so on when adding files, modifying files, or deleting files.1. InstallationProject definition on GitHub, address: Https://github.com/gruntjs/grunt-contrib-watchCan be installed directly via NPMInstall Grunt-contrib-watch--save-devAfter installation, you
As I used Win8, 2503 and 2502 errors occurred when installing nodejs. Solution:
Enter cmd and enter msiexec/package [path: Location of the node to be installed]
The operation is shown in:
After the previous step, you can install the node normally. To determine whether the installation is successful, you can press Ctrl + R and enter node-v.
The new node version already contains NPM, so no additional installation is required. Enter NPM-V to view the NPM version.
After installing n
Tags: blog HTTP Io OS ar Java for strong
[Original article] introducing gulp, grunt, Bower, and NPM support for Visual Studio
Web development, especially front-end web development, is rapidly becoming as complex and sophisticated as traditional back-end development.Most projects not only pass throughUpload some JS and CSS files over FTP. And nowFrontend generation process,It can include sass and less extensions, CSS/JS compressed packages, jshint or j
Front-end optimization is to minimize the HTTP request, so we need to merge compressed files as much as possible, and then call the compressed file, such as multiple CSS files compressed into one, multiple JS files merged compression, etc., Usemin can automatically use the compressed file in the HTML to achieve the above purpose.Is the fully packaged file directory, the original directory is assets, and the package release file is Dist.Gruntfile.js File Contents:Module.exports =function(
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.