Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packageリリーススクリプト搭載 #2

Open
wants to merge 29 commits into
base: 1.1.5-custom
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4180ed3
反映を確かめるため一部修正
Takizawa-Zawao Jun 29, 2023
26caa5e
packageのpublishを試す
Takizawa-Zawao Jun 29, 2023
98f6a4a
publishのactionsを修正
Takizawa-Zawao Jun 29, 2023
dd27833
packageを修正
Takizawa-Zawao Jun 29, 2023
e7f0a4f
publish設定を修正
Takizawa-Zawao Jun 29, 2023
0b8d262
publish設定を修正
Takizawa-Zawao Jun 29, 2023
8b65c94
パッケージ名を修正
Takizawa-Zawao Jun 30, 2023
a0b22ea
スクリプトを修正
Takizawa-Zawao Jun 30, 2023
1f8b7e7
パッケージ名を修正
Takizawa-Zawao Jun 30, 2023
ad27d4a
パッケージ名を再修正
Takizawa-Zawao Jun 30, 2023
4445432
publishConfigを修正
Takizawa-Zawao Jun 30, 2023
640e288
publishConfigを再修正
Takizawa-Zawao Jun 30, 2023
c33c9d2
package.jsonを再修正
Takizawa-Zawao Jun 30, 2023
dcc6a0c
publishConfigなどを修正
Takizawa-Zawao Jun 30, 2023
ee9c303
actionsの不備を修正
Takizawa-Zawao Jun 30, 2023
fe07ef3
repository設定を修正
Takizawa-Zawao Jun 30, 2023
44b5255
private設定を修正
Takizawa-Zawao Jun 30, 2023
4f4b71e
scopeを明示
Takizawa-Zawao Jun 30, 2023
8ce123e
パッケージ名を変更
Takizawa-Zawao Jun 30, 2023
cefd764
いったんpublicに
Takizawa-Zawao Jun 30, 2023
5836365
バージョンを上げた
Takizawa-Zawao Jun 30, 2023
c06846e
明示的にpublicに
Takizawa-Zawao Jun 30, 2023
420ffde
urlを変更
Takizawa-Zawao Jun 30, 2023
b1ef5d0
バージョンを上げた
Takizawa-Zawao Jun 30, 2023
d3ada6e
パッケージを個別にデプロイするよう修正
Takizawa-Zawao Jun 30, 2023
98bc9d1
バージョンを修正
Takizawa-Zawao Jun 30, 2023
0035731
importなどのパッケージ名を修正
Takizawa-Zawao Jun 30, 2023
33ebab2
Merge branch '1.1.5-custom' into text-schema-overflow
Takizawa-Zawao Jul 4, 2023
2a1b37c
マージ失敗箇所を修正
Takizawa-Zawao Jul 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ body:
label: Your Environment
description: A clear and concise description of your environment
value: |
- pdfme package(@pdfme/generator or @pdfme/ui):
- pdfme package(@lisb/pdfme-generator or @lisb/pdfme-ui):
- pdfme version:
- Operating system:
- Node.js version or Browser name & version:
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Publish custom pdfme package

on:
push:
branches:
- 1.1.5-custom

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 19
registry-url: https://npm.pkg.github.com/
scope: '@lisb'
always-auth: true

- name: install root
run: npm install

- name: install common
run: npm install
working-directory: packages/common

- name: install ui
run: npm install
working-directory: packages/ui

- name: install generator
run: npm install
working-directory: packages/generator

- name: build all
run: npm run build

- name: publish common
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: packages/common

- name: publish generator
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: packages/generator

- name: publish ui
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: packages/ui
14 changes: 7 additions & 7 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ Make sure that any changes are output to the each packages's `dist` folder.
```

To confirm the changes, for example, create a React application with `npx create-react-app my-app` in other folder and
Install `@pdfme/generator` and `@pdfme/ui` with the following command.
Install `@lisb/pdfme-generator` and `@lisb/pdfme-ui` with the following command.

```cmd
[in my-app dir] $ npm install --save @pdfme/generator @pdfme/ui
[in my-app dir] $ npm install --save @lisb/pdfme-generator @lisb/pdfme-ui
```

In addition, connect `packages/generator` and `packages/ui`, which you npm linked above, to my-app with the following command

```cmd
[in my-app dir] $ npm link @pdfme/generator @pdfme/ui
[in my-app dir] $ npm link @lisb/pdfme-generator @lisb/pdfme-ui
```

> If you don't want to prepare my-app by yourself, you can clone the following repository and use npm link @pdfme/generator @pdfme/ui to develop it.
> If you don't want to prepare my-app by yourself, you can clone the following repository and use npm link @lisb/pdfme-generator @lisb/pdfme-ui to develop it.
> https://github.com/pdfme/pdfme-playground

You can use `npm ls` to check if the `npm link` is configured correctly as follows.

```cmd
[in my-app dir] $ npm ls
my-app@0.1.0 /Users/user/my-app
├── @pdfme/generator@npm:generator@1.0.0-beta.7 extraneous -> ./../../../pdfme/packages/generator
├── @pdfme/ui@npm:ui@1.0.0-beta.7 extraneous -> ./../../../pdfme/packages/ui
├── @lisb/pdfme-generator@npm:generator@1.0.0-beta.7 extraneous -> ./../../../pdfme/packages/generator
├── @lisb/pdfme-ui@npm:ui@1.0.0-beta.7 extraneous -> ./../../../pdfme/packages/ui
├── @testing-library/jest-dom@5.16.2
├── @testing-library/react@12.1.2
├── @testing-library/user-event@13.5.0
Expand All @@ -49,6 +49,6 @@ my-app@0.1.0 /Users/user/my-app
└── web-vitals@2.1.4
```

Now, changes in `packages/common`, `packages/generator`, and `packages/ui` will be reflected in my-app's @pdfme/generator and @pdfme/ui.
Now, changes in `packages/common`, `packages/generator`, and `packages/ui` will be reflected in my-app's @lisb/pdfme-generator and @lisb/pdfme-ui.

If you run npm run start on my-app and rewrite `packages/common`, `packages/generator`, and `packages/ui`, you can confirm the changes on my-app
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<a href="https://github.com/pdfme/pdfme/actions/workflows/nodejs.yml">
<img src="https://github.com/pdfme/pdfme/workflows/Unit%20Testing/badge.svg" alt="Unit Testing status" />
</a>
<a href="https://www.npmjs.com/package/@pdfme/generator">
<img src="https://img.shields.io/npm/v/@pdfme/generator.svg" alt="Current npm package version." />
<a href="https://www.npmjs.com/package/@lisb/pdfme-generator">
<img src="https://img.shields.io/npm/v/@lisb/pdfme-generator.svg" alt="Current npm package version." />
</a>
<a href="https://npmcharts.com/compare/@pdfme/common?minimal=true">
<img src="https://img.shields.io/npm/dm/@pdfme/common.svg" alt="Downloads per month on npm." />
<a href="https://npmcharts.com/compare/@lisb/pdfme-common?minimal=true">
<img src="https://img.shields.io/npm/dm/@lisb/pdfme-common.svg" alt="Downloads per month on npm." />
</a>
<a href="https://pdfme.com/help#contribution">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
Expand Down Expand Up @@ -59,23 +59,23 @@ There are two packages in pdfme, generator and UI.
The package for generating PDF can be installed with the following command.

```
npm i @pdfme/generator
npm i @lisb/pdfme-generator
```

The packages for using PDF designer, forms and viewers can be installed with the following commands.

```
npm i @pdfme/ui
npm i @lisb/pdfme-ui
```

The following type, function and classes are available in pdfme.

`@pdfme/generator`
`@lisb/pdfme-generator`

- [generate](https://pdfme.com/docs/getting-started#generator)
- [Template](https://pdfme.com/docs/getting-started#template)

`@pdfme/ui`
`@lisb/pdfme-ui`

- [Designer](https://pdfme.com/docs/getting-started#designer)
- [Form](https://pdfme.com/docs/getting-started#form)
Expand All @@ -85,11 +85,11 @@ The following type, function and classes are available in pdfme.
If your environment uses webpack, import the necessary items as shown below.

```ts
import { Template, generate } from '@pdfme/generator';
import { Template, generate } from '@lisb/pdfme-generator';
```

```ts
import { Template, Designer, Form, Viewer } from '@pdfme/ui';
import { Template, Designer, Form, Viewer } from '@lisb/pdfme-ui';
```

**All objects use `Template`, which will be briefly explained in the next section.**
Expand All @@ -98,7 +98,7 @@ import { Template, Designer, Form, Viewer } from '@pdfme/ui';
## Template

The core of pdfme library are Templates.
Template Type can be imported by both `@pdfme/generator` or `@pdfme/ui`. Templates are used everywhere.
Template Type can be imported by both `@lisb/pdfme-generator` or `@lisb/pdfme-ui`. Templates are used everywhere.

A template can be divided into two parts: a fixed part and a variable part.
We call them basePdf and schema.
Expand All @@ -124,8 +124,8 @@ Let's take a look at some specific data.
### Minimal Template

```ts
import { Template, BLANK_PDF } from '@pdfme/generator';
// import { Template, BLANK_PDF } from '@pdfme/ui'; <- Template types and BLANK_PDF can also be imported from @pdfme/ui.
import { Template, BLANK_PDF } from '@lisb/pdfme-generator';
// import { Template, BLANK_PDF } from '@lisb/pdfme-ui'; <- Template types and BLANK_PDF can also be imported from @lisb/pdfme-ui.

const template: Template = {
basePdf: BLANK_PDF,
Expand Down Expand Up @@ -165,7 +165,7 @@ The PDF generator function, `generate`, takes 2 arguments of `template` and `inp
The code to generate a PDF file using the [template created above](https://pdfme.com/docs/getting-started#sample-template) is shown below.

```ts
import { Template, generate } from '@pdfme/generator';
import { Template, generate } from '@lisb/pdfme-generator';

const template: Template = {
// skip... Check the Template section.
Expand Down Expand Up @@ -203,7 +203,7 @@ You can design your own template from [Template Design page](https://pdfme.com/t
Let's integrate the designer using the template created above as the default template.

```ts
import { Template, Designer } from '@pdfme/ui';
import { Template, Designer } from '@lisb/pdfme-ui';

const domContainer = document.getElementById('container');
const template: Template = {
Expand Down Expand Up @@ -236,7 +236,7 @@ You can use templates to create forms and PDF viewers.
The Form creates a UI for the user to enter schemas based on the template.

```ts
import { Template, Form } from '@pdfme/ui';
import { Template, Form } from '@lisb/pdfme-ui';

const domContainer = document.getElementById('container');
const template: Template = {
Expand Down Expand Up @@ -272,7 +272,7 @@ The Viewer is a byproduct of the Form development process, but it allows you to
Using the Viewer is basically the same as using the Form, except that user cannot edit it.

```ts
import { Template, Viewer } from '@pdfme/ui';
import { Template, Viewer } from '@lisb/pdfme-ui';

const domContainer = document.getElementById('container');
const template: Template = {
Expand Down
Loading