GruntIs based on node. the project scaffolding in the JS environment is used to quickly build project files and directories, and provides various plug-ins to automate common programs in the development process, such as code compression and code detection, unit testing ....
Grunt installation first you have to ensure that you have installed the node environment, if not installed, please move to the http://www.nodejs.org/download/ (novice Please downlo
Previously, we may use NodeJS to write a build program, But Now Grunt. js can provide everything we need.
What is Grunt. js?Grunt. js is a Javascript Task Runner (Javascript Task Runner). It is based on NodeJS and can be used to automatically build, test, and generate documents.
Grunt. js is not just a build tool. In
At present, the trend of the more popular web development is the separation of front and back. The front-end uses a heavy-weight JavaScript framework, such as Angular,ember, and the backend uses the RESTful API's Web service service to interact with the data in JSON format.For back-end service languages, whether Maven or Gradle in Ruby's Rack,java, or SBT in Scala, they are able to provide functions such as compile run, run test, package deployment, dependency management, and so on. Coupled with
1 grunt and Grunt plugins are installed and managed via NPM, NPM is a node. js Package Manager2 GRUNT-CLI is grunt plug-in, install it into the global environment can execute grunt command in any directory, GRUNT-CLI task is simpl
What is Grunt. js?Grunt. js is a Javascript Task Runner (Javascript Task Runner). It is based on NodeJS and can be used to automatically build, test, and generate documents.
Grunt. js is not just a build tool. In fact, it is only a task runner that manages the automatic running of each subtask. We can also use it to do more.
Why is
Grunt and Grunt plugins are installed and managed by NPM, and NPM is the package Manager for node. js.Installing the CLIFirst, you need to install the grunt command line (CLI) into the global environment first.NPM install-g GRUNT-CLIOnce the above command is executed, the grunt
I. Preparation 1. create a directory g12. create a package. json, put it in g13. create Gruntfile. js, put the g1 package. json {"name": "g1", "version": "0.1.0", "author": "@ snandy", "homepage": "http://www.g1.com", "devDependencies ": {"grunt ":"~ 0.4.0 "} 4. cd enters g1, and npm install installs the grunt package. The entire directory structure is as follows: Gruntfile. js. 2. Create a simplest task,
Last night I saw Bootstrap. The global CSS style uses the less section to recompile CSS and JavaScript files using grunt, and for those of me who have never touched the Windows CMD node console npm, learning is a lot more difficult.Then we follow the tutorial step by step:First step: Install node. jsWebsite: https://nodejs.org/en/download/Download version: Node-v6.10.2-x64.msiIf you encounter 2502 2503 erro
ASP. NET 5 Series tutorials (5): Use Grunt and Bower in Visual Studio 2015 to develop Web programs, gruntbower
Based on Visual Studio 2015, you can:
Convenient Management of front-end packages, such as jQuery, Bootstrap, or Angular.
Automatically run tasks, such as LESS, JavaScript compression, JSLint, and JavaScript unit tests.
A toolkit for the Web Developer ecosystem.
To implement these scenarios, Visual Studio 2015 has built-in some popular t
Using the Grunt tool to manage JS files, there are several common functions, such as compression and merging.Install the node environment first, install gruntBuild your own project in a directory environment My_projectAdd two source filesCreate a Package.json file under the project root directory{ "name": "My_project", "version": "0.1.0", "Devdependencies": { "grunt": "~*", "
Previous blogs have outlined information such as "front-end Automation builder Grunt" and "Grunt[mismatched:define". However, not in depth; The following will delve into the grunt files processing methods, configuration items, and custom plug-ins.
First, the preparatory workA. By npm init creating in the project root directory package.json ;B. By npm install
Recently, grunt was used to build projects, including File compression and merge operations, during the development of multi-person teams. I have learned a lot about configuring grunt tasks. Now you can record your learning process as follows:
1. For a project, the grunt build tool mainly relies on two files gruntfile. JS/gruntfile. coffee and package. JSON. The
Grunt-contrib-uglifyUglify is a file compression plug-in, project address: https://github.com/gruntjs/grunt-contrib-uglifyThis article will show you how to use the Uglify plugin with a demo.Demo EnvironmentPackage.json:{ "name": "Grunt-demo", "version": "0.1.0", "Devdependencies": { "grunt": "~0.4.2", "
Http://www.gruntjs.net/sample-gruntfileGruntfile instancesThe following is a Gruntfile simple analysis of a case, or it can be used as an instance:function(grunt) { grunt.initConfig({ jshint: { files: [‘Gruntfile.js‘, ‘src/**/*.js‘, ‘test/**/*.js‘], options: { globals: { jQuery: true } } }, watch: { files: [‘‘jshint‘] } }); grunt.loadNpmTasks(‘grunt-contrib-jshint‘); grunt.load
Grunt.initconfig methodFor a module configuration, it accepts an object as a parameter. The members of this object correspond to module one by one, which uses the same name.The specific settings for each target need to refer to the documentation for that template. In terms of cssmin, the parameters of the minify target are as follows:
Expand: If set to True, the placeholder (that is, *) of the following file name is extended to a specific file name.
CWD: The directory where the file
Grunt tutorial 3Yuidoc plug-in
Yuidoc is a tool that can generate HTML documents by commenting on codes. The documents are generated based entirely on javadoc-style code comment rules.
When writing public modules or APIs, we often output documents to callers. yuidoc is a good assistant at this time.
The following describes how to use yuidoc in grunt.
123
Transfer from Gulp vs Grunt1. Grunt-GulpThe early mention of building tools is inevitably reminiscent of a long history, Make Ant and later, for more convenient construction of similar Java projects Maven . Node spawned a number of automated tools, such as Bower,yeoman,grunt. And now the front-end mentions that the build tool will naturally be remembered Grunt .
For now Vue, react, webpack may be a bit old, sometimes, the simpler the more reliable technology, back upModule.exports =function(grunt) {//Project configuration.Grunt.initconfig ({Pkg:grunt.file.readJSON (' Package.json '), Compass: {development: {options: {generatedimagesdir :' Public/src/slice ',//merged sprite dirImagesdir: ' Public/src/slice ',//Sprite image merge before picture fragment DirSassdir: ' Public/src/sass ', Cssdir:' Public/src/sass-
The front-end development environment is ready and we are ready to begin development.Front-end development of the main language is JavaScript, which is a scripting language, there is no compiler, there is no compiler to give us a grammar check, how to ensure the quality of the code? Jshint is a powerful tool.1. Summary descriptionOfficial address: http://jshint.com/GitHub Address: Https://github.com/jshint/jshintJshint is a code quality checker for JavaScript written using JavaScript, primarily
1.5 No update is because of their own transfer, Android Framework+system to the front, you can imagine the process of bitter force, Bitter became a poem: very annoying/very annoying/very very annoying/special annoying/very annoying/annoying/annoying/AH ——。 Tired of adhering to the people ugly more reading adage, gnawing books countless, into notes refereed, not system. Often recall, always forget the majority, so to tidy up, such as before the excretion out to ruminant a few mouth, aftertaste a
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.