lsongdev / node-escpos

šŸ–Øļø ESC/POS Printer driver for Node.js
https://npmjs.org/escpos
Other
1.38k stars 423 forks source link

New release #397

Open yooouuri opened 2 years ago

yooouuri commented 2 years ago

Thanks for this package, but the release on npm is very outdated. 3.0.0-alpha.6 is released like 2 years ago.

Fixes like https://github.com/song940/node-escpos/pull/388 are not released on npm.

YovanggaAnandhika commented 2 years ago

@song940 yes, please release on npm repository

dohooo commented 2 years ago

How to set up this project? I want to publish it by myself. šŸ§

dohooo commented 2 years ago
lerna bootstrap
lerna run build

And throw this error

image
YovanggaAnandhika commented 2 years ago

@dohooo

for a temporary solution.

I forked the original escpos repository to my personal github like @see escposYovanggaanandhika. Change the my owncode.

and install it using the command


yarn add <git remote url>#<branch/commit/tag> installs a package from a remote git repository at specific git branch, git commit or git tag.
yarn add https://my-project.org/package.tgz installs a package from a remote gzipped tarball. ````
dohooo commented 2 years ago

@dohooo

for a temporary solution.

I forked the original escpos repository to my personal github like @see escposYovanggaanandhika. Change the my owncode.

and install it using the command

yarn add <git remote url>#<branch/commit/tag> installs a package from a remote git repository at specific git branch, git commit or git tag.
yarn add https://my-project.org/package.tgz installs a package from a remote gzipped tarball. ````

Thanks for you reply, but how do you build it?

YovanggaAnandhika commented 2 years ago

your compilation with typescript right ? escpos-adapter packages are not supported now or bypass with @ts-ignore on top code like this

@ts-ignore
import * as Adapter from "escpos-adapter";

Your can add the fork escpos-adapter in your repository and modification project sources code with your namespace in yarn or npm repository with npm login & npm publish after your change package.json file.

then add a declaration file .d.ts if your use for typescript.

dohooo commented 2 years ago

This project lacks maintenance, and I think I can refactor it using a newer technology stack. Such as pnpm workspace + ts. And improve the richer contribution document, so that people can easily join in.

YovanggaAnandhika commented 2 years ago

The answer can't. unless you ask the owner of this project to grant access because you want to be part of the owner of this repository.

Send Pull Request with repository you own with technology the workspace pnpm + ts

as you want design

sibelius commented 2 years ago

Send pull requests

gauravbordoloi commented 2 years ago

So many updated PR are there but the package is not published into NPM. How are we gonna use the latest code without building?

jimmy5312 commented 2 years ago

Can give some guide on how to "convert" the code into npm version? Made some fix and seems need to build before can publish into npm compatible

YovanggaAnandhika commented 2 years ago

Can give some guide on how to "convert" the code into npm version? Made some fix and seems need to build before can publish into npm compatible

  1. after your clone git with git clone <git-url> you can change name in package.json with your dependecies name for npm read this how to upload to npm

but you can't use the module name in this repository because you don't have access.

jimmy5312 commented 2 years ago

@YovanggaAnandhika I'm new to typescript and npm package. But I can see that the file structure at node_modules/escpos and the the file structure of this repo are not same. I made a fork and use this fork in my project, unable to work. That's why I wonder are the any intermediate steps to convert/compile the source code of this repo into the one similar that of the npm version.

dohooo commented 2 years ago

Iā€™m announcing the release of the ESC/POS driver! šŸš€ It is a fork of this library with some improvements. Thanks to the original author. And I'll bring more improvements in the future. #412

https://github.com/node-escpos/driver

PR welcome! šŸŽ‰