Skip to content

A template to run a pear framework app directly through npm.

Notifications You must be signed in to change notification settings

Codesamp-Rohan/npm-pear-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm-pear-template

Welcome to the npm-pear-template, a streamlined solution for creating and distributing GUI applications using the Pear framework. This template is designed to help you build and publish your app to NPM, making it easily accessible with a single command on any system.


Features

  • Pre-configured Pear setup: Save time with a ready-to-use configuration.
  • Cross-platform deployment: Publish your app on NPM for universal usage.
  • Customizable structure: Modify HTML, CSS, and JavaScript to fit your needs.
  • Global execution: Run your app on any system using a custom command.

Getting Started

1. Clone the Template

Clone this repository and navigate to the project directory:

git clone https://github.com/Codesamp-Rohan/npm-pear-template.git
cd npm-pear-template

2. Install Dependencies

Ensure you have Node.js and the Pear framework installed. Then, install project dependencies:

npm install

3. Customize Your App

Start editing the files to make the application your own:

  • HTML: Edit index.html to define your app's structure.
  • CSS: Customize styles in styles.css.
  • JavaScript: Add functionality in script.js.

4. Test Locally

Run your app locally during development:

  • stage the app
  • edit the peer key
node app.js

5. Prepare for NPM:

Modify the package.json file for publishing:

  • Set the name field to your desired package name.
  • Update the bin field to specify the command users will use to run your app. Example:
"bin": {
   "your-command": "./app.js",
   "pearkey": "your-seed-key-here"
}

Ensure that gui.js initializes the Pear framework and loads index.html as the GUI.


6. Publish Your App

Publish your app to NPM:

npm login
npm publish

7. Install and Run Your App

After publishing, users can install your app globally via NPM:

npm install -g your-package-name

And run it using the specified command:

your-command

Project Structure

npm-pear-template/
├── bin
├    └── gui.js         # Main entry point for the app
├── src
├     ├── index.html     # App UI
├     ├── styles.css     # Styles for the app
├     └── script.js      # Logic for the app
├── package.json   # NPM configuration
├── README.md      # Documentation
└── node_modules/  # Dependencies

FOR EXAMPLE

Run:

npm i npm-pear-template -g

then run

npm-pear-template

Contributions

Contributions are welcome! Fork this repository, make changes, and submit a pull request. Let's build amazing GUI applications together! 😊


Contact

Have questions or suggestions? Reach out!

About

A template to run a pear framework app directly through npm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published