Skip to content

Commit

Permalink
update package name
Browse files Browse the repository at this point in the history
  • Loading branch information
WanjaTschuorSICKAG committed Oct 27, 2022
1 parent fdae101 commit 53bd50f
Show file tree
Hide file tree
Showing 26 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ const api = await expose({
## Installation

```bash
npm install @collage/collage
npm install @collage/core
```
12 changes: 6 additions & 6 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ Vite just created you two separate projects containing everything you need to de

```bash
cd dashboard
npm i @collage/collage
npm i @collage/core

cd ../todos
npm i @collage/collage
npm i @collage/core
```

::: tip
Expand Down Expand Up @@ -167,7 +167,7 @@ For now we just promote the Todos App and the Dashboard App to fragments by call

```javascript{2-3}
// Import and call the expose() function
import { expose } from '@collage/collage'
import { expose } from '@collage/core'
expose()
function addTodoItem(text) {
Expand All @@ -184,7 +184,7 @@ document.addEventListener('submit', event => {

```javascript{2-3}
// Import and call the expose() function
import { expose } from '@collage/collage'
import { expose } from '@collage/core'
expose()
// nothing else to do for now
Expand Down Expand Up @@ -253,7 +253,7 @@ Here we will need the [**Topics API**](../docs/core-api.html#topics-api) specifi
::: code-group-item todos/main.js

```javascript{1-11,18-23,34,45}
import { expose } from '@collage/collage'
import { expose } from '@collage/core'
const context = await expose({
services: {
todos: {
Expand Down Expand Up @@ -344,7 +344,7 @@ In this case we would like to have access to the todos 'active' topic and to the
::: code-group-item dashboard/main.js

```javascript{1-11,15,23}
import { expose } from '@collage/collage'
import { expose } from '@collage/core'
const context = await expose({
services: {
todos: {
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@collage/collage-docs",
"name": "@collage/core-docs",
"version": "1.0.0",
"description": "Documentation App for the collage lib",
"main": "vuepress-config.js",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@collage/collage",
"version": "0.2.4",
"name": "@collage/core",
"version": "0.2.5",
"description": "A library to handle communication between micro frontends and enable an easy to use orchestration",
"repository": {
"type": "git",
"url": "git+https://github.com/SICKAG/collage.git"
},
"author": "Wanja Tschuor <wanja.tschuor@sick>",
"author": "Wanja Tschuor <wanja.tschuor@sick.de>",
"contributors": [
"Susanne Kirchner <[email protected]>",
"Joshua Hagedorn <[email protected]"
"Joshua Hagedorn <[email protected]>"
],
"license": "MIT",
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion src/core/config-plugin/samples/config-fragment.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
</style>
<script type="module">
import { expose, onConfigUpdated, onLoaded } from "@collage/collage";
import { expose, onConfigUpdated, onLoaded } from "@collage/core";

const frontendDescription = {};

Expand Down
2 changes: 1 addition & 1 deletion src/core/config-plugin/samples/config-fragment2.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
</style>
<script type="module">
import { expose, onConfigUpdated } from "@collage/collage";
import { expose, onConfigUpdated } from "@collage/core";

const frontendDescription = {};

Expand Down
2 changes: 1 addition & 1 deletion src/core/config-plugin/samples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
</style>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";
const description = {
fragmentsConfig: {
"./config-fragment.html": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script type="module">
import { expose, onLoaded } from "@collage/collage";
import { expose, onLoaded } from "@collage/core";
expose({
functions: {
castSpell(spell) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";
expose({
functions: {
bla(bla) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";
expose({
functions: {
bla(bla) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/direct-functions-plugin/samples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script type="module">
import { expose, onLoaded } from "@collage/collage";
import { expose, onLoaded } from "@collage/core";

function onClickAt(selector, fn) {
document.addEventListener("click", (e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script type="module">
import { expose, onUpdated } from "@collage/collage";
import { expose, onUpdated } from "@collage/core";

function isCollageUUID(id) {
return id && /^collage-fragment-[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i.test(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script type="module">
import { expose, onUpdated, onConfigUpdated } from "@collage/collage";
import { expose, onUpdated, onConfigUpdated } from "@collage/core";

function isCollageUUID(id) {
return id && /^collage-fragment-[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i.test(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
</style>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";

expose({
services: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}
</style>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";
function findFragment(id) {
return [...document.querySelectorAll('collage-fragment')]
.find(element => element.querySelector('iframe').name == id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
</style>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";

expose({
services: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
</style>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";

expose({
services: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
</style>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";

expose({
services: {
Expand Down
2 changes: 1 addition & 1 deletion src/core/topics-plugin/service-topics/samples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script type="module">
import { expose, onLoaded } from "@collage/collage";
import { expose, onLoaded } from "@collage/core";
const services = {
language: {
switchTo() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";

const services = {
language: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";

const services = {
language: {
Expand Down
2 changes: 1 addition & 1 deletion src/core/topics-plugin/simple-topics/samples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script type="module">
import { expose, onLoaded } from "@collage/collage";
import { expose, onLoaded } from "@collage/core";
expose({}).then((context) => {

const subscriptions = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";
expose({}).then((context) => {
const subscriptions = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script type="module">
import { expose } from "@collage/collage";
import { expose } from "@collage/core";
expose({}).then((context) => {

const subscriptions = [];
Expand Down
4 changes: 2 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ export default defineConfig({
build: {
lib: {
entry: 'src/index.ts',
name: '@collage/collage',
name: '@collage/core',
fileName: (format) => `collage.${format}.js`,
},
sourcemap: true,
},
resolve: {
alias: {
'@collage/collage': '/src/index.ts',
'@collage/core': '/src/index.ts',
},
},
server: {
Expand Down

0 comments on commit 53bd50f

Please sign in to comment.