Skip to content

Commit

Permalink
changed components directory name
Browse files Browse the repository at this point in the history
  • Loading branch information
bsiscanu committed Feb 11, 2019
1 parent ef8285e commit 8ac8f45
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@
* added SSL support

## 0.5.1
* restructured domy service
* restructured domy service

## 0.5.2
* changed directory name for components
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ To install all components listed in package.json `webcomponents` compartment, dr
domy install
```

Components are installed in the **node_modules/@domy** directory and could be reused in another **Stencil** application:
Components are installed in the **node_modules/@** directory and could be reused in another **Stencil** application:

```js
// master is a non-versioned release
import "@domy/MyComponent/master" // or
import "@/MyComponent/master" // or

// 0.1.0 is a versioned release
import "@domy/MyComponent/0.1.0"
import "@/MyComponent/0.1.0"
```

Remove a component from the registry (unpublish it):
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "domy-cli",
"version": "0.5.1",
"version": "0.5.2",
"description": "a package manager for web components",
"private": false,
"homepage": "https://domy.io",
Expand All @@ -15,7 +15,9 @@
},
"keywords": [
"domy",
"components"
"stencil",
"webcomponents",
"custom-elements"
],
"scripts": {
"build": "webpack -d",
Expand Down
9 changes: 3 additions & 6 deletions src/services/domy.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,18 @@ export class DomyService {
*/
public async gather(name: string, version: string, catalog: string): Promise<void> {

const base = this.fileService.grub();

// todo: get output dir (dist) from stencil config
const base = this.fileService.grub();
const collection = "dist/collection/collection-manifest.json";
const webcomponents = "dist/web-components.json";
let components: Array<any>;

const manifest = await this.fileService.read(join(base, collection))
.then(data => JSON.parse(data));

const details = await this.fileService.read(join(base, webcomponents))
.then(data => JSON.parse(data));

let components: Array<any>;

const release = this.fileService.versioning(version);

if (name !== undefined) {
Expand Down Expand Up @@ -233,8 +231,7 @@ export class DomyService {
): Promise<boolean> {

const root = this.fileService.grub();

const domy = join(root, "node_modules", "@domy");
const domy = join(root, "node_modules", "@");
const base = catalog ? join(domy, catalog) : domy;

[domy, base].forEach(point => {
Expand Down
3 changes: 1 addition & 2 deletions src/services/file.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ export class FileService {
if (Array.isArray(segments) && segments.length > 0) {

const pathway = segments.join("/");

const guesses = [
join(pathway, "package.json"),
join(pathway, "stencil.config.js"),
Expand Down Expand Up @@ -330,7 +329,7 @@ export class FileService {
const version = this.versioning(release);

return this.rimraf(
join(root, "node_modules", "@domy", dir, component, version)
join(root, "node_modules", "@", dir, component, version)
);
});
}
Expand Down

0 comments on commit 8ac8f45

Please sign in to comment.