@soleil-se/build-app 1.6.0 → 1.6.1

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.
package/index.js CHANGED
@@ -56,7 +56,7 @@ async function main() {
56
56
  })),
57
57
  task('config', config({ src: input.config, dest: './dist/src/config', cache: args.cache, debug: args.debug })),
58
58
  task('globalConfig', config({ src: input.globalConfig, dest: './dist/src/config/global', cache: args.cache })),
59
- task('files', files({ type: manifest.type, dest: './dist' })),
59
+ task('files', files({ manifest, dest: './dist' })),
60
60
  task('zip', zip({ src: './dist/src', dest: zipPath })),
61
61
  ];
62
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleil-se/build-app",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "bin": {
5
5
  "build-app": "./bin/index.js",
6
6
  "sv-app-build": "./bin/index.js"
package/utils/files.js CHANGED
@@ -31,9 +31,9 @@ async function moveFileIfExists(src, dest) {
31
31
  return fse.move(src, dest, { overwrite: true });
32
32
  }
33
33
 
34
- async function manageCss({ type, dest }) {
34
+ async function manageCss({ type, bundled, dest }) {
35
35
  const serverOutput = `${dest}/src/index.css`;
36
- const clientOutput = `${dest}/src/main.css`;
36
+ const clientOutput = bundled ? `${dest}/src/main.css` : `${dest}/src/resource/client/index.css`;
37
37
  const hooksOutput = `${dest}/src/hooks.css`;
38
38
 
39
39
  const cssDest = type.toLowerCase() === 'webapp' ? `${dest}/src/css` : `${dest}/src/resource/client`;
@@ -49,9 +49,10 @@ async function manageCss({ type, dest }) {
49
49
  ]);
50
50
  }
51
51
 
52
- export default function files({ type, dest }) {
53
- if (type.toLowerCase() === 'restapp') return manageCss({ type, dest });
52
+ export default function files({ manifest, dest }) {
53
+ const { type, bundled } = manifest;
54
+ if (type.toLowerCase() === 'restapp') return manageCss({ type, bundled, dest });
54
55
  return () => Promise.all(
55
- [createMain(dest), createIndex(dest), manageCss({ type, dest })],
56
+ [createMain(dest), createIndex(dest), manageCss({ type, bundled, dest })],
56
57
  );
57
58
  }