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

@toguro/cli

v1.0.46

Published

Toguro cli to create and manage custom apps

Downloads

35

Readme

License Commits

Toguro CLI

This is the CLI to create Toguro Apps.

Simplified Architecture

Architecture

Example of app

Assessment App that supports Javascript and Typescript

Instalation

npm install -g @toguro/cli

Basic commands

toguro --create-app name-of-app // this will add the toguro-app template to your current directory

toguro --generate-app-id // this will print a new app-id that can be used in your new app

ROADMAP

We are working on adding the following commands soon:

toguro --login // login to your dev account

toguro --publish // publish app to Toguro App Marketplace

toguro --create-client-app // create a client where you can test your app

Styling

As per Vue Documentation around custom elements, you can't really add a style tag inside the component without making it a custom element itself (meaning having it with .ce.vue extension). As far as I understood, after trying out a few things, you'd need to register each element separately with those extensions, or add the style inline`

The best structure I could come up with to allow code splitting and work with shadow root, was by injecting the css file in the component itself. (The default is using scss, but if you want to use something different you can play with the file globals.d.ts adding a declaration for your styling loader).

Here's how to inject it:

import { InjectCssInShadowRootFromString } from '@/helpers/css-injector';
import thisCss from './example.scss';

onMounted(() => {
  InjectCssInShadowRootFromString(thisCss);
});

How can I test and publish Apps in the meantime?

The project will be served in: http://localhost:3000/ You can access it directly to test the custom-app directly or you can clone our base client toguro-fe to test it being added in another structure.

You will see all the needed instructions to have it setup. It shouldn't take more than 5 minutes to get it up and running, tbh.

If you want to develop your own app that supports other apps being installed, you will have to build it yourself. Luckily you have toguro-fe with the basic structure already setup for this. You will need to take care of the app marketplace where you can allow others to publish apps to it. Those apps can be added to your main project by applying some simple business logic.

Deploying App to AWS

The created project is using AWS CDK to deploy/write the infrastructure

You will find the instructions on how to setup and deploy it inside of /stack/README.md in the just created app.

You can also checkout this REPO to learn more about the cli, templates and hopefully contribute to it <3.

If you already have AWS CLI configured and are already using AWS CDK in your aws account, you could pretty much just run cdk deploy --profile=the-profile-you-have inside /stack folder (Don't forget to run npm install inside of STACK folder before).

At this moment you will need to run npm run build manually in the root folder before publishing it.

NOTE: I don't have strong skills with devops stuff, so if you find things that could be improved in the stack, please open an issue or send me an email <3

I will be improving the stack to configure automated pipeline in the future (user will be able to choose from CLI what they want to include).


Any questions, comments and suggestions you can send an email to [email protected]