polylith 0.1.79 → 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
  }
@@ -3,13 +3,43 @@
3
3
  "version": "0.1.0",
4
4
  "description": "Initial setup for a polylith project",
5
5
  "dependencies": {
6
+ "@polylith/browser": "^0.1.0",
7
+ "@polylith/builder": "^0.2.26",
6
8
  "@polylith/config-store": "^0.1.0",
7
- "@polylith/core": "^0.1.0",
8
- "react": "^17.0.2",
9
- "react-dom": "^17.0.2",
10
- "@polylith/builder": "^0.1.0",
11
- "@polylith/server": "^0.1.0",
12
- "polylith": "^0.1.0"
9
+ "@polylith/core": "^0.1.10",
10
+ "nodemon": "^3.0.1",
11
+ "polylith": "^0.1.79",
12
+ "react": "^18.2.0",
13
+ "react-dom": "^18.2.0"
14
+ },
15
+ "devDependencies": {
16
+ "@polylith/server": "^0.1.25",
17
+ "jasmine": "^4.5.0",
18
+ "jasmine-core": "^4.5.0",
19
+ "karma": "^6.4.1",
20
+ "karma-chrome-launcher": "^3.1.1",
21
+ "karma-jasmine": "^5.1.0",
22
+ "karma-jasmine-html-reporter": "^2.0.0",
23
+ "karma-spec-reporter": "^0.0.36",
24
+ "puppeteer": "^19.4.1"
25
+ },
26
+ "nodemonConfig": {
27
+ "delay": 2500,
28
+ "watch": [
29
+ "server",
30
+ "config"
31
+ ],
32
+ "exec": "npm start"
33
+ },
34
+ "scripts": {
35
+ "test": "start polylith test -a -w && start karma start --browsers ChromeHeadless karma.conf.cjs",
36
+ "dev": "start polylith watch --all -v false&start npm run dev:serve",
37
+ "karma": "karma start --browsers ChromeHeadless karma.conf.cjs",
38
+ "dev:tests": "polylith test -a -w",
39
+ "dev:watch": "polylith watch --all -v false",
40
+ "dev:serve": "nodemon",
41
+ "build": "polylith build --all",
42
+ "start": "polylith serve --all"
13
43
  },
14
44
  "type": "module"
15
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polylith",
3
- "version": "0.1.79",
3
+ "version": "0.1.81",
4
4
  "description": "cli for the polylith environment",
5
5
  "bin": {
6
6
  "polylith": "bin/polylith.js"