npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@uteamjs/template

v1.0.16

Published

Template for creation and generation of @uteamjs application

Downloads

839

Readme

@uteamjs/template bootstrap the creation of React-Redux & Node.js application and packages by providing the following templates:

Installation

@uteamjs/template is installed under the uteam cli node_modules folder. Install the uteam cli automatically install the template.

$ npm install -g uteam

React Template

react-application

Default application template for using in uteam create application. Run the following command to create @uteamjs/react application:

$ uteam create --application <application name>

The following directory will be created under your <project_folder>:

./<application name>/
    node_modules/
        @uteamjs/react  
        <react, redux, react-router... etc>

    packages/
        main/
            config/
            ...
            src/
                index.js
            package.json

    package.json

packages/main is the only package bundled with the application created which is the entry point of the application.

The index.js is the layout container with:

  • Top logo and menu bar.
  • Responsive side tree menu .
  • Toastify messages.

react-packages

Default package template for adding your customer modules. Run the following command to create single or multiple packages:

$ uteam create --packages <packages name1> <packages name2> --generate

Note: --generate automatically run uteam generate to create the JSX files.

Change to ...packages/main folder, then start the webpack development server:

$ npm start

Open your browser with URL http://localhost:3000, then click the Get Started link:

Get Started

Each item on the top menu bar represents one package.

Each package has its own tree menu which can be customized through the app.yaml file.

react-redux

There are four template files used for YAML generation of JSX code:

  • modules.js - An index file for exporting all the components in the package.
import { lazy } from 'react'
 
/*route*/
/*popRoute*/

Note: The /* … */ comment statements are insertion points for code generation. Please do not delete or change the statement.

When exports switch enabled in YAML, the following pair of files are being used:

  • init.js - File for user to insert custom code.
  • exports.js - File for generation of _reducer object and _layout class to be exported.

Otherwise use the following file: page.js - File for creating single page components.

Node.js Template

node-application

Default application template for creating @uteamjs/node application. Run the following command to create application:

$ uteam create -a <application name> -t node-application

The follow folders are created:

/<project_folder>/tutorial-node/
    ...
    packages/
        main/
            config.json
            package.json
            server.js

The server.js is the main entry point of the server application. Change to ...packages/main folder, then start the server using command:

$ node server

To build server packages, you can just add Restful API component.js files under each package folder.

/<project_folder>/tutorial-node/
    ...
    packages/
        main/
        <package 1>
            <component 1>.js
            <component 2>.js

Examples Template

yaml-examples

Batch of examples to illustrate YAML code generation. Run the follow command to add to your application:

$ uteam create -p yaml-examples -t yaml-examples -g

Note: The package name must be yaml-examples otherwise some broken link may appear.

YAML Examples

yaml-crud

A full example with the following features:

  • Complete CRUD operation with minimal JSX code
  • Support co-exist of YAML and JSX code
  • Add-on JSX code will not be overwritten in re-generation

Please refer to the YAML CRUD tutorial for a full explanation.

Run the follow command to add yaml-crud package to your application:

$ uteam create -p crud -t yaml-crud -g

CRUD

yaml-crud-api

Similar to the yaml-crud except the CRUD action will be fetched to the backend API server.

CRUD api

For frontend package, run the following command to add crud-api package to your application:

$ uteam create -p crud-api -t yaml-crud-api -g

node-crud-api

Backend package to handle CRUD requests from the yaml-crud-api frontend. Run the following command UNDER the @uteamjs/node application created above:

$ uteam create -p crud-api -t node-crud-api

Note: --generation option is not required for backend application.

Please refer to the CRUD API tutorial for a full explanation.

Template Update

Since 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:

$ uteam template --update

Note: npm update -g uteam may be update the @uteamjs/template.

License

MIT