polylith 0.1.4 → 0.1.5

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.
@@ -2,10 +2,10 @@
2
2
  "files": [
3
3
  {"when": "code", "path": "{builds}/{app}.js", "template": "build.js.txt"},
4
4
  {"when-not": "code", "path": "{builds}/{app}.json", "template": "build.json"},
5
- {"path": "{src}/{path}templates/index.html", "template": "template.html"},
6
- {"when-not": "react", "path": "{src}/{path}index.js", "template": "index.js"},
7
- {"when": "react", "path": "{src}/{path}index.js", "template": "index-react.js"},
8
- {"when": "react", "path": "{src}/{path}main/main.jsx", "template": "main.js"},
9
- {"when": "react", "path": "{src}/{path}main/App.jsx", "template": "app.jsx.txt"}
5
+ {"path": "{src}{path}/templates/index.html", "template": "template.html"},
6
+ {"when-not": "react", "path": "{src}{path}/index.js", "template": "index.js"},
7
+ {"when": "react", "path": "{src}{path}/index.js", "template": "index-react.js"},
8
+ {"when": "react", "path": "{src}{path}/main/main.jsx", "template": "main.js"},
9
+ {"when": "react", "path": "{src}{path}/main/App.jsx", "template": "app.jsx.txt"}
10
10
  ]
11
11
  }
@@ -5,7 +5,7 @@ var projectRoot = path.join(utils.fileToPath(import.meta.url), '../');
5
5
  class {App}App extends App {
6
6
  constructor() {
7
7
  super('{app}', projectRoot, '{path}{src}/index.js', '{dest}');
8
- this.setHtmlTemplate('{path}{src}/index.html', '{dest}/{path}index.html');
8
+ this.setHtmlTemplate('{path}/{src}/index.html', '{dest}{path}/index.html');
9
9
  this.addResources('', [
10
10
  {
11
11
  "dest": "styles",
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "{app}",
3
- "dest": "{dest}/{path}",
4
- "source": "{src}/{path}",
5
- "index": "{src}/{path}index.js",
3
+ "dest": "{dest}{path}",
4
+ "source": "{src}{path}",
5
+ "index": "{src}{path}index.js",
6
6
  "template": {
7
- "source": "{src}/{path}templates/index.html",
8
- "destination": "{dest}/{path}index.html"
7
+ "source": "{src}{path}/templates/index.html",
8
+ "destination": "{dest}{path}/index.html"
9
9
  },
10
10
  "resources": [
11
11
  {
package/bin/apps.js CHANGED
@@ -136,7 +136,7 @@ export async function build(name, config, options, watch) {
136
136
 
137
137
  async function server(apps, options) {
138
138
  var server = new PolylithServer({apps: apps}, options.dest);
139
- server.create();
139
+ await server.create();
140
140
  server.start(options.port || '8081');
141
141
  }
142
142
 
package/bin/polylith.js CHANGED
@@ -300,7 +300,7 @@ function getNames(params) {
300
300
  names.builds = OPTIONS.builds;
301
301
  names.src = OPTIONS.src;
302
302
  names.react = OPTIONS.react;
303
- names.path = OPTIONS.multiple ? app + '/' : '';
303
+ names.path = OPTIONS.multiple ? '/' + app : '';
304
304
 
305
305
  return names;
306
306
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polylith",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "cli for the polylith environment",
5
5
  "bin": {
6
6
  "polylith": "bin/polylith.js"