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

feat: plugin for generating a partial library when building a pod #201

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"varsIgnorePattern": "^_"
}
],
"sort-imports": ["error", {}],
"sort-imports": ["error", {}]
}
}
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"packages/amagaki":"3.0.0","packages/amagaki-engine-preact":"2.0.1","packages/amagaki-plugin-page-builder":"3.11.0","packages/create-amagaki":"0.1.1","packages/website":"0.1.0"}
{"packages/amagaki":"3.0.0","packages/amagaki-engine-preact":"2.0.1","packages/amagaki-plugin-page-builder":"3.11.0","packages/amagaki-plugin-partial-library":"0.0.0","packages/create-amagaki":"0.1.1","packages/website":"0.1.0"}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"packages/amagaki",
"packages/amagaki-engine-preact",
"packages/amagaki-plugin-page-builder",
"packages/amagaki-plugin-partial-library",
"packages/create-amagaki",
"packages/website"
],
Expand Down
12 changes: 6 additions & 6 deletions packages/amagaki-plugin-page-builder/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
{
"accessorPairPositioning": "getThenSet",
"order": [
{ "type": "[static-properties]", "sort": "alphabetical" },
{ "type": "[static-methods]", "sort": "alphabetical" },
{ "type": "[properties]", "sort": "alphabetical" },
{ "type": "[conventional-private-properties]", "sort": "alphabetical" },
"[static-properties]",
"[static-methods]",
"[properties]",
"[conventional-private-properties]",
"constructor",
{ "type": "[method]", "sort": "alphabetical" },
{ "type": "[conventional-private-methods]", "sort": "alphabetical" }
"[method]",
"[conventional-private-methods]"
]
}
]
Expand Down
1 change: 1 addition & 0 deletions packages/amagaki-plugin-partial-library/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
example/node_modules/
42 changes: 42 additions & 0 deletions packages/amagaki-plugin-partial-library/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"extends": "./node_modules/gts/",
"env": {
"browser": true,
"node": true
},
"plugins": [
"sort-class-members"
],
"root": true,
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_"
}
],
"node/no-extraneous-import": [
"error",
{
"allowModules": ["colors"]
}
],
"sort-imports": ["error", {}],
"sort-class-members/sort-class-members": [
2,
{
"accessorPairPositioning": "getThenSet",
"order": [
"[static-properties]",
"[static-methods]",
"[properties]",
"[conventional-private-properties]",
"constructor",
"[method]",
"[conventional-private-methods]"
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'Release Please'
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: npm ci
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}
26 changes: 26 additions & 0 deletions packages/amagaki-plugin-partial-library/.github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Run tests'

on: [push]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
**/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run tests
run: |
npm install --dev
npm test
7 changes: 7 additions & 0 deletions packages/amagaki-plugin-partial-library/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
amagaki-*.tgz
/dist/
example/build
!example/dist
node_modules/
secrets.txt
.DS_Store
3 changes: 3 additions & 0 deletions packages/amagaki-plugin-partial-library/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require('gts/.prettierrc.json')
}
Loading