[Grunt] Install grunt and test. 1
and install test grunt
2023-09-14 08:59:21 时间
1. Using cmd to type:
npm install -g grunt-cli
npm install grunt
2. Create a GruntFile.js in the project dir.
3. Write code into the grunt file:
/** * Created by Answer1215 on 9/1/2014. */ module.exports = function(grunt){ grunt.registerTask("default",function(){ grunt.log.writeln("Hello Grunt World"); }) }
4. In the Terminal, type:
grunt default
we will get the result:
C:\Users\Answer1215\WebstormProjects\angular\Grunt_Demo>grunt default Running "default" task Hello Grunt World Done, without errors.
5. Grunt can accpet parameter:
/** * Created by Answer1215 on 9/1/2014. */ module.exports = function(grunt){ grunt.registerTask("default",function(name){ grunt.log.writeln("Hello Grunt World, welcome: "+name); }) }
6. Type in termianl:
grunt default:"Zhentian Wan"
we will get the result:
C:\Users\Answer1215\WebstormProjects\angular\Grunt_Demo>grunt default:"ZhentianWan" Running "default:Zhentian Wan" (default) task Hello Grunt World, welcome: ZhentianWan Done, without errors.
相关文章
- Objects, Immutability, and Switch Expressions 49-57
- MIT_6.s081_Lab4:Xv6 and Trap
- ORA-23370: table string and table string are not shape equivalent (string) ORACLE 报错 故障修复 远程处理
- ORA-25013: OLD and PARENT values cannot be identical ORACLE 报错 故障修复 远程处理
- ORA-26534: collision: tranID number ignored and purged ORACLE 报错 故障修复 远程处理
- ORA-30493: The percentile value should be a number between 0 and 1. ORACLE 报错 故障修复 远程处理
- MySQL Error number: 1884; Symbol: ER_GTID_UNSAFE_BINLOG_SPLITTABLE_STATEMENT_AND_GTID_GROUP; SQLSTATE: HY000 报错 故障修复 远程处理
- ORA-47025: Factor Link already exists for string and string ORACLE 报错 故障修复 远程处理
- eclipse找不到 help->software update->find and install详解编程语言
- ABAP Subscreen and tabstrip controls详解编程语言
- 多条件查询MySQL中使用And多条件查询的步骤(mysql中and)
- How to Install and Configure TGTD in Linux for Powerful Storage Management(linuxtgtd)
- 条件MySQL 子句之间`AND`操作符多条件查询(mysql多个and)
- Unlocking the Power of Data with MYSQL and ADO: A Comprehensive Guide(mysqlado)
- Building an Efficient Oracle Development Environment: Tips and Tricks(oracle开发环境)
- Mastering the art of Linux logoff: Tips and tricks for smooth exits from your Linux system(linuxlogoff)
- Building Complex Database Applications Made Easy with Linux QT and SQL(linuxqtsql)
- Optimizing Data Storage and Retrieval with DSM MySQL(dsmmysql)
- Top 5 MustTry Linux Data Recovery Tools: Get Your Lost Data Back Safely and Quickly!(linux数据恢复工具)
- Creating Your Own File System in Linux: A Guide to Writing and Designing(linux编写文件系统)
- Mastering Linux Machine Control with ctl: Tips and Tricks for System Administrators.(linuxctl)
- Exploring the Features and Benefits of SQL Server 7.0: Maximizing Your Data Management Capabilities(sqlserver7.0)
- MySQL中AND的使用方法及含义解析(mysql中and的含义)
- MySQL中如何正确使用AND运算符(mysql中and怎么用)