5htp 0.4.3 → 0.4.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.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "5htp",
|
|
3
3
|
"description": "Convenient TypeScript framework designed for Performance and Productivity.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.5",
|
|
5
5
|
"author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
|
|
6
6
|
"repository": "git://github.com/gaetanlegac/5htp.git",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@types/webpack-env": "^1.16.2",
|
|
41
41
|
"@types/ws": "^7.4.7",
|
|
42
42
|
"babel-loader": "^8.2.2",
|
|
43
|
-
"babel-plugin-glob-import": "^0.0.
|
|
43
|
+
"babel-plugin-glob-import": "^0.0.9-1",
|
|
44
44
|
"babel-plugin-transform-imports": "^2.0.0",
|
|
45
45
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
46
46
|
"brotli-webpack-plugin": "^1.1.0",
|
|
@@ -73,12 +73,14 @@
|
|
|
73
73
|
"ts-alias": "^0.0.7",
|
|
74
74
|
"ts-node": "^10.9.1",
|
|
75
75
|
"webfont": "^11.2.26",
|
|
76
|
+
"webpack": "^5.89.0",
|
|
76
77
|
"webpack-assets-manifest": "^5.0.6",
|
|
77
78
|
"webpack-bundle-analyzer": "^4.4.2",
|
|
78
79
|
"webpack-dev-middleware": "^5.1.0",
|
|
79
80
|
"webpack-hot-middleware": "^2.25.0",
|
|
80
81
|
"webpack-node-externals": "^3.0.0",
|
|
81
|
-
"webpack-virtual-modules": "^0.4.3"
|
|
82
|
+
"webpack-virtual-modules": "^0.4.3",
|
|
83
|
+
"babel-plugin-transform-remove-console": "^6.9.4"
|
|
82
84
|
},
|
|
83
85
|
"devDependencies": {
|
|
84
86
|
"@types/babel__preset-env": "^7.9.6",
|
|
@@ -87,8 +89,6 @@
|
|
|
87
89
|
"@types/node": "^16.9.1",
|
|
88
90
|
"@types/nodemailer": "^6.4.4",
|
|
89
91
|
"@types/prompts": "^2.0.14",
|
|
90
|
-
"@types/webpack-env": "^1.16.2"
|
|
91
|
-
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
92
|
-
"webpack": "^5.89.0"
|
|
92
|
+
"@types/webpack-env": "^1.16.2"
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -116,6 +116,8 @@ export default function createCompiler( app: App, mode: TCompileMode ): webpack.
|
|
|
116
116
|
app.paths.root + '/src/common',
|
|
117
117
|
cli.paths.core.root + '/src/common',
|
|
118
118
|
|
|
119
|
+
app.paths.root + '/src/server/.generated/models.ts',
|
|
120
|
+
|
|
119
121
|
],
|
|
120
122
|
rules: require('../common/babel')(app, 'client', dev)
|
|
121
123
|
},
|
|
@@ -117,15 +117,19 @@ module.exports = (app: App, side: TAppSide, dev: boolean): webpack.RuleSetRule[]
|
|
|
117
117
|
"transform": "lodash/${member}",
|
|
118
118
|
"preventFullImport": true
|
|
119
119
|
}
|
|
120
|
-
}]
|
|
120
|
+
}],
|
|
121
|
+
|
|
122
|
+
...(side === 'client' ? [
|
|
123
|
+
|
|
124
|
+
[require('babel-plugin-transform-remove-console')],
|
|
125
|
+
|
|
126
|
+
] : [])
|
|
121
127
|
]),
|
|
122
128
|
|
|
123
129
|
require('./routes/routes')({ side, app, debug: false }),
|
|
124
130
|
|
|
125
131
|
...(side === 'client' ? [
|
|
126
132
|
|
|
127
|
-
[require('babel-plugin-transform-remove-console')],
|
|
128
|
-
|
|
129
133
|
] : [
|
|
130
134
|
|
|
131
135
|
require('./plugins/services')({ side, app, debug: false }),
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import type { ImportTransformer } from 'babel-plugin-glob-import';
|
|
7
7
|
import * as types from '@babel/types'
|
|
8
8
|
import path from 'path';
|
|
9
|
+
import generate from '@babel/generator';
|
|
9
10
|
|
|
10
11
|
// Core
|
|
11
12
|
import cli from '@cli';
|
|
@@ -32,9 +33,9 @@ module.exports = (app: App, side: TAppSide, dev: boolean): ImportTransformer =>
|
|
|
32
33
|
side === 'client'
|
|
33
34
|
&&
|
|
34
35
|
(
|
|
35
|
-
request.source === '
|
|
36
|
+
request.source === '@client/pages/**/([a-z0-9]*).tsx'
|
|
36
37
|
||
|
|
37
|
-
request.source === '
|
|
38
|
+
request.source === '@/client/pages/**/([a-z0-9]*).tsx'
|
|
38
39
|
)
|
|
39
40
|
&&
|
|
40
41
|
request.type === 'import'
|
|
@@ -59,14 +60,6 @@ module.exports = (app: App, side: TAppSide, dev: boolean): ImportTransformer =>
|
|
|
59
60
|
//console.log("Exclude", file, 'from pages loaders (its a layout)');
|
|
60
61
|
continue;
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
-
// Excliude components
|
|
64
|
-
const filename = path.basename( file.filename );
|
|
65
|
-
const startsWithUppercase = alphabet.includes(filename[0]) && filename[0] === filename[0].toUpperCase();
|
|
66
|
-
if (startsWithUppercase) {
|
|
67
|
-
//console.log("Exclude", file, 'from pages loaders (its a component)');
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
63
|
|
|
71
64
|
// Page config
|
|
72
65
|
const { chunkId } = cli.paths.getPageChunk(app, file.filename);
|
|
@@ -115,6 +108,11 @@ module.exports = (app: App, side: TAppSide, dev: boolean): ImportTransformer =>
|
|
|
115
108
|
)
|
|
116
109
|
}
|
|
117
110
|
}
|
|
111
|
+
|
|
112
|
+
console.log( generate(t.variableDeclaration("const", [t.variableDeclarator(
|
|
113
|
+
t.identifier(request.imported.name),
|
|
114
|
+
t.objectExpression(pageLoaders)
|
|
115
|
+
)])).code );
|
|
118
116
|
|
|
119
117
|
return [
|
|
120
118
|
...imports,
|
|
@@ -425,9 +425,10 @@ function Plugin(babel, { app, side, debug }: TOptions) {
|
|
|
425
425
|
)
|
|
426
426
|
)
|
|
427
427
|
])
|
|
428
|
-
)
|
|
428
|
+
);
|
|
429
429
|
|
|
430
|
-
|
|
430
|
+
/*(file.side === 'front' && file.path.includes('/headhunter/talents/index.tsx'))
|
|
431
|
+
&& console.log( file.path, generate(exportDeclaration).code );*/
|
|
431
432
|
|
|
432
433
|
return exportDeclaration;
|
|
433
434
|
}
|