Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Sep 26, 2023
0 parents commit 3b83650
Show file tree
Hide file tree
Showing 47 changed files with 59,601 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

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

[*.md]
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [smapiot, FlorianRappl]
28 changes: 28 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish Packages

on:
push:
branches: [main]

jobs:
build_app:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- name: Install Dependencies
run: |
./install-all.sh
- name: Build Packages
run: |
./build-all.sh
- name: Publish Packages
run: |
./publish-all.sh
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 smapiot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# `piral-ng-common`

This is a required supplemental package that brings auxiliary functionality to your Angular application embedded in a Piral instance using the `piral-ng` converter.

The package is supplemental as it depends on the version of Angular (in contrast to `piral-ng`, which does not depend on the version of Angular).

## Installation

By default the latest version is installed, which might not be the correct one. If this is the case, just install a specific version. For instance, doing the following installs an Angular 15 compatible version of `piral-ng-common`:

```sh
npm i piral-ng-common@^15
```

Make sure to keep this up-to-date / in alignment with the used version of Angular.

## Best Practices

Put this dependency in your `importmap` to opt-in to sharing it at runtime:

```json
{
"importmap": {
"imports": {
"piral-ng-common": ""
}
}
}
```

If you use standalone pilets with distributed sharing then the `importmap` section of a pilet is the right place. If this is centrally shared then we also recommend to put in there - just in case somebody wants to opt-out / use `fromNg`
13 changes: 13 additions & 0 deletions build-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

PACKAGES=('v9' 'v10' 'v11' 'v12' 'v13' 'v14' 'v15' 'v16')

for PACKAGE in "${PACKAGES[@]}"
do
cd packages/$PACKAGE

npm run build
npm run copy

cd ../..
done
12 changes: 12 additions & 0 deletions install-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

PACKAGES=('v9' 'v10' 'v11' 'v12' 'v13' 'v14' 'v15' 'v16')

for PACKAGE in "${PACKAGES[@]}"
do
cd packages/$PACKAGE

npm install

cd ../..
done
8 changes: 8 additions & 0 deletions packages/v10/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://raw.githubusercontent.com/ng-packagr/ng-packagr/main/src/ng-package.schema.json",
"dest": "dist",
"assets": [],
"lib": {
"entryFile": "./src/public_api.ts"
}
}
Loading

0 comments on commit 3b83650

Please sign in to comment.