odoro 0.1.4 → 0.2.0
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/dist/{build-J2J3NBV5.js → build-3SPCMZXZ.js} +1 -1
- package/dist/{chunk-JGXJBVI7.js → chunk-HCU53TIK.js} +17 -5
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/{package-VRJRDQY3.js → package-RDYY6ULW.js} +1 -1
- package/package.json +1 -1
- package/templates/react-ts/README.md +4 -3
|
@@ -3,7 +3,7 @@ import { extractEntries, applyAlias, isBareSpecifier } from './chunk-G5QXVBYT.js
|
|
|
3
3
|
import { info, colors, size, success, duration } from './chunk-JMEHF3KN.js';
|
|
4
4
|
import { existsSync } from 'fs';
|
|
5
5
|
import { readFile, rm, mkdir, writeFile, cp, stat } from 'fs/promises';
|
|
6
|
-
import { join, basename, resolve, relative, sep } from 'path';
|
|
6
|
+
import { join, basename, resolve, relative, sep, dirname } from 'path';
|
|
7
7
|
import { build } from 'esbuild';
|
|
8
8
|
import { createRequire } from 'module';
|
|
9
9
|
import { pathToFileURL } from 'url';
|
|
@@ -187,12 +187,22 @@ function decouperSelecteurs(selecteur) {
|
|
|
187
187
|
parts.push(selecteur.slice(debut).trim());
|
|
188
188
|
return parts.filter((p) => p.length > 0);
|
|
189
189
|
}
|
|
190
|
-
var
|
|
190
|
+
var PAQUET = "@odoro-cli/libs";
|
|
191
|
+
var SOUS_CHEMIN = "./generateur";
|
|
192
|
+
function fichierDe(entree) {
|
|
193
|
+
if (entree === void 0) return void 0;
|
|
194
|
+
if (typeof entree === "string") return entree;
|
|
195
|
+
return entree.import ?? entree.default;
|
|
196
|
+
}
|
|
191
197
|
async function fournisseurDe(root) {
|
|
192
198
|
try {
|
|
193
199
|
const exiger = createRequire(join(root, "package.json"));
|
|
194
|
-
const
|
|
195
|
-
const
|
|
200
|
+
const manifeste = exiger.resolve(`${PAQUET}/package.json`);
|
|
201
|
+
const dossier = dirname(manifeste);
|
|
202
|
+
const contenu = JSON.parse(await readFile(manifeste, "utf8"));
|
|
203
|
+
const relatif = fichierDe(contenu.exports?.[SOUS_CHEMIN]);
|
|
204
|
+
if (relatif === void 0) return void 0;
|
|
205
|
+
const module_ = await import(pathToFileURL(resolve(dossier, relatif)).href);
|
|
196
206
|
if (typeof module_.renderUtilitairesPour !== "function") return void 0;
|
|
197
207
|
return { renderUtilitairesPour: module_.renderUtilitairesPour };
|
|
198
208
|
} catch {
|
|
@@ -230,7 +240,9 @@ function outputsForEntry(result, entry, outDir, root) {
|
|
|
230
240
|
return { script: void 0, styles: [] };
|
|
231
241
|
}
|
|
232
242
|
async function taillerFeuilles(result, config, html) {
|
|
233
|
-
const produits = Object.keys(result.metafile.outputs).map(
|
|
243
|
+
const produits = Object.keys(result.metafile.outputs).map(
|
|
244
|
+
(f) => resolve(config.root, f)
|
|
245
|
+
);
|
|
234
246
|
const feuilles = produits.filter((f) => f.endsWith(".css"));
|
|
235
247
|
if (feuilles.length === 0) return;
|
|
236
248
|
const sources = [html];
|
package/dist/cli.js
CHANGED
|
@@ -130,7 +130,7 @@ function rootFrom(flags, positional) {
|
|
|
130
130
|
async function run(argv) {
|
|
131
131
|
const { command, positional, flags } = parseArgs(argv);
|
|
132
132
|
if (flags["version"] === true) {
|
|
133
|
-
const manifest = await import('./package-
|
|
133
|
+
const manifest = await import('./package-RDYY6ULW.js');
|
|
134
134
|
console.log(manifest.default.version);
|
|
135
135
|
return 0;
|
|
136
136
|
}
|
|
@@ -160,7 +160,7 @@ async function run(argv) {
|
|
|
160
160
|
return new Promise(() => void 0);
|
|
161
161
|
}
|
|
162
162
|
case "build": {
|
|
163
|
-
const { buildProject, reportBuild } = await import('./build-
|
|
163
|
+
const { buildProject, reportBuild } = await import('./build-3SPCMZXZ.js');
|
|
164
164
|
const config = await loadConfig(rootFrom(flags, positional), overridesFrom(flags));
|
|
165
165
|
const output = await buildProject(config);
|
|
166
166
|
reportBuild(output, process.cwd());
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
export { defineConfig, loadConfig } from './chunk-Q35CGY2Z.js';
|
|
3
3
|
import './chunk-T6RLHSCW.js';
|
|
4
|
-
export { buildProject, reportBuild } from './chunk-
|
|
4
|
+
export { buildProject, reportBuild } from './chunk-HCU53TIK.js';
|
|
5
5
|
export { ModuleGraph, depFileName, detectSelfAccepting, optimizeDeps, scanDependencies, startDevServer } from './chunk-G5QXVBYT.js';
|
|
6
6
|
export { startPreviewServer } from './chunk-2YDI5NKV.js';
|
|
7
7
|
import './chunk-JMEHF3KN.js';
|
package/package.json
CHANGED
|
@@ -37,9 +37,10 @@ composants de la librairie, sans toucher a leur code.
|
|
|
37
37
|
Une seule feuille de style : `@odoro-cli/libs/styles.css`, a importer une fois
|
|
38
38
|
a la racine de l'application.
|
|
39
39
|
|
|
40
|
-
Elle
|
|
41
|
-
|
|
42
|
-
emploie
|
|
40
|
+
Elle ne contient que le socle — variables, preflight, animations. Les
|
|
41
|
+
utilitaires sont produits a la compilation, pour les seules classes que votre
|
|
42
|
+
code emploie : quelques dizaines de kilooctets en pratique, et toute la palette
|
|
43
|
+
disponible sans que rien ne pese.
|
|
43
44
|
|
|
44
45
|
## Rechargement a chaud
|
|
45
46
|
|