README
skk-uui-create
used in undunion for creating router、 service、directive more easily。
Example
1.install
npm install -g skk-uui-create
2.create a config file named uui.config.js in root directory, like below
module.exports = {
test: {
entryHtml: 'test.html',
entryDir: 'test',
routerUrl: 'test/router/',
routerEntryUrl: 'test/router/entry.js',
serviceUrl: 'test/service/',
directiveUrl: 'test/directive/',
},
demo: {
entryHtml: 'demo.html',
entryDir: 'demo',
routerUrl: 'demo/router/',
routerEntryUrl: 'demo/router/entry.js',
serviceUrl: 'demo/service/',
directiveUrl: 'demo/directive/',
}
}
add anchor in entryHtml
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<!--uui-template-router-->
<!--uui-template-service-->
<!--uui-template-directive-->
</body>
</html>
3.type following code in cmd
uui create
4.It will ask you some questions:
step1: please choose createType
service
router
directive
step2: please choose project
demo
test
step3: please choose saved file dir
step4: please input name