{"analyzedAt":"2022-07-05T00:51:48.334Z","collected":{"metadata":{"name":"@uteamjs/template","scope":"uteamjs","version":"1.0.16","description":"Template for creation and generation of @uteamjs application","keywords":["Template","YAML","React","Redux","Nodejs","Express"],"date":"2021-11-07T13:16:30.109Z","author":{"name":"u.team"},"publisher":{"username":"uteamjs","email":"charles@u.team"},"maintainers":[{"username":"uteamjs","email":"charles@u.team"}],"repository":{"type":"git","url":"git+https://github.com/uteamjs/uteam-template.git"},"links":{"npm":"https://www.npmjs.com/package/%40uteamjs%2Ftemplate","homepage":"https://u.team","repository":"https://github.com/uteamjs/uteam-template"},"license":"MIT","releases":[{"from":"2022-06-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":0},{"from":"2022-04-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":1},{"from":"2022-01-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":1},{"from":"2021-07-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":18},{"from":"2020-07-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":18}],"readme":"[@uteamjs/template](https://u.team/document/template) bootstrap the creation of **React-Redux** & __Node.js__ application and packages by providing the following templates:\n- React & Node.js Application template for use in [uteam create application](https://u.team/document/cli#create)\n- React Package template for use in [uteam create packages](https://u.team/document/cli#create)\n- Example templates for use in [Tutorial section](https://u.team/document/tutorial/helloworld)\n- Individual file template for [YAML uteam generation](https://u.team/document/yaml/overview#uteam-generate)\n\n# Installation\n**@uteamjs/template** is installed under the [uteam cli](https://u.team/document/cli) __node_modules__ folder.  Install the __uteam cli__ automatically install the template.\n```\n$ npm install -g uteam\n```\n\n# React Template\n## react-application\nDefault application template for using in __uteam create application__. Run the following command to create [@uteamjs/react](https://u.team/document/uteam-react/overview) application:\n```\n$ uteam create --application <application name>\n```\nThe following directory will be created under your <project_folder>:\n```\n./<application name>/\n    node_modules/\n        @uteamjs/react  \n        <react, redux, react-router... etc>\n\n    packages/\n        main/\n            config/\n            ...\n            src/\n                index.js\n            package.json\n\n    package.json\n```\n__packages/main__ is the only package bundled with the application created which is the entry point of the application.   \n\nThe __index.js__ is the layout container with:\n- Top logo and menu bar.\n- Responsive side tree menu .\n- Toastify messages.\n## react-packages\nDefault package template for adding your customer modules.  Run the following command to create single or multiple packages:\n```\n$ uteam create --packages <packages name1> <packages name2> --generate\n```\nNote: --generate automatically run [uteam generate](https://u.team/document/cli#generate) to create the JSX files.\n\nChange to __...packages/main__ folder, then start the webpack development server:\n```\n$ npm start\n```\nOpen your browser with URL http://localhost:3000, then click the __Get Started__ link:\n\n![Get Started](https://u.team/assets/img/kix.sznz2xcqhgjb.png)\n\nEach item on the top menu bar represents one package.  \n\nEach package has its own tree menu which can be customized through the [app.yaml file](https://u.team/document/yaml/appyaml). \n## react-redux\nThere are four template files used for YAML generation of JSX code:\n\n- **modules.js** - An index file for exporting all the components in the package.\n```jsx\nimport { lazy } from 'react'\n \n/*route*/\n/*popRoute*/\n```\nNote: The /* … */ comment statements are insertion points for code generation. Please do not delete or change the statement.\n\nWhen exports switch enabled in YAML, the following pair of files are being used:\n- **init.js** - File for user to insert custom code.\n- **exports.js** - File for generation of _reducer object and _layout class to be exported.\n\nOtherwise use the following file:\n__page.js__ - File for creating single page components.\n\n# Node.js Template\n## node-application\nDefault application template for creating [@uteamjs/node](https://u.team/document/uteam-node/overview) application.  Run the following command to create application:\n```\n$ uteam create -a <application name> -t node-application\n```\nThe follow folders are created:\n```\n/<project_folder>/tutorial-node/\n    ...\n    packages/\n        main/\n            config.json\n            package.json\n            server.js\n```\nThe __server.js__ is the main entry point of the server application.   Change to __...packages/main__ folder, then start the server using command:\n```\n$ node server\n```\nTo build server packages, you can just add [Restful API](https://u.team/document/uteam-node/api) component.js files under each package folder.\n```\n/<project_folder>/tutorial-node/\n    ...\n    packages/\n        main/\n        <package 1>\n            <component 1>.js\n            <component 2>.js\n```\n\n# Examples Template\n## yaml-examples\nBatch of examples to illustrate __YAML code generation__. Run the follow command to add to your application:\n```\n$ uteam create -p yaml-examples -t yaml-examples -g\n```\nNote: The package name must be yaml-examples otherwise some broken link may appear.\n\n![YAML Examples](https://u.team/assets/img/kix.k452tyxghxfs.png)\n\n## yaml-crud \nA full example with the following features:\n- Complete CRUD operation with minimal JSX code\n- Support co-exist of YAML and JSX code\n- Add-on JSX code will not be overwritten in re-generation\n\nPlease refer to the [YAML CRUD tutorial](https://u.team/document/tutorial/crud) for a full explanation.\n\nRun the follow command to add **yaml-crud** package to your application:\n```\n$ uteam create -p crud -t yaml-crud -g\n```\n![CRUD](https://u.team/assets/img/kix.tbr16n77h14y.png)\n## yaml-crud-api\nSimilar to the yaml-crud except the CRUD action will be fetched to the backend API server. \n\n![CRUD api](https://u.team/assets/img/kix.z7pqrddqn169.png)\n\nFor frontend package, run the following command to add **crud-api** package to your application:\n```\n$ uteam create -p crud-api -t yaml-crud-api -g\n```\n## node-crud-api\nBackend package to handle CRUD requests from the yaml-crud-api frontend. Run the following command UNDER the @uteamjs/node application created above:\n```\n$ uteam create -p crud-api -t node-crud-api\n```\nNote: **--generation** option is not required for backend application.\n\nPlease refer to the [CRUD API tutorial](https://u.team/document/tutorial/crudapi) for a full explanation.\n\n# Template Update\nSince the **@uteamjs/template** is installed in the npm global folder, it is hard to locate the directory for updating.  The update process is executed through the **uteam cli** as follows:\n```\n$ uteam template --update\n```\nNote: **npm update -g uteam** may be update the **@uteamjs/template**.\n\n# License\n[MIT](LICENSE)"},"npm":{"downloads":[{"from":"2022-07-04T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":0},{"from":"2022-06-28T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":6},{"from":"2022-06-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":12},{"from":"2022-04-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":156},{"from":"2022-01-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":284},{"from":"2021-07-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":897}],"starsCount":0},"github":{"homepage":"https://u.team","starsCount":1,"forksCount":0,"subscribersCount":1,"issues":{"count":0,"openCount":0,"distribution":{"3600":0,"10800":0,"32400":0,"97200":0,"291600":0,"874800":0,"2624400":0,"7873200":0,"23619600":0,"70858800":0,"212576400":0},"isDisabled":false},"contributors":[{"username":"uteamjs","commitsCount":1}],"commits":[{"from":"2022-06-28T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":0},{"from":"2022-06-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":1},{"from":"2022-04-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":1},{"from":"2022-01-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":1},{"from":"2021-07-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":15}]},"source":{"files":{"readmeSize":5943,"testsSize":0}}},"evaluation":{"quality":{"carefulness":0.71,"tests":0,"health":1,"branding":0.4},"popularity":{"communityInterest":3,"downloadsCount":52,"downloadsAcceleration":-0.7343226788432267,"dependentsCount":0},"maintenance":{"releasesFrequency":0.8336472602739726,"commitsFrequency":0.4701027397260274,"openIssues":0.7,"issuesDistribution":0.7}},"score":{"final":0.5428910629984729,"detail":{"quality":0.6096532652033106,"popularity":0.03138780807149278,"maintenance":0.9971695731784493}}}