Giter VIP home page Giter VIP logo

helloworld.js's Introduction

helloworld.js Node.js logo

a hello world program written in JavaScript

Introduction

The goal of this project is to create a homebrew formula from JavaScript.

Project Structure

.
├── index.js # entry point of the package
├── package.json
├── dist
│   ├── # compiled files
│   └── # .tar.gz file
└── build
    └── index.js # converted file from package into single js file 

Prerequisites

Required Tools

  • Node.js v18 is recommended (v20 not compatible with pkg officially)
  • ncc is a simple CLI for compiling a Node.js module into a single file, together with all its dependencies, gcc-style.
    • npm install -g @vercel/ncc is required to compile the package into single file for pkg to work
  • pkg is a command line tool for creating executables from Node.js programs
    • npm install -g @vercel/pkg is required to create a standalone executable file from the package
    • for node v20, use npm install -g @yao-pkg/pkg instead

Instructions

  1. create package's repository on GitHub

create a new repository on GitHub or using git init command to create a new repository locally.

$ git init
$ git add .
$ git commit -m "Initial commit"
$ git remote add origin <url>
$ git push -u origin master

or create a new github repository from gh command line tool

$ gh repo create helloworld.js
  1. create a package.json file
$ npm init -y
  1. create a index.js file

Write a simple hello world program in index.js file.

console.log('Hello, World!');
  1. create compiled script
$ npm run build && npm run package
  1. create tar.gz file for release
$ mkdir dist # if not exists
$ npm run tar
  1. create a release on GitHub
$ gh release create <tag> dist/<tar.gz file>

Release via Homebrew Formula

please visit Homebrew for more information on how to create a formula for your package.


Need assistance? Check out my discussion board or review the GitHub status page.

© 2023 AppleBoiy • Code of ConductMIT License

helloworld.js's People

Contributors

appleboiy avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.