5htp 0.6.1-2 → 0.6.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/app/index.ts CHANGED
@@ -51,6 +51,8 @@ export class App {
51
51
 
52
52
  public packageJson: {[key: string]: any};
53
53
 
54
+ public buildId: number = Date.now();
55
+
54
56
  public paths = {
55
57
 
56
58
  root: cli.paths.appRoot,
@@ -27,7 +27,7 @@ import identityAssets from './identite';
27
27
  import cli from '../..';
28
28
 
29
29
  // Type
30
- import type App from '../../app';
30
+ import type { App } from '../../app';
31
31
 
32
32
  const debug = false;
33
33
 
@@ -41,10 +41,13 @@ export type TCompileMode = 'dev' | 'prod'
41
41
  - BASE CONFIG
42
42
  ----------------------------------*/
43
43
 
44
- export default function createCommonConfig( app: App, side: TAppSide, mode: TCompileMode ): webpack.Configuration {
44
+ export default function createCommonConfig(
45
+ app: App,
46
+ side: TAppSide,
47
+ mode: TCompileMode,
48
+ ): webpack.Configuration {
45
49
 
46
50
  const dev = mode === 'dev';
47
- const buildId = Date.now();
48
51
  const config: webpack.Configuration = {
49
52
 
50
53
  // Project root
@@ -79,14 +82,14 @@ export default function createCommonConfig( app: App, side: TAppSide, mode: TCom
79
82
 
80
83
  // Application
81
84
  BUILD_DATE: JSON.stringify(dayjs().format('YY.MM.DD-HH.mm')),
82
- BUILD_ID: JSON.stringify(buildId),
85
+ BUILD_ID: JSON.stringify(app.buildId),
83
86
  APP_PATH: JSON.stringify(app.paths.root),
84
87
  APP_NAME: JSON.stringify(app.identity.web.title),
85
88
 
86
89
  }),
87
90
 
88
91
  new PluginIndexage(side === 'client' ? {
89
- 'icones-svg': new IconesSvg(app, buildId),
92
+ 'icones-svg': new IconesSvg(app),
90
93
  } : {
91
94
  //'injection-dependances': new InjectDeps,
92
95
  }),
@@ -34,7 +34,7 @@ export default class IconesSVG extends Indexeur {
34
34
  private cacheTypes: string;
35
35
  private cacheIndex: string;
36
36
 
37
- public constructor( app: App, private buildId: number, private debug?: boolean ) {
37
+ public constructor( private app: App, private debug?: boolean ) {
38
38
  super();
39
39
 
40
40
  this.formats = ['woff2'];
@@ -182,7 +182,7 @@ export default class IconesSVG extends Indexeur {
182
182
  // Enregistrement fichiers
183
183
  for (const format of this.formats)
184
184
  fs.outputFileSync(this.dossierSortie + 'icons.' + format, result[ format ]);
185
- fs.outputFileSync(this.dossierSortie + 'icons.css', result.template?.replace('icons.woff2', 'icons.woff2?' + this.buildId));
185
+ fs.outputFileSync(this.dossierSortie + 'icons.css', result.template?.replace('icons.woff2', 'icons.woff2?' + this.app.buildId));
186
186
 
187
187
  fs.outputFileSync(this.cacheTypes, 'export type TIcones = ' + typeIcones.join('|') );
188
188
 
@@ -15,7 +15,7 @@ import cli from '@cli';
15
15
  import createCommonConfig, { TCompileMode, regex } from '../common';
16
16
 
17
17
  // Type
18
- import type App from '../../app';
18
+ import type { App } from '../../app';
19
19
 
20
20
  /*const getCorePluginsList = (app: App,) => {
21
21
 
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.6.1-2",
4
+ "version": "0.6.2",
5
5
  "author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
6
6
  "repository": "git://github.com/gaetanlegac/5htp.git",
7
7
  "license": "MIT",