@storepress/create-plugin-html 0.0.2 → 0.0.3

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/index.js CHANGED
@@ -84,6 +84,7 @@ module.exports = {
84
84
  'eslint-plugin-you-dont-need-lodash-underscore',
85
85
  'husky',
86
86
  'lint-staged',
87
+ "prettier@npm:wp-prettier@latest",
87
88
  'fs-extra',
88
89
  'webpack-remove-empty-scripts',
89
90
  'eslint-plugin-prettier',
@@ -96,20 +97,6 @@ module.exports = {
96
97
  'sideEffects': [
97
98
  'src/**',
98
99
  ],
99
- 'lint-staged': {
100
- './src/**/*.scss': [
101
- 'npm run lint:css',
102
- ],
103
- './src/**/*.{js,ts,tsx}': [
104
- 'npm run lint:js',
105
- ],
106
- './*.md': [
107
- 'npm run lint:md:docs',
108
- ],
109
- './package.json': [
110
- 'npm run lint:pkg-json',
111
- ],
112
- },
113
100
  'main': 'build/index.js',
114
101
  'module': 'src/index.js',
115
102
  'files': [
@@ -138,6 +125,11 @@ module.exports = {
138
125
  constantSlug: constantSlug,
139
126
  kebabSlug: kebabSlug,
140
127
  pascaleSlug: pascaleSlug,
128
+ GITHUB_REPOSITORY_NAME: '${{ github.event.repository.name }}',
129
+ GITHUB_RELEASE_NAME: '${{ env.RELEASE_NAME }}',
130
+ GITHUB_RELEASE_TAG: '${{ env.RELEASE_TAG }}',
131
+ GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}',
132
+ GITHUB_PAGE_URL: '${{ steps.deployment.outputs.page_url }}',
141
133
  }
142
134
  },
143
135
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storepress/create-plugin-html",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "A template to be used with `@wordpress/create-block` to create a StorePress HTML based JS Extension.",
5
5
  "author": "StorePress",
6
6
  "main": "index.js",
@@ -26,27 +26,27 @@ jobs:
26
26
  deploy:
27
27
  environment:
28
28
  name: github-pages
29
- url: ${{ steps.deployment.outputs.page_url }}
29
+ url: {{ GITHUB_PAGE_URL }}
30
30
  runs-on: ubuntu-latest
31
31
  steps:
32
- - name: Checkout
32
+ - name: "Checkout"
33
33
  uses: actions/checkout@v4
34
- # Set up Node
35
- - name: Setup Node
34
+
35
+ - name: "Setup Node"
36
36
  uses: actions/setup-node@v4
37
37
  with:
38
- node-version: 18
39
- - name: Install and Build
38
+ node-version: '20.x'
39
+
40
+ - name: "Install and Build"
40
41
  run: |
41
42
  npm install
42
43
  npm run build
43
- #- name: Setup Pages
44
- # uses: actions/configure-pages@v5
45
- - name: Upload artifact
44
+ rm -rf node_modules
45
+
46
+ - name: "Upload Page Contents"
46
47
  uses: actions/upload-pages-artifact@v3
47
48
  with:
48
- # Upload entire repository
49
49
  path: '.'
50
- - name: Deploy to GitHub Pages
50
+ - name: "Deploy to GitHub Pages"
51
51
  id: deployment
52
52
  uses: actions/deploy-pages@v4
@@ -10,23 +10,22 @@ on:
10
10
  permissions: write-all
11
11
 
12
12
  env:
13
- REPOSITORY_NAME: ${{ github.event.repository.name }}
13
+ REPOSITORY_NAME: {{ GITHUB_REPOSITORY_NAME }}
14
14
 
15
15
  name: Release
16
16
 
17
17
  jobs:
18
18
 
19
-
20
19
  # Build distribution release.
21
20
  #
22
21
  # Performs the following steps:
23
- # - Checks out the repository.
24
- # - Set up PHP.
25
- # - Install PHP Dependencies.
26
- # - Setup and Install Node.js.
27
- # - Make Zip.
28
- # - Upload Release.
29
-
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
+ # - Make Release
30
29
 
31
30
  build:
32
31
  name: Release
@@ -39,24 +38,26 @@ jobs:
39
38
  uses: actions/setup-node@v4
40
39
  with:
41
40
  node-version: '20.x'
42
- - run: npm clean-install
41
+
42
+ - name: "NPM Install"
43
+ run: npm install
43
44
 
44
45
  - name: "Make Zip"
45
46
  run: npm run plugin-zip --if-present
46
47
 
47
- - name: "Get release version."
48
+ - name: "Get Release Version"
48
49
  run: |
49
50
  echo "RELEASE_TAG=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
50
51
 
51
- - name: "Get release file base name."
52
+ - name: "Get Release Filename"
52
53
  run: |
53
54
  echo "RELEASE_NAME=$(node -p -e "require('./package.json').name")" >> $GITHUB_ENV
54
55
 
55
- - name: "Upload Release"
56
+ - name: "Make Release"
56
57
  uses: softprops/action-gh-release@v2
57
58
  with:
58
- files: ./${{ env.RELEASE_NAME }}.zip
59
+ files: ./{{ GITHUB_RELEASE_NAME }}.zip
59
60
  make_latest: true
60
- name: Release - v${{ env.RELEASE_TAG }}
61
+ name: Release - v{{ GITHUB_RELEASE_TAG }}
61
62
  env:
62
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63
+ GITHUB_TOKEN: {{ GITHUB_TOKEN }}
@@ -1 +1 @@
1
-
1
+ package-lock=false
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ './package.json': ['npm run lint:pkg-json'],
3
+ './*.md': ['npm run lint:md:docs'],
4
+ './src/**/*.scss': ['npm run lint:css'],
5
+ './src/**/*.{js,ts,tsx}': ['npm run lint:js'],
6
+ };