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

electron-angular-toolkit-vnext

v0.0.26

Published

A tool which helps to build electron applications with angular2 - forked from electron-angular-toolkit

Downloads

5

Readme

Important!!!!

If you are upgrading from 0.0.3 please reinstall angular-cli first

electron-angular-toolkit

About

This package provides a command line tool, which is supposed to make the development of electron applications with angular2 as simple as possible.

This package was tested with [email protected]

Usage

Create the app

Create a new project with the angular-cli and navigate to the created folder:

ng new myapp
cd myapp

Install angular-electron-toolkit

npm install electron-angular-toolkit --save-dev

Run the prepare command, this will install some packages, modify the fieles: package.json, angular-cli.json, src/index.html and it will create an entry point(src/electron-main.js)

node_modules/.bin/electron-angular-toolkit prepare

Using the node/electron api

Using the node/electron api is quite easy, simply import the package you want to use, the electron-angular-toolkit provides a webpack-config which prevents webpack from trying to bundle those native modules

import * as os from 'os';
import * as electron from 'electron';
import { Component } from '@angular/core';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = `app works on ${os.platform()} with electron ${electron.remote.process.versions.electron}!`;
}

Run the application

The command

node_modules/.bin/electron-angular-toolkit build

will use the ng build command to bundle the application with webpack. A new bundle will be created each time you'll change your sourcecode. Now you can use

electron .

to launch the application. Using the build command with the -w option, will create a new build each time your sourcecode changes.

Publish the application

The command

node_modules/.bin/electron-angular-toolkit publish

will create a dist folder inside your project, which will contain the stand-alone-application and a setup file. Before publishing it is required to set the following fields in your package.json:

  • description
  • author
  • appId (is not required but should be used otherwise it will be "com.electron.{appname}") To get a build for a specific platform user -w (Windows), -l (Linux), -m (Mac)

Native modules

Some modules have to run in the node js process, to prevent them from getting bundled into the webpack bundle you can add them to your package.json:

{
 ...,
 "nativeModules": [
    "decompress"
  ],
  ....
}