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

@flownet/lib-to-macos-app

v0.3.11

Published

This project provides a streamlined utility for creating a macOS application using Flownet. It assists in automating the process of transforming a source project into a macOS app package by leveraging existing templates and assets, making it easier for de

Downloads

1,145

Readme

@flownet/lib-to-macos-app

This project provides a streamlined utility for creating a macOS application using Flownet. It assists in automating the process of transforming a source project into a macOS app package by leveraging existing templates and assets, making it easier for developers to build macOS apps without starting from scratch.

How It Works

The utility functions by taking a set of parameters and existing source files, and then it processes these using a series of tasks. It renders templates with custom settings, copies necessary files, generates icons and launch screens, and finally compiles the application using Xcode tools.

Key Features

  • Template Rendering: Utilizes predefined templates to generate necessary project files.
  • Asset Generation: Automatically creates macOS app icons and launch screens.
  • Xcode Build Automation: Compiles the project using Xcode with appropriate configurations for easy deployment.
  • File Management: Manages the creation and cleanup of output and package directories.

Conclusion

The @flownet/lib-to-macos-app tool provides a straightforward approach to macOS app development by automating much of the setup and configuration process. This utility effectively supports developers looking to efficiently package their applications for macOS, reducing the need for extensive manual setup.

Developer Guide for @flownet/lib-to-macos-app

Overview

@flownet/lib-to-macos-app is a Node.js library designed to assist developers in converting a project directory into a functional macOS application. The library streamlines the packaging and building processes, focusing on seamless integration with your existing project setup. By leveraging this library, developers can automate the creation of macOS app icons, launch screens, and configure Xcode projects for distributed builds.

Installation

To use the library in your project, you can install it via npm or yarn:

npm install @flownet/lib-to-macos-app

or

yarn add @flownet/lib-to-macos-app

Usage

The primary usage of the library is through its main function, which orchestrates the transformation of your project assets into a macOS application package. Here's a basic example to demonstrate how to utilize this functionality in your Node.js environment:

import buildMacOSApp from '@flownet/lib-to-macos-app';

const params = {
  name: "my-macos-app",
  entry: "src/entry",
  id: "com.example.my-macos-app",
  version: "1.0.0",
  // Additional configuration parameters
};

const config = {
  // Application-specific configuration
};

const src = "/path/to/source";
const dest = "/path/to/destination";

(async () => {
  try {
    await buildMacOSApp({
      params,
      config,
      src,
      dest
    });
    console.log('macOS app created successfully.');
  } catch (error) {
    console.error('Error creating macOS app:', error);
  }
})();

Examples

Here are a few scenarios demonstrating how you might use the library:

Basic Setup

await buildMacOSApp({
  params: {
    name: "simple-app",
    entry: "app/macos"
  },
  src: "/source/directory",
  dest: "/output/directory"
});

Advanced Configuration

await buildMacOSApp({
  params: {
    name: "advanced-app",
    entry: "app/entry",
    id: "com.advanced.app",
    version: "2.0.0",
    author: "Advanced Developer",
    description: "An advanced macOS application",
    code_sign_identity: "Apple Development",
    development_team: "TEAMID123"
  },
  config: {
    // Additional configuration options
  },
  src: "/advanced/source",
  dest: "/advanced/output"
});

In these examples, the library automates the rendering of templates, the copying of distribution files, creation of icons and launch screens, and the building of the application using Xcode tools.

Acknowledgement

This library integrates functionalities from various components within the Flownet ecosystem, such as @flownet/lib-create-ios-icons, @flownet/lib-create-ios-launch-screens, and @flownet/lib-render-templates-dir. It also utilizes @fnet/xcode-cert-inspector to ascertain code-signing details necessary for app creation. Their contributions are invaluable for ensuring a smooth app-building process.

Input Schema

$schema: https://json-schema.org/draft/2020-12/schema
type: object
properties:
  params:
    type: object
    properties:
      name:
        type: string
        description: Application name
        default: macos-app
      entry:
        type: string
        description: Entry point for the application
        default: app/macos
      id:
        type: string
        description: Application identifier
        default: com.example.macos-app
      version:
        type: string
        description: Application version
        default: 0.1.0
      title:
        type: string
        description: Application title
        default: macOS App
      package_name:
        type: string
        description: Package name
      author:
        type: string
        description: Application author
        default: Flownet
      description:
        type: string
        description: Application description
        default: macOS App built with Flownet
      vendor:
        type: string
        description: Application vendor
        default: flownet.ai
      include_css:
        type: boolean
        description: Include CSS option status
      bundle_name:
        type: string
        description: Bundle name
      package_dir:
        type: string
        description: Directory for the package
      code_sign_identity:
        type: string
        description: Code sign identity
        default: Apple Development
      code_sign_style:
        type: string
        description: Code sign style
        default: Automatic
      development_team:
        type: string
        description: Development team ID
      product_bundle_identifier:
        type: string
        description: Product bundle identifier
      product_name:
        type: string
        description: Product name
      out_dir:
        type: string
        description: Output directory
  config:
    type: object
    description: Configuration object
  src:
    type: string
    description: Source directory
  dest:
    type: string
    description: Destination directory