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

4 move compas save #9

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a525853
chore: wip restructured docops
Stef3st Aug 29, 2023
e0b0e4c
chore: altered workflows
Stef3st Aug 29, 2023
44ece82
ci: update screenshots
Stef3st Aug 29, 2023
3313b32
chore: retrigger ci update
Stef3st Aug 29, 2023
1b90777
chore: fixed workflows
Stef3st Aug 29, 2023
3a2e75d
chore: inplemented new filtered-list
Stef3st Aug 31, 2023
6cec011
chore: work in progress
Stef3st Sep 11, 2023
2d1f7bb
chore: fixed plugin test
Stef3st Sep 11, 2023
c207990
chore: updating lock file
juancho0202 Sep 11, 2023
fb7b9d8
chore: finishing up save plugin and component
Stef3st Sep 11, 2023
f56633c
ci: update screenshots
Stef3st Sep 11, 2023
4ae52e2
chore: retrigger ci update
Stef3st Sep 11, 2023
ed5f1aa
chore: retrigger ci update
Stef3st Sep 11, 2023
92ef560
chore: update workflow
Stef3st Sep 11, 2023
abbbc2b
ci: update screenshots
Stef3st Sep 11, 2023
a2c9c49
chore: retrigger ci update
Stef3st Sep 11, 2023
5c2ad8f
chore: getting updateLabels out of the component
juancho0202 Sep 12, 2023
7590702
chore: ignore all tsbuildinfo files
juancho0202 Sep 12, 2023
b2978b0
chore: renaming component to compas-save-to-file
juancho0202 Sep 12, 2023
07e96a1
ci: update screenshots
juancho0202 Sep 12, 2023
7d9823d
chore: retrigger ci update
Stef3st Sep 12, 2023
4c3679f
chore: remove tsbuildinfo files
Stef3st Sep 13, 2023
9bad0c6
chore: added requested changes by @pascalwilbrink
Stef3st Sep 14, 2023
64496a5
chore: moved out components
Stef3st Sep 25, 2023
ee1c790
chore: changed build script
Stef3st Sep 26, 2023
b183f1c
chore: added needed dependencies
Stef3st Sep 26, 2023
9f4d6e1
chore: update package lock
Stef3st Sep 26, 2023
d4bdbdb
chore: changed build script
Stef3st Sep 26, 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
13 changes: 9 additions & 4 deletions .github/workflows/test-on-pr-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: "16"

- name: Install dependencies
run: npm ci
run: |
npm i @nx/nx-linux-x64-gnu
npm ci

- name: Install playwright browsers
run: npx playwright install --with-deps

- name: Run tests
run: npm run-script test
- name: Build project
run: npm run build

- name: Run tests for compas-docops
run: npx lerna run test
33 changes: 23 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,22 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: "16"

- name: Install dependencies
run: npm ci
run: |
npm i @nx/nx-linux-x64-gnu
npm ci

- name: Install playwright browsers
run: npx playwright install --with-deps

- name: Run unit tests
run: npm run-script test:unit
- name: Build project
run: npm run build

- name: Run unit tests for compas-docops
run: npx lerna run test:unit

visual:
runs-on: ubuntu-latest
steps:
Expand All @@ -30,24 +36,31 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: "16"

- name: Install dependencies
run: npm ci
run: |
npm i @nx/nx-linux-x64-gnu
npm ci

- name: Install playwright browsers
run: npx playwright install --with-deps

- name: Run visual test
- name: Build project
run: npm run build

- name: Run visual test for compas-open
working-directory: ./components/compas-open
run: npm run-script test:visual

- name: Update screenshots
- name: Update screenshots for compas-open
if: failure()
working-directory: ./components/compas-open
run: npm run test:update

- name: Commit changes
if: failure()
uses: EndBug/add-and-commit@v9
with:
message: 'ci: update screenshots'
add: 'screenshots'
message: "ci: update screenshots"
add: "components/compas-open/screenshots"
31 changes: 3 additions & 28 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
## editors
/.idea
/.vscode

## system files
.DS_Store

## npm
/node_modules/
/npm-debug.log

## testing
/coverage/

## failed screenshots
/screenshots/*/failed/

## temp folders
/.tmp/

# build
/_site/
/dist/
/out-tsc/
/.rollup.cache/

storybook-static
custom-elements.json
node_modules/
**/.tsbuildinfo
lerna-debug.log
2 changes: 0 additions & 2 deletions README.foot.md

This file was deleted.

81 changes: 0 additions & 81 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +0,0 @@
# \<compas-open>

This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.

## Installation

```bash
npm i compas-open
```

## Usage

```html
<script type="module">
import 'compas-open';
</script>

<compas-open></compas-open>
```

## Linting and formatting

To scan the project for linting and formatting errors, run

```bash
npm run lint
```

To automatically fix linting and formatting errors, run

```bash
npm run format
```

## Testing with Web Test Runner

To execute a single test run:

```bash
npm run test
```

To run the tests in interactive watch mode run:

```bash
npm run test:watch
```

## Demoing with Storybook

To run a local instance of Storybook for your component, run

```bash
npm run storybook
```

To build a production version of Storybook, run

```bash
npm run storybook:build
```

## Tooling configs

For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.

If you customize the configuration a lot, you can consider moving them to individual files.

## Local Demo with `web-dev-server`

```bash
npm start
```

To run a local development server that serves the basic demo located in `demo/index.html`





&copy; 1970 THE AUTHORS
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions components/compas-docops-components/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## editors
/.idea
/.vscode

## system files
.DS_Store

## npm
/node_modules/
/npm-debug.log

## failed screenshots
/screenshots/*/failed/

## testing
/coverage/

## local debug
/.npmrc

## temp folders
/.tmp/

# build
/_site/
/dist/
/out-tsc/
/.tsbuildinfo

storybook-static
custom-elements.json

.rollup.cache/
29 changes: 29 additions & 0 deletions components/compas-docops-components/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## editors
/.idea
/.vscode

## system files
.DS_Store

## npm
/node_modules/
/npm-debug.log

## failed screenshots
/screenshots/*/failed/

## testing
/coverage/

## local debug
/.npmrc

## temp folders
/.tmp/

# build
/_site/
/out-tsc/

storybook-static
custom-elements.json
File renamed without changes.
72 changes: 72 additions & 0 deletions components/compas-docops-components/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"name": "@com-pas/compas-docops-components",
"description": "Compas-docops-components following open-wc recommendations",
"license": "Apache-2.0",
"author": "CoMPAS",
"version": "0.0.0",
"browser": "./dist/CompasDocopsComponent.js",
"module": "./dist/CompasDocopsComponent.js",
"types": "./dist/CompasDocopsComponent.d.ts",
"exports": {
".": "./dist/CompasDocopsComponent.js",
"./compas-change-set-radiogroup.js": "./dist/compas-change-set-radiogroup.js",
"./compas-comment.js": "./dist/compas-comment.js",
"./compas-labels-field.js": "./dist/compas-labels-field.js",
"./compas-scltype-select.js": "./dist/compas-scltype-select.js"
},
"type": "module",
"scripts": {
"analyze": "cem analyze",
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
"build": "tsc && npm run analyze -- --exclude dist",
"prepublish": "tsc && npm run analyze -- --exclude dist",
"lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
"format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
"clean": "rimraf .tsbuildinfo custom-elements.json dist"
},
"dependencies": {
"@material/mwc-list": "^0.27.0",
"@material/mwc-icon": "^0.27.0",
"@material/mwc-icon-button": "^0.27.0",
"@material/mwc-select": "^0.27.0",
"@com-pas/compas-open-core": "*",
"@openscd/oscd-textfield": "*",
"lit": "^2.7.4",
"lit-element": "2.5.1",
"lit-html": "1.4.1"
},
"devDependencies": {
"@babel/preset-env": "^7.16.4",
"@custom-elements-manifest/analyzer": "^0.4.17",
"@open-wc/building-rollup": "^2.0.2",
"@open-wc/eslint-config": "^9.2.1",
"@open-wc/testing": "^3.1.6",
"@rollup/plugin-typescript": "^9.0.2",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-node-resolve": "^13.0.6",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"@web/dev-server": "^0.1.34",
"@web/dev-server-storybook": "^0.5.4",
"@web/rollup-plugin-html": "^1.11.0",
"@web/rollup-plugin-import-meta-assets": "^1.0.7",
"@web/test-runner": "^0.14.0",
"babel-plugin-template-html-minifier": "^4.1.0",
"cem-plugin-readme": "^0.1.4",
"concurrently": "^5.3.0",
"deepmerge": "^4.2.2",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.3.0",
"husky": "^4.3.8",
"lint-staged": "^10.5.4",
"prettier": "^2.4.1",
"sinon": "^11.1.2",
"rimraf": "^3.0.2",
"rollup": "^2.60.0",
"rollup-plugin-esbuild": "^5.0.0",
"rollup-plugin-workbox": "^6.2.0",
"tslib": "^2.3.1",
"typescript": "^4.9.2"
},
"customElements": "custom-elements.json"
}
19 changes: 19 additions & 0 deletions components/compas-docops-components/src/CompasDocopsComponent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { CompasChangeSetRadiogroup } from "./compas-change-set-radiogroup.js";
import { CompasCommentElement } from "./compas-comment.js";
import { CompasLabelsFieldElement } from "./compas-labels-field";
import { CompasSclTypeSelect } from "./compas-scltype-select.js";

window.customElements.define("compas-comment", CompasCommentElement);
window.customElements.define(
"compas-changeset-radiogroup",
CompasChangeSetRadiogroup
);
window.customElements.define("compas-labels-field", CompasLabelsFieldElement);
window.customElements.define("compas-scltype-select", CompasSclTypeSelect);

export {
CompasCommentElement,
CompasChangeSetRadiogroup,
CompasLabelsFieldElement,
CompasSclTypeSelect,
};
Loading