Commit graph

18 commits

Author SHA1 Message Date
Martin Pitt
745b4ab8e8 Convert to TypeScript
This needs the usual "I know the `app` element exists" annotation, plus
dealing with a non-existing /etc/hostname (in which case the watch will
return `null`, and we shouldn't poke that into a `string` state).
2024-07-11 11:18:23 -04:00
Martin Pitt
6af3331d7a Sort imports 2024-07-11 11:18:23 -04:00
Martin Pitt
39e0f576ca package.json: Update to React 18
Update to the new root creation function.
2023-07-18 11:49:55 +02:00
Katerina Koukiou
12a648b6e4 patternfly-5-overrides should be auto-imported by the page.scss file
page.scss sould be imported by all pages.
2023-05-25 22:42:37 +02:00
Cockpit Project
b2bdaac5b2 Makefile: Update Cockpit lib to 947f1753867e3924b9617aaace936225
Update to PF5 and the new cockpit lib API.

Closes #646
2023-05-04 15:24:01 +02:00
shawly
681366e990 Add dark-theme-support
Fixes #610
2023-02-13 07:45:49 +01:00
Martin Pitt
b3a9565668 build: don't move pkg/lib/ to src/lib/
Keep pkg/lib in the same location as it is in the cockpit repository,
and adjust the include path accordingly.

This makes the production of the .pot file somewhat more deterministic:
previously, it would either include or not include the strings from
pkg/lib depending on if it had been checked out or not.  Now it never
includes them.

Cherry-picked from cockpit-podman commit a70630be2139a.
2022-06-30 09:49:07 +02:00
Martin Pitt
67c1c065e9 package.json: Drop core-js
starter-kit does not use it directly, and none of our derived projects
have it.
2021-11-29 10:58:57 +01:00
Martin Pitt
080b20af94
Ensure application CSS has priority over library CSS
Import our application CSS as the very last thing, so that it can
properly override  PatternFly variables. Before, our application CSS
could land in the first third of dist/index.css *before* PatternFly's
definitions, so that the latter overrode the former [1].

This is a long-standing bug in mini-css-extract-plugin ([2] and
countless things that point to it) with `NODE_ENV=production` builds.

As a workaround, make sure that app.scss is the absolutely last imported
CSS, instead of "almost last". It is still conceptually correct for the
application CSS to be able to override patternfly-4-overrides.scss.

Closes #362
[1] https://github.com/martinpitt/performance-graphs/issues/10
[2] https://github.com/webpack-contrib/mini-css-extract-plugin/issues/188
2020-09-08 18:53:12 +02:00
Katerina Koukiou
203604a463 Copy patternfly import files from cockpit project automatically
Closes #357
2020-09-08 17:14:34 +02:00
Katerina Koukiou
96514e279e
main: Stop importing patternfly.css
* Stop importing cockpit's base1/patternfly.css

This is deprecated API and will be dropped at some point, in favor
of projects shipping their own CSS.

Install and import the styles from PF4 now.

* Use webpack based string replacement for removing the font-face rules from PF4

Doing the seddery in Makefile breaks `npm run build`, webpack watching,
and is generally brittle.
Do the font replacement hacking with `string-replace-loader`, which fits into webpack much more nicely.

There is still some potential simplification by not duplicating the
entire scss loader chain.

Co-authored-by: Martin Pitt <[email protected]>

Closes #315
2020-05-28 10:01:31 +02:00
Martin Pitt
8fab928dcb Update babel to 7.5, and actually enable polyfills
@babel/polyfill is deprecated in ≥ 7.4 [1], and we never actually used
it as we forgot to import it [2]. Move to core-js/stable.

[1] https://babeljs.io/blog/2019/03/19/7.4.0#migration-from-core-js-2
[2] https://babeljs.io/docs/en/babel-polyfill#usage-in-node-browserify-webpack
2019-07-17 17:43:01 +02:00
Martin Pitt
1fc1923021 Rename *.es6 to *.js
*.es6 isn't standard naming, that was just an old cockpit-ism. All files
are treated as ES6.
2019-07-17 17:43:01 +02:00
Lars Karlitski
ce7a2d3870 Remove the index.js indirection
Make index.es6 the main entry point.
2017-10-18 16:42:54 +02:00
Lars Karlitski
dd765787e8 Remove all remaining mentions of "subscriptions" 2017-10-18 16:42:54 +02:00
Dominik Perpeet
a01820e565 Add more sample content to subscriptions page 2017-07-26 10:33:14 +02:00
Dominik Perpeet
2f49b57064 Add sample page 2017-06-20 07:41:52 -04:00
Sean Toner
811e3eebe0 initial commit. Created a basic webpack.config.js file, some basic .babelrc settings, and some notes on the build 2017-06-20 07:41:52 -04:00