@storepress/create-plugin-html 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -13,9 +13,9 @@ npx -y @wordpress/create-block@latest --template @storepress/create-plugin-html
|
|
|
13
13
|
Navigate to the newly created folder and get started.
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
npm i
|
|
17
|
-
npm run build
|
|
18
|
-
npx -y http-server
|
|
16
|
+
npm i # Install dependencies and Update package dependency
|
|
17
|
+
npm run build # Build the javascript
|
|
18
|
+
npx -y http-server # Start Server
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Development
|
package/package.json
CHANGED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Simple workflow for deploying static content to GitHub Pages
|
|
2
|
-
name: Deploy to Pages
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
# Runs on pushes targeting the default branch
|
|
6
|
-
push:
|
|
7
|
-
branches: [$default-branch]
|
|
8
|
-
|
|
9
|
-
# Allows you to run this workflow manually from the Actions tab
|
|
10
|
-
workflow_dispatch:
|
|
11
|
-
|
|
12
|
-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
13
|
-
permissions:
|
|
14
|
-
contents: read
|
|
15
|
-
pages: write
|
|
16
|
-
id-token: write
|
|
17
|
-
|
|
18
|
-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
19
|
-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
20
|
-
concurrency:
|
|
21
|
-
group: "pages"
|
|
22
|
-
cancel-in-progress: false
|
|
23
|
-
|
|
24
|
-
jobs:
|
|
25
|
-
# Single deploy job since we're just deploying
|
|
26
|
-
deploy:
|
|
27
|
-
environment:
|
|
28
|
-
name: github-pages
|
|
29
|
-
url: {{ GITHUB_PAGE_URL }}
|
|
30
|
-
runs-on: ubuntu-latest
|
|
31
|
-
steps:
|
|
32
|
-
- name: "Checkout"
|
|
33
|
-
uses: actions/checkout@v4
|
|
34
|
-
|
|
35
|
-
- name: "Setup Node"
|
|
36
|
-
uses: actions/setup-node@v4
|
|
37
|
-
with:
|
|
38
|
-
node-version: '20.x'
|
|
39
|
-
|
|
40
|
-
- name: "Install and Build"
|
|
41
|
-
run: |
|
|
42
|
-
npm install
|
|
43
|
-
npm run build
|
|
44
|
-
rm -rf node_modules
|
|
45
|
-
|
|
46
|
-
- name: "Upload Page Contents"
|
|
47
|
-
uses: actions/upload-pages-artifact@v3
|
|
48
|
-
with:
|
|
49
|
-
path: '.'
|
|
50
|
-
|
|
51
|
-
- name: "Deploy to GitHub Pages"
|
|
52
|
-
id: deployment
|
|
53
|
-
uses: actions/deploy-pages@v4
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
on:
|
|
2
|
-
push:
|
|
3
|
-
# Sequence of patterns matched against refs/tags
|
|
4
|
-
tags:
|
|
5
|
-
- '**' # Push events to matching i.e. 1.0, 20.15.10, including hierarchical tags like v1.0/beta
|
|
6
|
-
# Semver (https://semver.org/) release pattern.
|
|
7
|
-
# - '[0-9]+.[0-9]+.[0-9]+*'
|
|
8
|
-
|
|
9
|
-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
10
|
-
permissions: write-all
|
|
11
|
-
|
|
12
|
-
env:
|
|
13
|
-
REPOSITORY_NAME: {{ GITHUB_REPOSITORY_NAME }}
|
|
14
|
-
|
|
15
|
-
name: Release
|
|
16
|
-
|
|
17
|
-
jobs:
|
|
18
|
-
|
|
19
|
-
# Build distribution release.
|
|
20
|
-
#
|
|
21
|
-
# Performs the following steps:
|
|
22
|
-
# - Checks out the repository
|
|
23
|
-
# - Setup and Install Node.js
|
|
24
|
-
# - NPM Install
|
|
25
|
-
# - Make Zip
|
|
26
|
-
# - Get Release Version
|
|
27
|
-
# - Get Release Filename
|
|
28
|
-
# - Get Changelog
|
|
29
|
-
# - Make Release
|
|
30
|
-
|
|
31
|
-
build:
|
|
32
|
-
name: Release
|
|
33
|
-
runs-on: ubuntu-latest
|
|
34
|
-
steps:
|
|
35
|
-
- name: "Checks out the repository"
|
|
36
|
-
uses: actions/checkout@v4
|
|
37
|
-
|
|
38
|
-
- name: "Setup and Install Node.js"
|
|
39
|
-
uses: actions/setup-node@v4
|
|
40
|
-
with:
|
|
41
|
-
node-version: '20.x'
|
|
42
|
-
|
|
43
|
-
- name: "NPM Install"
|
|
44
|
-
run: npm install
|
|
45
|
-
|
|
46
|
-
- name: "Make Zip"
|
|
47
|
-
run: npm run plugin-zip --if-present
|
|
48
|
-
|
|
49
|
-
- name: "Get Release Version"
|
|
50
|
-
run: |
|
|
51
|
-
echo "RELEASE_TAG=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
|
52
|
-
|
|
53
|
-
- name: "Get Release Filename"
|
|
54
|
-
run: |
|
|
55
|
-
echo "RELEASE_NAME=$(node -p -e "require('./package.json').name")" >> $GITHUB_ENV
|
|
56
|
-
|
|
57
|
-
- name: "Get Changelog"
|
|
58
|
-
id: changelog
|
|
59
|
-
run: |
|
|
60
|
-
echo "changelog<<EOF" >> $GITHUB_OUTPUT
|
|
61
|
-
node ./tools/changelog.js >> $GITHUB_OUTPUT
|
|
62
|
-
echo "EOF" >> $GITHUB_OUTPUT
|
|
63
|
-
|
|
64
|
-
- name: "Make Release"
|
|
65
|
-
uses: softprops/action-gh-release@v2
|
|
66
|
-
with:
|
|
67
|
-
files: ./{{ GITHUB_RELEASE_NAME }}.zip
|
|
68
|
-
make_latest: true
|
|
69
|
-
name: Release - v{{ GITHUB_RELEASE_TAG }}
|
|
70
|
-
body: {{ GITHUB_CHANGELOG_CONTENT }}
|
|
71
|
-
env:
|
|
72
|
-
GITHUB_TOKEN: {{ GITHUB_TOKEN }}
|