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

ngx-stackblitz

v0.3.0

Published

StackBlitz editor component for Angular

Downloads

19

Readme

NgxStackblitz

Embed StackBlitz editor. See https://stackblitz.com/docs for more details.

npm install @stackblitz/sdk ngx-stackblitz

Create New Project

files = {
 'index.html': '<h1>My Test Page</h1>',
 'index.js': 'console.log("my test")'
}
<ngx-stackblitz-editor 
    [files]="files" 
    title="My test project"
    description="Just a test"
    template="javascript"
    (changed)="saveTree($event)"></ngx-stackblitz-editor>

Editor API

| Name | Description | | ---- | ----------- | | @Input() files: {[path: string]: string}; | List of files to add to the project | | @Input() title: string; | Project title | | @Input() description: string; | Project description | | @Input() template: 'angular-cli' / 'create-react-app' / 'typescript' / 'javascript'; | Type of project to create | | @Input() tags?: string[]; | Project tags | | @Input() dependencies?: {[name: string]: string}; | NPM dependencies | | @Input() settings?: any; | Stackblitz Settings | | @Input() openFile: string; | Path to file that should open initially | | @Input() view: string; | (preview / editor) editor view | | @Input() height: string; | Editor height, defaults to 100% | | @Input() width: string; | Editor width, defaults to 100% | | @Input() hideExplorer: boolean; | Hide the file explorer, defaults to false | | @Input() hideNavigation: boolean; | Hide the editor nav, defaults to false | | @Input() fileReadInterval: number; | Interval (milliseconds) to poll editor for changes, defaults to every second | | @Output() changed: EventEmitter<EditorChangeEvent> | emitted every time the tree changes | | @Output() loaded: EventEmitter<EditorFile[]> | emitted when the tree is loaded | | @Output() created: EventEmitter<EditorFile> | emitted when a file is created | | @Output() updated: EventEmitter<EditorFile> | emitted when a file is updated | | @Output() deleted: EventEmitter<EditorFile> | emitted when a file is deleted |

REQUIRED FILES FOR TEMPLATES

| Template | Files | | -------- | ----- | | angular-cli | Requires index.html and main.ts to be present | | create-react-app | Requires index.html and index.js to be present | | typescript | Requires index.html and index.ts to be present | | javascript | Requires index.html and index.js to be present |

Embed GithubProject

<ngx-stackblitz-editor 
    repo="dig-platform/plugin-template" 
    (changed)="saveTree($event)"></ngx-stackblitz-editor>

Editor API

| Name | Description | | ---- | ----------- | | @Input() repo: string; | github repo path ie: dig-hub/my-plugin | | @Input() openFile: string; | Path to file that should open initially | | @Input() view: string; | (preview / editor) editor view | | @Input() height: string; | Editor height, defaults to 100% | | @Input() width: string; | Editor width, defaults to 100% | | @Input() hideExplorer: boolean; | Hide the file explorer, defaults to false | | @Input() hideNavigation: boolean; | Hide the editor nav, defaults to false | | @Input() fileReadInterval: number; | Interval (milliseconds) to poll editor for changes, defaults to every second | | @Output() changed: EventEmitter<EditorChangeEvent> | emitted every time the tree changes | | @Output() loaded: EventEmitter<EditorFile[]> | emitted when the tree is loaded | | @Output() created: EventEmitter<EditorFile> | emitted when a file is created | | @Output() updated: EventEmitter<EditorFile> | emitted when a file is updated | | @Output() deleted: EventEmitter<EditorFile> | emitted when a file is deleted |

Embed Existing Project

<ngx-stackblitz-editor 
    projectID="my-project" 
    (changed)="saveTree($event)"></ngx-stackblitz-editor>

Open existing project

| Name | Description | | ---- | ----------- | | @Input() projectID: string; | Stackblitz project ID | | @Input() openFile: string; | Path to file that should open initially | | @Input() view: string; | (preview / editor) editor view | | @Input() height: string; | Editor height, defaults to 100% | | @Input() width: string; | Editor width, defaults to 100% | | @Input() hideExplorer: boolean; | Hide the file explorer, defaults to false | | @Input() hideNavigation: boolean; | Hide the editor nav, defaults to false | | @Input() fileReadInterval: number; | Interval (milliseconds) to poll editor for changes, defaults to every second | | @Output() changed: EventEmitter<EditorChangeEvent> | emitted every time the tree changes | | @Output() loaded: EventEmitter<EditorFile[]> | emitted when the tree is loaded | | @Output() created: EventEmitter<EditorFile> | emitted when a file is created | | @Output() updated: EventEmitter<EditorFile> | emitted when a file is updated | | @Output() deleted: EventEmitter<EditorFile> | emitted when a file is deleted |

Interfaces

export interface EditorFile {
  path: string;
  content: string;
  status?: string;
}
export interface EditorChangeEvent {
  tree: EditorFile[];
  created?: EditorFile[];
  updated?: EditorFile[];
  deleted?: EditorFile[];
}