Skip to content

Commit

Permalink
chore(fast-element): configure production build and add test setup (m…
Browse files Browse the repository at this point in the history
…icrosoft#3053)

* chore(fast-element): configure production build and add test setup

* chore(fast-element): add missing dependency

* chore(fast-element): do not remove comments from build output

* chore(fast-element): add "test" task to alias verbose node tests for CI

* fix(fast-element): correct a package dependency

* fix(fast-element): better dts ouput types and fixed break in components

* chore(fast-element): add gen for dts bundle, api report, and docs json

* add @types related to testing to the no-hoist list to ensure there are no conflicts with the *.d.ts lib check during compilation

* chore(fast-element): update .npmignore for better npm pack results

* chore(fast-element): configure production build and add test setup

* chore(fast-element): add missing dependency

* chore(fast-element): do not remove comments from build output

* chore(fast-element): add "test" task to alias verbose node tests for CI

* fix(fast-element): correct a package dependency

* fix(fast-element): better dts ouput types and fixed break in components

* chore(fast-element): add gen for dts bundle, api report, and docs json

* add @types related to testing to the no-hoist list to ensure there are no conflicts with the *.d.ts lib check during compilation

* chore(fast-element): lets see if this fixes CI

Co-authored-by: Chris Holt <chhol@microsoft.com>
  • Loading branch information
EisenbergEffect and chrisdholt authored May 6, 2020
1 parent 62e4ea6 commit 200f6a0
Show file tree
Hide file tree
Showing 44 changed files with 3,076 additions and 246 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"private": true,
"workspaces": {
"packages": ["packages/**/*", "sites/fast-color-explorer", "sites/fast-component-explorer", "sites/fast-creator", "sites/site-utilities"],
"nohoist": ["**/react-syntax-highlighter"]
"nohoist": ["**/react-syntax-highlighter", "**/@types/chai", "**/@types/jest", "**/@types/karma", "**/@types/mocha"]
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { html } from "@microsoft/fast-element";
import { when } from "@microsoft/fast-element";
import { ref } from "@microsoft/fast-element/dist/directives/";
import { ref } from "@microsoft/fast-element";
import { Dialog } from "./dialog";

export const DialogTemplate = html<Dialog>`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { html } from "@microsoft/fast-element";
import { ref } from "@microsoft/fast-element/dist/directives";
import { ref } from "@microsoft/fast-element";
import { Slider } from "./slider";

export const SliderTemplate = html<Slider>`
Expand Down
4 changes: 4 additions & 0 deletions packages/web-components/fast-element/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.rollupcache
coverage
tsdoc-metadata.json
temp
8 changes: 8 additions & 0 deletions packages/web-components/fast-element/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"colors": true,
"recursive": true,
"timeout": 5000,
"require": [
"jsdom-global/register"
]
}
17 changes: 13 additions & 4 deletions packages/web-components/fast-element/.npmignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
# Tests
__test__/
dist/dts/__test__/
dist/esm/__test__/
*.spec.*
*.test.*
coverage/

# Source files
src/
docs/

# config files
.eslintignore
.eslintrc.js
.eslintrc.cjs
.prettierignore
tsconfig.json
tsconfig.json
rollup.config.js
karma.conf.cjs
api-extractor.json
.mocharc.json

# cache
.rollupcache
temp
20 changes: 20 additions & 0 deletions packages/web-components/fast-element/api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",

"mainEntryPointFilePath": "dist/dts/index.d.ts",

"apiReport": {
"enabled": true,
"reportFolder": "docs",
"reportFileName": "api-report.md"
},

"docModel": {
"enabled": true,
"apiJsonFilePath": "dist/fast-element.api.json"
},

"dtsRollup": {
"enabled": true
}
}
7 changes: 4 additions & 3 deletions packages/web-components/fast-element/docs/ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

There are many great open source projects that have inspired us and enabled us to build the `fast-element` library. Below are a few that stand out.

* [lit-html](https://lit-html.polymer-project.org/) - One of the first libraries to leverage standard JavaScript tagged template literals for HTML templates. We were inspired by this technique and wanted to explore whether it could be combined with our idea of arrow function expressions.
* [Aurelia 1 and Aurelia 2](https://aurelia.io/) - Various details of Aurelia 2's decorator and metadata model inspired us in the design of `fast-element`. Additionally, Aurelia 1's mechanisms for array observation, binding, and template compilation also guided us in our work.
* [Polymer](https://www.polymer-project.org/) - One of the first libraries (if not the first) to embrace Web Components.
* [Knockout](https://knockoutjs.com/) - One of the first JavaScript libraries (if not the first) to implement an observer system. The original techniques for observables and computed observables have influenced many libraries over the years. Re-interpreting these ideas in terms of modern JavaScript and DOM has helped us to build a powerful and robust system.
* [faastjs](https://github.com/faastjs) - A project with a similar name but a very different purpose. Their API documentation approach leveraging [api-extractor](https://api-extractor.com/) was a huge help to us.
* [Knockout](https://knockoutjs.com/) - One of the first JavaScript libraries (if not the first) to implement an observer system. The original techniques for observables and computed observables have influenced many libraries over the years. Re-interpreting these ideas in terms of modern JavaScript and DOM has helped us to build a powerful and robust system.
* [lit-html](https://lit-html.polymer-project.org/) - One of the first libraries to leverage standard JavaScript tagged template literals for HTML templates. We were inspired by this technique and wanted to explore whether it could be combined with our idea of arrow function expressions.
* [Polymer](https://www.polymer-project.org/) - One of the first libraries (if not the first) to embrace Web Components.
3 changes: 2 additions & 1 deletion packages/web-components/fast-element/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

Here you'll find preliminary documentation on the `fast-element` library.

* [Building Components](./building-components.md)
* Guides
* [Building Components](./guide/building-components.md)
Loading

0 comments on commit 200f6a0

Please sign in to comment.