frontfire 0.8.2 → 0.8.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frontfire",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -1,3 +1,4 @@
1
+ /*
1
2
  // Core
2
3
  import fs from "node:fs";
3
4
  import path from "node:path";
@@ -57,80 +58,33 @@ const outDirRelease = `${buildDir}/release/app`;
57
58
 
58
59
  const staticAssetsDestDebug = `${buildDir}/debug/assets`;
59
60
  const staticAssetsDestRelease = `${buildDir}/release/assets`;
60
-
61
+ */
61
62
  export default {
62
- "buildDir" : buildDir,
63
- "debug" : {
64
- "server" : {
65
- "indexType" : "html",
66
- "port" : 3000
67
- },
68
- "esbuild" : {
69
- bundle: true,
70
- sourcemap: true,
71
- minify: false,
72
- logLevel: "info",
73
- entryPoints : entryPoints,
74
- outdir : outDirDebug,
75
- loader: {
76
- ".html" : "text",
77
- ".png" : "file"
78
- },
79
- banner : {
80
- js: "(() => { (new EventSource(\"/esbuild\")).addEventListener('change', () => location.reload() ); })();"
81
- },
82
- plugins: [
83
- copy({
84
- resolveFrom : 'cwd',
85
- assets: [
86
- {
87
- from: rootFilesToCopy,
88
- to: [`${buildDir}/debug` ]
89
- }
90
- ]
91
- }),
92
- copyStaticFiles({
93
- src: `src/assets`,
94
- dest: staticAssetsDestDebug,
95
- dereference: true,
96
- errorOnExist: false,
97
- preserveTimestamps: true,
98
- recursive: true
99
- })
100
- ]
101
- },
102
- },
103
- "release" : {
104
- "esbuild" : {
105
- bundle: true,
106
- sourcemap: true,
107
- minify: true,
108
- logLevel: "error",
109
- entryPoints : entryPoints,
110
- outdir : outDirRelease,
111
- loader: {
112
- ".html" : "text",
113
- ".png" : "file"
114
- },
115
- plugins: [
116
- copy({
117
- resolveFrom : 'cwd',
118
- assets: [
119
- {
120
- from: rootFilesToCopy,
121
- to: [`${buildDir}/release` ]
122
- }
123
- ]
124
- }),
125
- copyStaticFiles({
126
- src: `src/assets`,
127
- dest: staticAssetsDestRelease,
128
- dereference: true,
129
- errorOnExist: false,
130
- preserveTimestamps: true,
131
- recursive: true
132
- })
133
- ]
63
+ "buildDir": "build",
64
+ "debug": {
65
+ "server": { "indexType": "html", "port": 3000 },
66
+ "esbuild": {
67
+ "bundle": true,
68
+ "sourcemap": true,
69
+ "minify": false,
70
+ "logLevel": "info",
71
+ "entryPoints": [".\\src\\app\\main.js", ".\\src\\app\\main.css"],
72
+ "outdir": "build/debug/app/",
73
+ "loader": { ".html": "text", ".png": "file" },
74
+ "banner": {
75
+ "js": "(() => { (new EventSource(\"/esbuild\")).addEventListener('change', () => location.reload() ); })();"
134
76
  }
77
+ }
78
+ },
79
+ "release": {
80
+ "esbuild": {
81
+ "bundle": true,
82
+ "sourcemap": true,
83
+ "minify": true,
84
+ "logLevel": "error",
85
+ "entryPoints": [".\\src\\app\\main.js", ".\\src\\app\\main.css"],
86
+ "outdir": "build/release/app",
87
+ "loader": { ".html": "text", ".png": "file" }
88
+ }
135
89
  }
136
90
  };
package/src/FrontFire.js CHANGED
@@ -61,7 +61,7 @@ export default async function frontFire( isWatch, cfg = {} )
61
61
  if ( true === isWatch )
62
62
  {
63
63
  const outerPort = serverOpts && serverOpts.hasOwnProperty( 'port' ) ? +serverOpts.port : 3000;
64
-
64
+ fse.copySync( 'src', `${rootBuildDir}${path.sep}debug` );
65
65
  fs.watchFile( `src${path.sep}index.html`, async ( curr, prev ) =>
66
66
  {
67
67
  const result = await ctx.rebuild();
@@ -122,6 +122,7 @@ export default async function frontFire( isWatch, cfg = {} )
122
122
  }
123
123
  else
124
124
  {
125
+ fse.copySync( 'src', `${rootBuildDir}${path.sep}release` );
125
126
  await ctx.rebuild();
126
127
  ctx.dispose();
127
128
 
package/src/index.js CHANGED
@@ -345,7 +345,7 @@ if ( fs.statSync( 'frontfire.json', { "throwIfNoEntry": false } ) )
345
345
  }
346
346
 
347
347
  program
348
- .command( 'run-dev' )
348
+ .command( 'start-dev' )
349
349
  .description( 'Running development server.' )
350
350
  .action( function() { frontFire( true, customConfig ); } );
351
351