1
輸入:咕嚕generateModule採樣模塊咕嚕任務要自動生成文件的新模塊
輸出:
文件應該像產生:
- 模塊/sample-module/sample-module.hbss
- 模塊/採樣模塊/採樣module.json
- 模塊/採樣模塊/採樣module.scss
- 模塊/採樣模塊/採樣module.js
從這個除了如果我們可以用一些通用的語法創建js文件就像
/*jslint forin: true, sloppy: true, unparam: true, vars: true, white: true, nomen: true, plusplus:true */
/*global window, document, jQuery, console */
/*
* sample-module.js
* [ Description of the sample module script ]
*
* @project: project
* @date: xxxx-xx-xx
* @author: Anuj Sachan, [email protected]
* @namespaces: sunSpr
*/
var sunSpr = window.sunSpr || {};
/**
* @namespace SampleModule
* @memberof sunSpr
* @property {null} property - description of property
*/
sunSpr.SampleModule = (function (window, $, namespace) {
'use strict';
// public methods
var init,
// private methods
_privateMethod,
// properties
property = null;
/**
* @method _privateMethod
* @description Description of _privateMethod
* @memberof sunSpr.SampleModule
*/
_privateMethod = function() {
return property;
};
/**
* @method init
* @description Description of init
* @memberof sunSpr.SampleModule
* @example
* sunSpr.SampleModule.init()
*/
init = function() {
return _privateMethod();
};
// Public API
return {
init: init
};
}(this, jQuery, 'sunSpr'));
jQuery(sunSpr.SampleModule.init());