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

@centrid/theia-installer-creator

v1.39.2

Published

Package for building/packaging a Apache theia project into an installer on different platforms

Downloads

1

Readme

Theia Installer Creator

Create installers for Apache Theia projects.

Please Note:

  • This project is maintained on GitLab.

The Theia Installer Creator is a library that serves as an electron-builder wrapper for Theia projects. It enables you to create installers for standard Theia projects with minimal configuration.

Additionally, this package utilizes the Native Module Prebuilds Creator, which embeds all the required native dependencies for Windows and Linux, specifically for electron versions v23, v24, and v25 (Mac is currently not supported by default). This means that you can cross-build between Linux and Windows (given that no additional native dependencies are needed beyond the default).

Notes:

  • The major and minor version number of this package is associated with the version of Apache Theia this version is compatible with. i.e if the version of theia-installer-creator is 1.39.23, then the version of Apache Theia it's compatible with is version 1.39.x.
  • This package default settings assumes the project structure specified here. The easiest way to obtain that structure is by using Apache Theia's code generator.
  • The package assumes that all the extensions (e.g custom extensions) your electron app is referencing have already been built (i.e there is a lib folder with the latest changes). If you used Apache Theia's code generator, you just need to run npm run prepare before using the Theia-install-creator.
  • If you need additional native dependencies (e.g., for Mac), you can create your own using the Native Module Prebuilds Creator package and include them in the build process. Refer to the package's homepage for instructions.

Installation

npm install @centrid/theia-installer-creator

or

yarn add @centrid/theia-installer-creator

Usage

This package can be used through its CLI interface or through its programmatic API (although CLI usage is preferred).

CLI Usage

npx theia-installer-creator <options>

| CLI | Default | Description | Required | | --- | --- | --- | --- | | --projectDir | process.cwd() | Root project directory. Please Note: This has to be the parent of the electron-app folder/monorepo | No | | --configPath | path.join(${projectDir}, 'theia-installer-creator-config.js') | Path of the configuration to use | No | | --mode | production | Webpack mode to use when package the theia project. Production or development | No | | --electronAppPath | electron-app | Path to the electron-app monorepo | No | | --mergeElectronAppPackageJson | true | Specify if the electron-app package.json details should be merged with the main package.json found in the root of the project | No |

Configuration

The Theia Installer Creator uses a configuration file that is a superset of the electron-builder CliOptions (these options are passed directly to electron-builder, with some modifications). This means that any configuration you can use with electron-builder can be specified within the configuration.

The Theia Installer Creator also has specific configuration options. Here are the details:

  • installerTargets: An alternate way to specify targets using a plain object (instead of passing an electron-builder Platform Map). Note that if both targets and installerTargets are specified, the targets value will be used.
  • electronAppPath: Path to the electron-app monorepo (default: 'electron-app').
  • mergeElectronAppPackageJson: Specify if the electron-app package.json details should be merged with the main package.json found in the root of the project (default: false).
  • webpackBuildArgs: Extra webpack args to use when building the theia app. e.g ["--color"]

Note: CLI options override values specified in the configuration.

Configuration Example

Create a theia-installer-creator-config.js file with the following content:

module.exports = {
    config: {
        win: {
            target: "nsis"
        },
        files: [
            "myFiles"
        ],
        extraMetadata: {
            distributionVersion: "Lite",
        }
    },
    installerTargets: [
        {
            platform: "win",
            arch: [
                {
                    name: "x64",
                    type: ["nsis"]
                }
            ]
        },
        {
            platform: "linux",
            arch: [
                {
                    name: "x64",
                    type: ["snap"]
                }
            ]
        }
    ]
};

Contributing

Theia Installer Creator is an open-source project, and contributions are welcome. If you have a bug fix, please create a pull request explaining the bug, how you fixed it, and how you tested it.

If you want to add a new feature, please create an issue with the "enhancement" label. Provide details about the new feature and why you think it's needed. We will discuss it there, and once it's agreed upon, you can create a pull request with the highlighted details.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.