polylith 0.1.80 → 0.1.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,15 @@
1
- import {App, utils} from '@polylith/builder';
2
- import path from "path/posix";
1
+ import {App} from '@polylith/builder';
2
+ import path from 'path/posix';
3
3
 
4
- var projectRoot = path.join(utils.fileToPath(import.meta.url), '../');
5
- class {App}App extends App {
6
- constructor() {
7
- super('{app}', {
4
+ var projectRoot = path.join(path.dirname(import.meta.url), '../');
5
+ export default class {App}App extends App {
6
+ constructor(config) {
7
+ super('{app}', config, {
8
8
  root: projectRoot,
9
9
  index: '{path}{src}/index.js',
10
10
  dest: '{dest}'
11
11
  });
12
- this.setHtmlTemplate('{path}/{src}/index.html', '{dest}{path}/index.html');
12
+ this.setHtmlTemplate('{path}/{src}/templates/index.html', '{dest}{path}/index.html');
13
13
  this.addResources('', [
14
14
  {
15
15
  "dest": "images",
@@ -19,7 +19,7 @@ class {App}App extends App {
19
19
  },
20
20
  ])
21
21
 
22
- this.addMainCss([
22
+ this.addMainCss('', [
23
23
  {
24
24
  "dest": "styles",
25
25
  "cwd": "styles",
@@ -29,5 +29,3 @@ class {App}App extends App {
29
29
  ]);
30
30
  }
31
31
  }
32
-
33
- export const app = new {App}App();
package/bin/apps.js CHANGED
@@ -98,6 +98,7 @@ async function getApp(spec, config) {
98
98
  } catch(e) {
99
99
  console.warn(`error loading app ${spec.name}`);
100
100
  console.warn(e.message);
101
+ if (e.stack) console.warn(e.stack);
101
102
  return false;
102
103
  }
103
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polylith",
3
- "version": "0.1.80",
3
+ "version": "0.1.81",
4
4
  "description": "cli for the polylith environment",
5
5
  "bin": {
6
6
  "polylith": "bin/polylith.js"