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

monaco-typescript-project-util

v0.1.2

Published

attempt to see if and how much we can run typescript compiler in the browser

Downloads

11

Readme

typescript-project-monaco-editor-browser-utils

Easy to use APIs and tools to quickly implement and launch a TypeScript project editor based on monaco-editor, 100% in the browser.

Features and objectives:

  • very simple and agnostic Project API (monaco doesn't have)
  • tools to handle typescript language service API , load tsconfig, libraries, types from nopkg cdn, navigation between files, etc
  • framework to leverage monaco-editor loading, both 100% local or from cdn
  • minimal devtools to build production
  • 100% static pages running in the browser.
  • basic widgets to represent file tree, workbench, actions, etc
  • this is not about using/ implementing language services, etc in the browser, but just leveraging monaco-typescript so is easier to implement TypeScript Project editors in the browsers
  • objective : move / the things currently on src/common to here. remove non necessary dependencies
  • objective : should be able to use it in typescript-compiler-playground - while I cannot run ts-simple-ast in the browser I can still develop the entire proect in the broser an run it in the server.

Usage

should be very simple to generate a working project editor like this:

npm install typescript-project-monaco-editor-browser-utils
import ProjectEditor from 'typescript-project-monaco-editor-browser-utils'
new ProjectEditor({simple: config, or: nothing})
< script src="bundle.js">
http-server static && firefox localhost:8080

Monaco-editor loading:

2 modalities : we could load everything from cdn (very lightweight html + bundle.js or we coudl havemost of the files in localhost (probably will require n extra step of running a script node companion-script --output static that basically copy files from node_modules to static folder

candombed - based on typescript-project-monaco-editor-browser-utils, more end-user product for a "project - editor"

  • the experience should be similar as previous but this time the editor is opinionated and prettier. check dependencies and @types using https://data.jsdelivr.com/v1/package/npm/@types/node or unpkg for example - given dependency [email protected] we first try https://data.jsdelivr.com/v1/package/npm/@types/[email protected] and if not found we fetch all deps https://data.jsdelivr.com/v1/package/npm/@types/shell and get the latest or the closest one - ake a library for this.

TODO

  • export the 'monaco' namespace so users doesn't have to install it and also we amke sure they use the same version as us.
  • provide html loader snippets for : external CDN and local node_modules. Also using AMD and ESM bundled monacos
  • an example using monaco loader local - an example uusing monaco loaders getString to generate the html as template at compile-time.
  • and example u sing listfile (treeview)
  • umd distro so existing apps that doesnt use browserify/typescript can use me. and an example of this.