@ossy/app 0.7.10 → 0.7.12
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/cli/build.js +7 -6
- package/cli/proxy-internal.js +1 -0
- package/package.json +2 -2
package/cli/build.js
CHANGED
|
@@ -32,7 +32,7 @@ export const build = async (cliArgs) => {
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
const appSourcePath = path.resolve(options['--source'] || 'src/App.jsx');
|
|
35
|
-
let apiSourcePath = path.resolve(options['--api-source'] || 'src/
|
|
35
|
+
let apiSourcePath = path.resolve(options['--api-source'] || 'src/api.js');
|
|
36
36
|
let middlewareSourcePath = path.resolve(options['--middleware-source'] || 'src/middleware.js');
|
|
37
37
|
const configPath = path.resolve(options['--config'] || 'src/config.js');
|
|
38
38
|
const buildPath = path.resolve(options['--destination'] || 'build');
|
|
@@ -49,7 +49,7 @@ export const build = async (cliArgs) => {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
if (!fs.existsSync(apiSourcePath)) {
|
|
52
|
-
apiSourcePath = path.resolve(scriptDir, '
|
|
52
|
+
apiSourcePath = path.resolve(scriptDir, 'api.js')
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
if (!fs.existsSync(middlewareSourcePath)) {
|
|
@@ -110,11 +110,12 @@ export const build = async (cliArgs) => {
|
|
|
110
110
|
dir: 'build',
|
|
111
111
|
// preserveModules: true,
|
|
112
112
|
entryFileNames: ({ name }) => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
|
|
114
|
+
const serverFileNames = ['server', 'api', 'middleware']
|
|
115
|
+
|
|
116
|
+
if (serverFileNames.includes(name)) {
|
|
116
117
|
return '[name].js'
|
|
117
|
-
}
|
|
118
|
+
} else if (name === 'client') {
|
|
118
119
|
return 'public/static/main.js'
|
|
119
120
|
} else if (name === 'config') {
|
|
120
121
|
return 'public/static/[name].js'
|
package/cli/proxy-internal.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ossy/app",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"source": "./src/index.js",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"/cli",
|
|
59
59
|
"README.md"
|
|
60
60
|
],
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "3bb7294899db2f2c76389eeec7986fa32f46b3d5"
|
|
62
62
|
}
|