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

upgrade output targets #2

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
4b5fe2c
Use @stencil/svelte-output-target from npm
gnowland Mar 10, 2021
1231030
chore(): resolve failing svelte build
liamdebeasi Jun 14, 2021
6a2b832
chore(): fix failing svelte tests (#159)
liamdebeasi Jun 14, 2021
87391cd
feat(vue): add vue 3 support (#160)
liamdebeasi Jun 14, 2021
d03174c
feat(vue): add support for custom elements build (#161)
liamdebeasi Jun 17, 2021
15de212
release @stencil/[email protected] (#163)
liamdebeasi Jun 17, 2021
8e21498
fix(angular): add comm after each host content
nphyatt Jul 8, 2021
24df9e6
Merge pull request #167 from ionic-team/fix-165
nphyatt Jul 8, 2021
e2e2837
chore: add os to rollup config
nphyatt Jul 8, 2021
199d510
Merge pull request #168 from ionic-team/add-os-to-rollup
nphyatt Jul 8, 2021
ed4638e
chore: release angular-output-targets
nphyatt Jul 8, 2021
43a6abb
fix(vue): only props set by user are passed to web component (#170)
liamdebeasi Aug 9, 2021
77dcbe0
@stencil/vue-output-target 0.5.1
liamdebeasi Aug 9, 2021
56ab8ae
merge release @stencil/vue-output-target 0.5.1
liamdebeasi Aug 9, 2021
947dc92
fix(react): sync with changes in Ionic Framework (#177)
willmartian Aug 31, 2021
14bd8ed
chore(): bump react to 0.0.10
liamdebeasi Aug 31, 2021
e0846b5
merge release-react-0.0.10
willmartian Aug 31, 2021
ee440c8
fix(): alphabetize inputs
liamdebeasi Aug 31, 2021
196ce0d
fix(react): alphabetize inputs
liamdebeasi Aug 31, 2021
1efcb90
chore(): release react targets 0.0.11
liamdebeasi Aug 31, 2021
e34da92
merge release-react-0.0.11
liamdebeasi Aug 31, 2021
c3e9031
chore(): fix alphabetization
liamdebeasi Aug 31, 2021
cc04b1c
@stencil/react-output-target 0.0.12
liamdebeasi Aug 31, 2021
4da10b2
merge release-react-0.0.12
liamdebeasi Aug 31, 2021
43fdc4d
feat(react): add support for custom elements build (#182)
liamdebeasi Sep 14, 2021
8ede818
React 0.1.0
liamdebeasi Sep 14, 2021
0a0f03d
merge release-react-0.1.0
liamdebeasi Sep 14, 2021
f15fac7
feat(angular): use Angular's EventEmitter with correct type in genera…
poulpe38000 Sep 29, 2021
e34a0d5
style(angular): sync with changes from Framework repo (#192)
willmartian Sep 29, 2021
4daa52a
fix(angular): update import paths to root dir (#194)
willmartian Oct 1, 2021
78bcfec
chore(angular): bump package version (#195)
willmartian Oct 1, 2021
04fd9da
fix(angular-output-target): duplicate event emission for proxied outputs
sean-perkins Nov 8, 2021
288c3d1
fix(angular-output-target): fix stencil/angular output events
sean-perkins Nov 10, 2021
cbde6b2
chore(angular-output-target): bump version number
willmartian Nov 10, 2021
a445720
chore(angular-output-target): bump version
willmartian Nov 11, 2021
f3de438
feat(angular): add support for custom elements build (#200)
willmartian Nov 16, 2021
ad41959
chore(angular): bump version
willmartian Nov 16, 2021
bf2a2c8
fix(angular, react, vue): use defineCustomElement import to improve t…
liamdebeasi Dec 6, 2021
2452ccf
chore(): release vue targets 0.6.0
liamdebeasi Dec 6, 2021
12e165e
chore(): release react targets 0.2.0
liamdebeasi Dec 6, 2021
557bc21
chore(): release angular targets 0.4.0
liamdebeasi Dec 6, 2021
479091b
chore(): merge output target releases
liamdebeasi Dec 6, 2021
ae73627
fix(react): use createElement named import for better compatibility w…
liamdebeasi Jan 5, 2022
5188070
react 0.2.1
liamdebeasi Jan 5, 2022
8d5ad5c
merge release-react-0.2.1
liamdebeasi Jan 5, 2022
b3df29f
chore(react): add function-level jsdoc (#221)
rwaskiewicz Jan 27, 2022
8c36229
fix(react): improve how props are translated to attributes in html (#…
WickyNilliams Feb 8, 2022
e888a13
chore(react): bump react to v0.3.1
rwaskiewicz Feb 8, 2022
c62f5fc
fix(react): fix tests following react wrapper v0.3.1 (#224)
rwaskiewicz Feb 8, 2022
fbfc52b
chore(github): allow ci to run on pull requests
rwaskiewicz Feb 8, 2022
6ae0bf3
chore(github): remove ci workflow duplication
rwaskiewicz Feb 8, 2022
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: 15 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,27 @@
name: CI
name: Build & Test

on: push
on:
push:
branches:
- 'master'
pull_request:
branches:
- '**'

jobs:
build-and-test-nix:
name: Build and Test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/checkout@v1
- name: Restore Dependency Cache
uses: actions/cache@v1
id: restore-dependencies
with:
path: node_modules
key: ${{ runner.OS }}-dependency-cache-${{ hashFiles('package-lock.json') }}
build_and_test:
strategy:
matrix:
os: [ 'ubuntu-latest', 'windows-latest' ]

- name: Install Dependencies
run: npm ci

- name: Setup Testing Environment
run: npm run bootstrap
name: Node 16 on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

- name: Build
run: npm run build

- name: Test
run: npm test
plugin-build-and-test-windows:
name: Build and Test
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x
- uses: actions/checkout@v1
- name: Restore Dependency Cache
uses: actions/cache@v1
Expand Down
114 changes: 114 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ This is the output file that gets generated by the outputTarget. This file shoul

In order for ngmodel to work on input components we need to define certain pieces of information about the input components. Unfortunately the Stencil compiler cannot infer the intent of components because this is a very conceptual idea.

### excludeComponents

This is an array of component names to exclude from the output target build. This is useful if you need to have a framework-specific implementation of a particular component.

### includeImportCustomElements

If `true`, the output target will import the custom element instance and register it with the Custom Elements Registry when the component is imported inside of a user's app. This can only be used with the [Custom Elements Bundle](https://stenciljs.com/docs/custom-elements) and will not work with lazy loaded components.

### customElementsDir

This is the directory where the custom elements are imported from when using the `[Custom Elements Bundle](https://stenciljs.com/docs/custom-elements)`. Defaults to the `components` directory. Only applies when `includeImportCustomElements` is `true`.

### Setup of Angular Component Library

There is an example component library package available on Github so that you can get started. This repo will likely live as a sibling to your Stencil component library. https://github.com/ionic-team/stencil-ds-angular-template
Expand Down Expand Up @@ -164,6 +176,30 @@ This is the NPM package name of your core stencil package. In the case of Ionic

This is the output file that gets generated by the outputTarget. This file should be referencing a different package location. In the example case we are choosing a sibling directory’s src directory. We will then create a React package that exports all components defined in this file.

### excludeComponents

This is an array of component names to exclude from the output target build. This is useful if you need to have a framework-specific implementation of a particular component. For example, you may have a `my-tabs` tab view Web Component but need to rewrite this in React to take advantage of React Router.

### loaderDir

This is the path to where the `defineCustomElements` function exists in your built project. If `loaderDir` is not provided, the `/dist/loader` directory will be used.

### includePolyfills

If `true`, polyfills will automatically be imported and the `applyPolyfills` function will be called in your proxies file. This can only be used when lazy loading Web Components and will not work when `includeImportCustomElements` is `true`.

### includeDefineCustomElements

If `true`, all Web Components will automatically be registered with the Custom Elements Registry. This can only be used when lazy loading Web Components and will not work when `includeImportCustomElements` is `true`.

### includeImportCustomElements

If `true`, the output target will import the custom element instance and register it with the Custom Elements Registry when the component is imported inside of a user's app. This can only be used with the [Custom Elements Bundle](https://stenciljs.com/docs/custom-elements) and will not work with lazy loaded components.

### customElementsDir

This is the directory where the custom elements are imported from when using the `[Custom Elements Bundle](https://stenciljs.com/docs/custom-elements)`. Defaults to the `components` directory. Only applies when `includeImportCustomElements` is `true`.

### Setup of React Component Library

There is an example component library package available on Github so that you can get started. This repo will likely live as a sibling to your Stencil component library. https://github.com/ionic-team/stencil-ds-react-template
Expand Down Expand Up @@ -205,6 +241,84 @@ This is the NPM package name of your core stencil package. In the case of Ionic

This is the output file that gets generated by the outputTarget. This file should be referencing a different package location. In the example case we are choosing a sibling directory’s src directory. We will then create a Vue package that exports all components defined in this file.

### excludeComponents

This is an array of component names to exclude from the output target build. This is useful if you need to have a framework-specific implementation of a particular component. For example, you may have a `my-tabs` tab view Web Component but need to rewrite this in Vue to take advantage of Vue Router.

### componentModels

This is an array of `ComponentModelConfig` objects for components that should be integrated with `v-model`.

```typescript
export interface ComponentModelConfig {

/**
* An array of element names that
* should have v-model integration.
*/
elements: string | string[];

/**
* The event emitted from the Web Component
* that should trigger a `v-model` update.
*/
event: string;

/**
* The Web Component property that the value
* of the `v-model` reference is based off.
*/
targetAttr: string;

/**
* (optional) The event to emit from the Vue component
* wrapper. When listening directly to the `event` emitted
* from the Web Component, the `v-model` reference has not
* yet had a chance to update. By setting `externalEvent`,
* your Web Component can emit `event`, the Vue output target
* can update the `v-model` reference, and then emit `externalEvent`,
* notifying the end user that `v-model` has changed. Defaults to `event`.
*/
externalEvent?: string;
}
```

```typescript
vueOutputTarget({
...,
componentModels: [
{
elements: ['my-input', 'my-textarea'],
event: 'v-on-change',
externalEvent: 'on-change',
targetAttr: 'value'
}
]
})
```

### loaderDir

This is the path to where the `defineCustomElements` function exists in your built project. If `loaderDir` is not provided, the `/dist/loader` directory will be used.

### includePolyfills

If `true`, polyfills will automatically be imported and the `applyPolyfills` function will be called in your proxies file. This can only be used when lazy loading Web Components and will not work when `includeImportCustomElements` is `true`.

### includeDefineCustomElements

If `true`, all Web Components will automatically be registered with the Custom Elements Registry. This can only be used when lazy loading Web Components and will not work when `includeImportCustomElements` is `true`.

### includeImportCustomElements

If `true`, the output target will import the custom element instance and register it with the Custom Elements Registry when the component is imported inside of a user's app. This can only be used with the [Custom Elements Bundle](https://stenciljs.com/docs/custom-elements) and will not work with lazy loaded components.

### customElementsDir

This is the directory where the custom elements are imported from when using the `[Custom Elements Bundle](https://stenciljs.com/docs/custom-elements)`. Defaults to the `components` directory. Only applies when `includeImportCustomElements` is `true`.



### Setup of Vue Component Library

There is an example component library package available on Github so that you can get started. This repo will likely live as a sibling to your Stencil component library.
Expand Down
Loading