@prozilla-os/dev-tools 1.0.1 → 1.0.3

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/main.js CHANGED
@@ -1,15 +1,14 @@
1
1
  import r from "@vitejs/plugin-react-swc";
2
2
  import i from "vite-plugin-dts";
3
- import { libInjectCss as l } from "vite-plugin-lib-inject-css";
4
- import { resolve as n, sep as t, posix as p } from "path";
3
+ import l from "vite-plugin-css-injected-by-js";
4
+ import { resolve as p, sep as t, posix as a } from "path";
5
5
  const f = (s, o) => {
6
- let e = n(s, o);
7
- return t === "\\" && (e = e.split(t).join(p.sep)), console.log("Using Vite config for app"), console.log("Entry: " + e), {
6
+ let e = p(s, o);
7
+ return t === "\\" && (e = e.split(t).join(a.sep)), console.log("Using Vite config for app"), console.log("Entry: " + e), {
8
8
  plugins: [
9
9
  r(),
10
10
  l(),
11
11
  i({
12
- include: ["src"],
13
12
  outDir: "dist",
14
13
  rollupTypes: !0,
15
14
  strictOutput: !0,
@@ -23,7 +22,7 @@ const f = (s, o) => {
23
22
  formats: ["es"]
24
23
  },
25
24
  rollupOptions: {
26
- external: ["react", "react/jsx-runtime", "@prozilla-os/core", "@prozilla-os/shared"],
25
+ external: ["react", "react/jsx-runtime", "@prozilla-os/core", "@prozilla-os/shared", /@fortawesome\/*/g],
27
26
  output: {
28
27
  assetFileNames: "assets/[name][extname]",
29
28
  entryFileNames: "[name].js"
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sources":["../src/configs/app.vite.config.ts"],"sourcesContent":["import { UserConfig } from \"vite\";\r\nimport react from \"@vitejs/plugin-react-swc\";\r\nimport dts from \"vite-plugin-dts\";\r\nimport { libInjectCss } from \"vite-plugin-lib-inject-css\";\r\nimport { posix, resolve, sep } from \"path\";\r\n\r\n/**\r\n * Helper function for creating Vite configurations for ProzillaOS apps\r\n * @param basePath - Path of base directory\r\n * @param entryPath - Path of library entry\r\n * @returns Vite configuration\r\n * @see https://vitejs.dev/config/\r\n */\r\nexport const appViteConfig = (basePath: string, entryPath: string): UserConfig => {\r\n\tlet entryFile = resolve(basePath, entryPath);\r\n\r\n\t// Normalize paths for Windows compatibility\r\n\tif (sep === \"\\\\\")\r\n\t\tentryFile = entryFile.split(sep).join(posix.sep);\r\n\r\n\tconsole.log(\"Using Vite config for app\");\r\n\tconsole.log(\"Entry: \" + entryFile);\r\n\r\n\treturn {\r\n\t\tplugins: [\r\n\t\t\treact(),\r\n\t\t\tlibInjectCss(),\r\n\t\t\tdts({\r\n\t\t\t\tinclude: [\"src\"],\r\n\t\t\t\toutDir: \"dist\",\r\n\t\t\t\trollupTypes: true,\r\n\t\t\t\tstrictOutput: true,\r\n\t\t\t\tpathsToAliases: false,\r\n\t\t\t\ttsconfigPath: \"tsconfig.build.json\"\r\n\t\t\t})\r\n\t\t],\r\n\t\tbuild: {\r\n\t\t\tlib: {\r\n\t\t\t\tentry: entryFile,\r\n\t\t\t\tformats: [\"es\"],\r\n\t\t\t},\r\n\t\t\trollupOptions: {\r\n\t\t\t\texternal: [\"react\", \"react/jsx-runtime\", \"@prozilla-os/core\", \"@prozilla-os/shared\"],\r\n\t\t\t\toutput: {\r\n\t\t\t\t\tassetFileNames: \"assets/[name][extname]\",\r\n\t\t\t\t\tentryFileNames: \"[name].js\",\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tsourcemap: true\r\n\t\t}\r\n\t};\r\n};"],"names":["appViteConfig","basePath","entryPath","entryFile","resolve","sep","posix","react","libInjectCss","dts"],"mappings":";;;;AAaa,MAAAA,IAAgB,CAACC,GAAkBC,MAAkC;AAC7E,MAAAC,IAAYC,EAAQH,GAAUC,CAAS;AAG3C,SAAIG,MAAQ,SACXF,IAAYA,EAAU,MAAME,CAAG,EAAE,KAAKC,EAAM,GAAG,IAEhD,QAAQ,IAAI,2BAA2B,GAC/B,QAAA,IAAI,YAAYH,CAAS,GAE1B;AAAA,IACN,SAAS;AAAA,MACRI,EAAM;AAAA,MACNC,EAAa;AAAA,MACbC,EAAI;AAAA,QACH,SAAS,CAAC,KAAK;AAAA,QACf,QAAQ;AAAA,QACR,aAAa;AAAA,QACb,cAAc;AAAA,QACd,gBAAgB;AAAA,QAChB,cAAc;AAAA,MAAA,CACd;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACN,KAAK;AAAA,QACJ,OAAON;AAAA,QACP,SAAS,CAAC,IAAI;AAAA,MACf;AAAA,MACA,eAAe;AAAA,QACd,UAAU,CAAC,SAAS,qBAAqB,qBAAqB,qBAAqB;AAAA,QACnF,QAAQ;AAAA,UACP,gBAAgB;AAAA,UAChB,gBAAgB;AAAA,QACjB;AAAA,MACD;AAAA,MACA,WAAW;AAAA,IACZ;AAAA,EAAA;AAEF;"}
1
+ {"version":3,"file":"main.js","sources":["../src/configs/app.vite.config.ts"],"sourcesContent":["import { UserConfig } from \"vite\";\r\nimport react from \"@vitejs/plugin-react-swc\";\r\nimport dts from \"vite-plugin-dts\";\r\nimport cssInjectedByJs from \"vite-plugin-css-injected-by-js\";\r\nimport { posix, resolve, sep } from \"path\";\r\n\r\n/**\r\n * Helper function for creating Vite configurations for ProzillaOS apps\r\n * @param basePath - Path of base directory\r\n * @param entryPath - Path of library entry\r\n * @returns Vite configuration\r\n * @see https://vitejs.dev/config/\r\n */\r\nexport const appViteConfig = (basePath: string, entryPath: string): UserConfig => {\r\n\tlet entryFile = resolve(basePath, entryPath);\r\n\r\n\t// Normalize paths for Windows compatibility\r\n\tif (sep === \"\\\\\")\r\n\t\tentryFile = entryFile.split(sep).join(posix.sep);\r\n\r\n\tconsole.log(\"Using Vite config for app\");\r\n\tconsole.log(\"Entry: \" + entryFile);\r\n\r\n\treturn {\r\n\t\tplugins: [\r\n\t\t\treact(),\r\n\t\t\tcssInjectedByJs(),\r\n\t\t\tdts({\r\n\t\t\t\toutDir: \"dist\",\r\n\t\t\t\trollupTypes: true,\r\n\t\t\t\tstrictOutput: true,\r\n\t\t\t\tpathsToAliases: false,\r\n\t\t\t\ttsconfigPath: \"tsconfig.build.json\"\r\n\t\t\t})\r\n\t\t],\r\n\t\tbuild: {\r\n\t\t\tlib: {\r\n\t\t\t\tentry: entryFile,\r\n\t\t\t\tformats: [\"es\"],\r\n\t\t\t},\r\n\t\t\trollupOptions: {\r\n\t\t\t\texternal: [\"react\", \"react/jsx-runtime\", \"@prozilla-os/core\", \"@prozilla-os/shared\", /@fortawesome\\/*/g],\r\n\t\t\t\toutput: {\r\n\t\t\t\t\tassetFileNames: \"assets/[name][extname]\",\r\n\t\t\t\t\tentryFileNames: \"[name].js\",\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tsourcemap: true\r\n\t\t}\r\n\t};\r\n};"],"names":["appViteConfig","basePath","entryPath","entryFile","resolve","sep","posix","react","cssInjectedByJs","dts"],"mappings":";;;;AAaa,MAAAA,IAAgB,CAACC,GAAkBC,MAAkC;AAC7E,MAAAC,IAAYC,EAAQH,GAAUC,CAAS;AAG3C,SAAIG,MAAQ,SACXF,IAAYA,EAAU,MAAME,CAAG,EAAE,KAAKC,EAAM,GAAG,IAEhD,QAAQ,IAAI,2BAA2B,GAC/B,QAAA,IAAI,YAAYH,CAAS,GAE1B;AAAA,IACN,SAAS;AAAA,MACRI,EAAM;AAAA,MACNC,EAAgB;AAAA,MAChBC,EAAI;AAAA,QACH,QAAQ;AAAA,QACR,aAAa;AAAA,QACb,cAAc;AAAA,QACd,gBAAgB;AAAA,QAChB,cAAc;AAAA,MAAA,CACd;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACN,KAAK;AAAA,QACJ,OAAON;AAAA,QACP,SAAS,CAAC,IAAI;AAAA,MACf;AAAA,MACA,eAAe;AAAA,QACd,UAAU,CAAC,SAAS,qBAAqB,qBAAqB,uBAAuB,kBAAkB;AAAA,QACvG,QAAQ;AAAA,UACP,gBAAgB;AAAA,UAChB,gBAAgB;AAAA,QACjB;AAAA,MACD;AAAA,MACA,WAAW;AAAA,IACZ;AAAA,EAAA;AAEF;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prozilla-os/dev-tools",
3
3
  "description": "A library of tools for the development of ProzillaOS packages.",
4
- "version": "1.0.1",
4
+ "version": "1.0.3",
5
5
  "homepage": "https://os.prozilla.dev",
6
6
  "author": {
7
7
  "name": "Prozilla",
@@ -18,14 +18,18 @@
18
18
  "directory": "packages/dev-tools"
19
19
  },
20
20
  "license": "MIT",
21
+ "dependencies": {
22
+ "@prozilla-os/core": "1.3.2",
23
+ "@prozilla-os/shared": "^1.2.0",
24
+ "vite-plugin-css-injected-by-js": "^3.5.1",
25
+ "vite": "^5.4.8",
26
+ "vite-plugin-dts": "^3.9.1",
27
+ "@vitejs/plugin-react-swc": "^3.7.0"
28
+ },
21
29
  "devDependencies": {
22
30
  "@types/node": "^20.14.5",
23
31
  "@types/react": "^18.3.3",
24
- "@vitejs/plugin-react-swc": "^3.7.0",
25
- "typescript": "^5.4.5",
26
- "vite": "^5.4.8",
27
- "vite-plugin-dts": "^3.9.1",
28
- "vite-plugin-lib-inject-css": "^2.1.1"
32
+ "typescript": "^5.4.5"
29
33
  },
30
34
  "files": [
31
35
  "dist"