Skip to content

Commit

Permalink
Merge pull request #6 from gjovanovicst/main
Browse files Browse the repository at this point in the history
Main - First initial features commit
  • Loading branch information
gjovanovicst authored Oct 15, 2021
2 parents 1cb51b5 + 6fa1ac7 commit 2472507
Show file tree
Hide file tree
Showing 173 changed files with 42,034 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
dist/
dist-transpiled/
build/
www/
loader/

*~
*.sw[mnpcod]
*.log
*.lock
*.tmp
*.tmp.*
log.txt
*.sublime-project
*.sublime-workspace

.stencil/
.idea/
.vscode/
.sass-cache/
.versions/
.yalc/
node_modules/
$RECYCLE.BIN/

.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate
.env

# GitHub
.github_changelog_generator
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.16.0
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Adaleks Technology
Copyright (c) 2021 Elwin van Eede

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,32 @@
# anywhere-ui
Rich web components, includes framework bindings.
# AnywhereUI Web Components

Library of web components, includes framework bindings.

## Getting Started

To start building a new AnywhereUI web component using Stencil, clone this repo to a new directory:

```bash
git clone https://github.com/gjovanovicst/anywhere-ui.git
cd anywhere-ui
```

and run:

```bash
cd packages/core
npm install
npm start
```

To build the component for production, run:

```bash
npm run build
```

To run the unit tests for the components, run:

```bash
npm test
```
6 changes: 6 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"packages": [
"packages/*"
],
"version": "0.1.1"
}
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "root",
"private": true,
"devDependencies": {
"lerna": "^4.0.0"
}
}
16 changes: 16 additions & 0 deletions packages/angular/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
46 changes: 46 additions & 0 deletions packages/angular/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
68 changes: 68 additions & 0 deletions packages/angular/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Angular

Angular has a pretty good story for integration with web components but there are a few issues with the developer experience. If you want to know what the story is without the bindings go here: https://stenciljs.com/docs/angular.

With bindings the web components get wrapped in an Angular component and then immediately become available as Angular Components. Some of the advantages of doing this are that you get types for your components and you also get the ability to use ngmodel on inputs. Your developers then consuming your web components from Angular applications import an actual Angular Library and to them it feels as though they are interacting with Angular components.

## Install

```bash
npm install @anywhere-ui/angular
```

## Style

The css dependencies should be added in `angular.json` file

```json
{
...

"build": {
...

"options": {
"styles": [
"./node_modules/@anywhere-ui/core/dist/anywhere-ui/anywhere-ui.css"
],
}
},
...

"test": {
"styles": [
"./node_modules/@anywhere-ui/core/dist/anywhere-ui/anywhere-ui.css"
],
}

...

}
```

## Usage

```ts
import { AnywhereUiModule } from '@anywhere-ui/angular';

@NgModule({
...
imports: [
AnywhereUiModule
],
...
})
export class AppModule { }
```

## Build

```bash
ng build --configuration=production
```

## How to release a new version

- Build the core package
- Run build on this package
- Publish
48 changes: 48 additions & 0 deletions packages/angular/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"anywhere-ui": {
"projectType": "library",
"root": "projects/anywhere-ui",
"sourceRoot": "projects/anywhere-ui/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/anywhere-ui/tsconfig.lib.json",
"project": "projects/anywhere-ui/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/anywhere-ui/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/anywhere-ui/src/test.ts",
"tsConfig": "projects/anywhere-ui/tsconfig.spec.json",
"karmaConfig": "projects/anywhere-ui/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/anywhere-ui/tsconfig.lib.json",
"projects/anywhere-ui/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "anywhere-ui"
}
Loading

0 comments on commit 2472507

Please sign in to comment.