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

New Dist Process #4

Merged
merged 49 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
963b9b5
fix: try out new build process
CollinHerber Oct 22, 2023
a5aed95
chore: update vite config
CollinHerber Oct 22, 2023
8d60962
fix up builds for npm
brandonseydel Oct 26, 2023
8f257bf
Merge pull request #3 from brandonseydel/new-dist
brandonseydel Oct 26, 2023
dff48a7
chore: add prepublish
CollinHerber Oct 26, 2023
a97414f
0.0.5
CollinHerber Oct 26, 2023
4add031
add aurelia plugin for rollup build
brandonseydel Oct 26, 2023
7444ccc
fix externals
brandonseydel Oct 26, 2023
56cbd11
Merge remote-tracking branch 'origin/new-dist' into new-dist
CollinHerber Oct 26, 2023
5f48202
0.0.6
CollinHerber Oct 26, 2023
787321d
chore: update to using @aurelia/ packages
CollinHerber Oct 26, 2023
3f810dd
0.0.8
CollinHerber Oct 26, 2023
8e7e027
0.0.9
CollinHerber Oct 26, 2023
d7dc92b
chore: update annotations to static definitions
CollinHerber Oct 26, 2023
104038d
0.0.10
CollinHerber Oct 26, 2023
b1acd0b
chore: remove unused style file
CollinHerber Oct 26, 2023
48366dd
0.0.11
CollinHerber Oct 26, 2023
8a26a16
chore: add simple devapp
CollinHerber Oct 26, 2023
ecc804d
push config fix
brandonseydel Oct 27, 2023
de30c9f
0.0.12
CollinHerber Oct 27, 2023
d6b116e
0.0.13
CollinHerber Oct 27, 2023
6020a05
fix package.json
brandonseydel Oct 27, 2023
428c805
Merge remote-tracking branch 'origin/new-dist' into new-dist
CollinHerber Oct 27, 2023
de17d57
chore: add some more information to devapp
CollinHerber Oct 27, 2023
18bb2bf
0.0.14
CollinHerber Oct 27, 2023
c9189a1
push example
brandonseydel Nov 2, 2023
1a68f8d
chore: update css consumption of bwc
CollinHerber Nov 2, 2023
026400c
0.0.15
CollinHerber Nov 2, 2023
971660e
chore: update to configuration over convention for plugin issues
CollinHerber Nov 2, 2023
34665bf
0.0.16
CollinHerber Nov 2, 2023
8711492
chore: add missing things to vite config
CollinHerber Nov 2, 2023
46f306e
0.0.17
CollinHerber Nov 2, 2023
267dbea
refactor: remove data grid component in favor of direct consumptino
CollinHerber Nov 2, 2023
7467bd0
0.0.18
CollinHerber Nov 2, 2023
186eee9
chore: update prepublish to version last
CollinHerber Nov 2, 2023
a211dac
0.0.19
CollinHerber Nov 2, 2023
d0e711c
chore: vite to create ignore list
CollinHerber Nov 2, 2023
b3db559
0.0.20
CollinHerber Nov 2, 2023
f8bc08f
chore: update readme
CollinHerber Nov 2, 2023
03ed1b3
feat: update moo-select to material 3
CollinHerber Nov 2, 2023
1e426b5
0.0.21
CollinHerber Nov 2, 2023
05da822
feat: update moo-select to material 3
CollinHerber Nov 2, 2023
af74cdb
feat: add dynamic property spreading to moo select
CollinHerber Nov 2, 2023
4a4a751
0.0.22
CollinHerber Nov 2, 2023
43eed4e
fix: duplicate repeater and fix value binding
CollinHerber Nov 3, 2023
3fffab9
0.0.23
CollinHerber Nov 3, 2023
a468ad2
fix: value binding on none-string values
CollinHerber Nov 3, 2023
b3771b4
0.0.24
CollinHerber Nov 3, 2023
07b9da7
chore: add github action for preview releases
CollinHerber Nov 3, 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
46 changes: 46 additions & 0 deletions .github/workflows/publish-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish Preview Betsy Web Components

on:
push:
branches:
- preview

env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

permissions:
contents: write

jobs:
publish:
name: Publish Preview
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.CI_USER_BETSY }}

- name: Setup pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598

- name: Setup Node with pnpm Cache
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Run pnpm Install
run: pnpm i

- name: Run publish
run: pnpm publish

- name: Commit changes
run: |
git config --global user.name 'Betsy CI'
git config --global user.email '[email protected]'
git commit -am "Automated report"
git push
15 changes: 14 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

permissions:
contents: write

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.semantic-release.outputs.tag }}
url: ${{ steps.semantic-release.outputs.url }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -33,4 +39,11 @@ jobs:
run: pnpm i

- name: Semantic Release
run: pnpm run semantic-release
run: |
pnpm run semantic-release >> semantic-release.log
echo "url=$(cat semantic-release.log | grep -o 'https.*/tag/.*' | tr -d '\n')" >> $GITHUB_OUTPUT
echo "tag=$(cat semantic-release.log | grep -o '/tag/.*' | tr -d '/tag/')" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.CI_USER_BETSY }}
GIT_AUTHOR_NAME: ci-betsy
GIT_AUTHOR_EMAIL: [email protected]
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ node_modules
/coverage
/src/**/*.js
/src/**/*.js.map
/dev-app/**/*.js
/dev-app/**/*.js.map
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ Note this plugin project comes with a dev-app. The above command starts the dev

Install the npm package

pnpm install @betsybot/web-components
npm install @worm425/betsy-web-components

Register the components in your `main.ts` or `main.js` file
```js
import * as BetsyWebComponentsPlugin from '@betsybot/web-components';
//Don't forget the styles!
import '@worm425/betsy-web-components/dist/style.css';

Aurelia
// Load all exports from the plugin
Expand Down
Empty file added dev-app/.env
Empty file.
Empty file added dev-app/.env.development
Empty file.
22 changes: 22 additions & 0 deletions dev-app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module"
},
"env": {
"es6": true,
"browser": true,
"node": true,
"jest": true
}
}
36 changes: 36 additions & 0 deletions dev-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

# You may want to customise this file depending on your Operating System
# and the editor that you use.
#
# We recommend that you use a Global Gitignore for files that are not related
# to the project. (https://help.github.com/articles/ignoring-files/#create-a-global-gitignore)

# OS
#
# Ref: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# Ref: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Ref: https://github.com/github/gitignore/blob/master/Global/Linux.gitignore
.DS_STORE
Thumbs.db

# Editors
#
# Ref: https://github.com/github/gitignore/blob/master/Global
# Ref: https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
# Ref: https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore
.idea
.chrome
/*.log
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# Dependencies
node_modules

# Compiled files
/dist
/.nyc_output
/coverage
12 changes: 12 additions & 0 deletions dev-app/.htmlhintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"tagname-lowercase": true,
"attr-lowercase": false,
"attr-value-double-quotes": true,
"attr-no-duplication": true,
"doctype-first": false,
"tag-pair": true,
"spec-char-escape": true,
"id-unique": true,
"src-not-empty": true,
"title-require": true
}
3 changes: 3 additions & 0 deletions dev-app/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# for pnpm, use flat node_modules
shamefully-hoist=true
auto-install-peers=true
2 changes: 2 additions & 0 deletions dev-app/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# For compatibility in yarn 2+
nodeLinker: node-modules
37 changes: 37 additions & 0 deletions dev-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# dev-app

This project is bootstrapped by [aurelia/new](https://github.com/aurelia/new).

## Start dev web server

npm start

## Build the app in production mode

npm run build

It builds all files to dist folder. To deploy to production server, copy all the `dist/*` files to production root folder.

For example
```
dist/index.html
dist/foo.12345.js
```
Copy to production root folder
```
root_folder/index.html
root_folder/foo.12345.js
```

## Unit Tests

npm run test

Run unit tests in watch mode.

npm run test:watch


## Analyze webpack bundle

npm run analyze
3 changes: 0 additions & 3 deletions dev-app/app.html

This file was deleted.

6 changes: 0 additions & 6 deletions dev-app/app.ts

This file was deleted.

15 changes: 15 additions & 0 deletions dev-app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/">
</head>

<body>
<my-app></my-app>
</body>

</html>
14 changes: 0 additions & 14 deletions dev-app/main.ts

This file was deleted.

74 changes: 74 additions & 0 deletions dev-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"name": "dev-app",
"description": "An Aurelia 2 client application.",
"version": "0.1.0",
"repository": {
"type": "git",
"url": "???"
},
"license": "UNLICENSED",
"dependencies": {
"aurelia": "latest",
"@aurelia/router": "latest"
},
"devDependencies": {
"@worm425/betsy-web-components": "0.0.14",
"eslint": "^8.43.0",
"@aurelia/testing": "latest",
"htmlhint": "^1.1.4",
"rimraf": "^5.0.1",
"webpack": "^5.88.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"html-webpack-plugin": "^5.5.3",
"webpack-bundle-analyzer": "^4.9.0",
"style-loader": "^3.3.3",
"css-loader": "^6.8.1",
"dotenv-webpack": "^8.0.1",
"@aurelia/webpack-loader": "latest",
"ts-loader": "^9.4.4",
"postcss-loader": "^7.3.3",
"postcss": "^8.4.24",
"autoprefixer": "^10.4.14",
"@types/node": "^18.11.18",
"typescript": "^5.1.6",
"tslib": "^2.6.0",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-transform-stub": "^2.0.0",
"@types/jest": "^29.5.2",
"@aurelia/ts-jest": "latest"
},
"scripts": {
"lint:js": "eslint src test --ext .js,.ts",
"lint:html": "htmlhint -c .htmlhintrc src",
"lint": "npm run lint:js && npm run lint:html",
"pretest": "npm run lint",
"start": "webpack serve",
"build": "rimraf dist && webpack --env production",
"analyze": "rimraf dist && webpack --env production --analyze",
"test": "jest"
},
"jest": {
"testMatch": [
"<rootDir>/test/**/*.spec.ts"
],
"testEnvironment": "jsdom",
"transform": {
"\\.(css|less|sass|scss|styl|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "jest-transform-stub",
"\\.(ts|html)$": "@aurelia/ts-jest"
},
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.ts",
"!src/**/*.d.ts"
],
"globals": {
"ts-jest": {
"isolatedModules": true
}
}
}
}
Loading