@soleil-se/build-app 1.2.0 → 1.2.2

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/config/index.js CHANGED
@@ -2,7 +2,7 @@ import { client, server } from '../rollup/index.js';
2
2
  import copy from '../utils/copy.js';
3
3
  import configFiles from '../utils/configFiles.js';
4
4
 
5
- export default function config({ src, dest, cache }) {
5
+ export default function config({ src, dest, cache, debug }) {
6
6
  if (src) {
7
7
  return [
8
8
  copy({ src: `${src}/index.html`, dest }),
@@ -10,6 +10,7 @@ export default function config({ src, dest, cache }) {
10
10
  server({
11
11
  input: `${src}/index.js`,
12
12
  output: `${dest}/index.js`,
13
+ debug,
13
14
  }),
14
15
  client({
15
16
  input: `${src}/config.js`,
@@ -18,6 +19,7 @@ export default function config({ src, dest, cache }) {
18
19
  showSize: false,
19
20
  hydratable: false,
20
21
  cache,
22
+ debug,
21
23
  }),
22
24
  configFiles({ dest }),
23
25
  ];
package/config.js CHANGED
@@ -1,11 +1,8 @@
1
1
  import config from '@soleil-se/build-config';
2
2
 
3
3
  import fse from 'fs-extra';
4
- import { createRequire } from 'module';
5
4
  import { dirname } from 'path';
6
5
 
7
- const require = createRequire(import.meta.url);
8
-
9
6
  function readManifestFile() {
10
7
  if (fse.existsSync('./manifest.json')) return fse.readJsonSync('./manifest.json');
11
8
  if (fse.existsSync('./src/manifest.json')) return fse.readJsonSync('./src/manifest.json');
@@ -65,5 +62,3 @@ const folders = [
65
62
 
66
63
  export const watchPaths = folders.map((folder) => `${folder}/**/*`).concat('./manifest.json');
67
64
  export const eslintPaths = folders.map((folder) => `${folder}/**/*.{js,svelte}`);
68
-
69
- export const { version: buildVersion } = require('./package.json');
package/index.js CHANGED
@@ -2,11 +2,11 @@ import args from '@soleil-se/build-utils/args';
2
2
  import runTasks from '@soleil-se/build-utils/runTasks';
3
3
  import task from '@soleil-se/build-utils/task';
4
4
  import watch from '@soleil-se/build-utils/watch';
5
- import { getTimestamp, logError, logInfo } from '@soleil-se/build-utils/log';
5
+ import { getTimestamp, logError, logInfo, logStartup } from '@soleil-se/build-utils/log';
6
6
  import chalk from 'chalk';
7
7
 
8
8
  import {
9
- input, type, manifest, env, projectRoot, buildVersion, rollup, watchPaths, eslintPaths,
9
+ input, type, manifest, env, projectRoot, rollup, watchPaths, eslintPaths,
10
10
  } from './config.js';
11
11
 
12
12
  import { clean, copy, files, zip, eslint } from './utils/index.js';
@@ -19,7 +19,7 @@ const zipPath = `./dist/${manifest.id}-${manifest.version}.zip`;
19
19
 
20
20
  async function main() {
21
21
  console.log(getTimestamp(), `${manifest.name} (${manifest.id})`);
22
- console.log(getTimestamp(), chalk.green('Starting'), '@soleil-se/sv-app-build', chalk.green('version'), chalk.green(chalk.underline(buildVersion)));
22
+ logStartup(import.meta.url);
23
23
  logInfo(`Using ${chalk.white('project_config.json')} in ${chalk.white(projectRoot)}`);
24
24
  const tasks = [
25
25
  task('clean', clean({ dir: './dist' })),
@@ -55,7 +55,7 @@ async function main() {
55
55
  cache: args.cache,
56
56
  cssOutput,
57
57
  })),
58
- task('config', config({ src: input.config, dest: './dist/src/config', cache: args.cache })),
58
+ task('config', config({ src: input.config, dest: './dist/src/config', cache: args.cache, debug: args.debug })),
59
59
  task('globalConfig', config({ src: input.globalConfig, dest: './dist/src/config/global', cache: args.cache })),
60
60
  task('files', files({ type: manifest.type, dest: './dist' })),
61
61
  task('zip', zip({ src: './dist/src', dest: zipPath })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleil-se/build-app",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "bin": {
5
5
  "build-app": "./bin/index.js",
6
6
  "sv-app-build": "./bin/index.js"
@@ -23,7 +23,7 @@
23
23
  "@rollup/plugin-node-resolve": "13.1.3",
24
24
  "@rollup/plugin-replace": "4.0.0",
25
25
  "@soleil-se/build-config": "1.1.1",
26
- "@soleil-se/build-utils": "1.3.0",
26
+ "@soleil-se/build-utils": "1.4.0",
27
27
  "archiver": "5.3.0",
28
28
  "autoprefixer": "10.4.2",
29
29
  "babel-plugin-transform-async-to-promises": "0.8.18",
@@ -35,7 +35,7 @@
35
35
  "gzip-size": "7.0.0",
36
36
  "lodash-es": "4.17.21",
37
37
  "postcss": "8.4.7",
38
- "postcss-discard-duplicates": "5.0.3",
38
+ "postcss-discard-duplicates": "5.1.0",
39
39
  "postcss-pxtorem": "6.0.0",
40
40
  "pretty-bytes": "6.0.0",
41
41
  "rollup": "2.68.0",
package/utils/eslint.js CHANGED
@@ -16,7 +16,7 @@ export default function createESLint({ src }) {
16
16
  logNotInstalledWarning();
17
17
  }
18
18
  if (ESLint) {
19
- const eslint = new ESLint();
19
+ const eslint = new ESLint({ errorOnUnmatchedPattern: false });
20
20
  const formatter = await eslint.loadFormatter();
21
21
  const results = await eslint.lintFiles(src);
22
22
  const errors = ESLint.getErrorResults(results);