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.
This field was introduced in
https://github.com/cockpit-project/cockpit/pull/4964 as "purely
informational for now", and isn't even parsed by cockpit.
package.json's version would only be relevant for publishing NPM
modules, but cockpit pages are not that.
Neither starter-kit itself nor our derived projects like cockpit-podman
or cockpit-composer have ever maintained these two fields, so just get
rid of them.
This makes the git tag the single source of truth for the version
number.
Fixes#200
Drop the cockpit-po-plugin.js and sassc-loader.js code copies, and check
them out from a stable cockpit tag, similarly to how we already get the
PatternFly CSS.
Convert the `po2json` script into a webpack plugin, and integrate the
(now trivial) po.empty.js template.
This is the last step for building the entire dist/ directory with
`npm run build` (i.e. a tool that web developers are familiar with),
and not having a split webpack+make toolchain any more.
node-sass is a compiled ELF module, which is problematic for
distributions that want to rebuild everything from source. The sassc CLI
program is packaged everywhere, and both use the same libsass library.
So drop node-sass and sass-loader, and replace it with a simple loader
wrapper around sassc.
This also saves 122 npm packages (16 MB in node_modules/).
Closes#382
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
* 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 <martin@piware.de>
Closes#315
This has a new rule `quote-props`, adjust the code accordingly:
29:24 error Unnecessarily quoted property 'hostname' found quote-props
32:29 error Unnecessarily quoted property 'hostname' found quote-props
Taken rules from Cockpit, which have been proven to be effective for
finding bugs and keeping clean code, and sensible (not taking
unreasonable effort to satisfy).
Fix code layout in app.jsx accordingly.
Closes#39
eslint is much more powerful and flexible than jshint, and we don't want
to promote writing new projects with pre-ES6 code.
As a side effect, this also avoids downloading PhantomJS (see
https://github.com/jshint/jshint/issues/3318), thereby cutting down
node_modules/ from 470 MB to 210 MB.
Rename some files and change some identifiers to be neutral to the
application name. This makes it simpler to change everything to a proper
name when cloning this project.
Document in the README how to find the remaining places to change.
Closes#20
A simple Vagrant VM based on fedora 25 cloud. It syncs `dist` to
`/usr/local/share/cockpit/<dirname>` on the VM.
Also decrease the minimum required version in `manifest.json` to match
the one that's currently in fedora 25.