Skip to content

Commit 203604a

Browse files
KKoukioumartinpitt
authored andcommitted
Copy patternfly import files from cockpit project automatically
Closes cockpit-project#357
1 parent 0ec0856 commit 203604a

File tree

7 files changed

+13
-99
lines changed

7 files changed

+13
-99
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ Test*FAIL*
1111
bots/
1212
test/common/
1313
test/images/
14+
src/lib/patternfly/
1415
*.pot
1516
POTFILES*

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ language: node_js
44
node_js:
55
- "8"
66
script:
7-
- npm install
8-
- npm run build
7+
- make

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ dist/po.%.js: po/%.po $(NODE_MODULES_TEST)
6565
%.spec: %.spec.in
6666
sed -e 's/%{VERSION}/$(VERSION)/g' $< > $@
6767

68-
$(WEBPACK_TEST): $(NODE_MODULES_TEST) $(shell find src/ -type f) package.json webpack.config.js $(patsubst %,dist/po.%.js,$(LINGUAS))
68+
$(WEBPACK_TEST): $(NODE_MODULES_TEST) src/lib/patternfly/_fonts.scss $(shell find src/ -type f) package.json webpack.config.js $(patsubst %,dist/po.%.js,$(LINGUAS))
6969
NODE_ENV=$(NODE_ENV) npm run build
7070

7171
watch:
@@ -100,7 +100,7 @@ $(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec
100100
touch dist/*
101101
tar czf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \
102102
--exclude cockpit-$(PACKAGE_NAME).spec.in \
103-
$$(git ls-files) package-lock.json cockpit-$(PACKAGE_NAME).spec dist/
103+
$$(git ls-files) src/lib/patternfly/*.scss package-lock.json cockpit-$(PACKAGE_NAME).spec dist/
104104
mv node_modules.release node_modules
105105

106106
srpm: $(TARFILE) cockpit-$(PACKAGE_NAME).spec
@@ -157,6 +157,13 @@ test/common:
157157
git checkout --force FETCH_HEAD -- test/common
158158
git reset test/common
159159

160+
src/lib/patternfly/_fonts.scss:
161+
git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 227
162+
mkdir -p pkg/lib/patternfly && git add pkg/lib/patternfly
163+
git checkout --force FETCH_HEAD -- pkg/lib/patternfly
164+
git restore --staged pkg/lib/patternfly
165+
mkdir -p src/lib && mv pkg/lib/patternfly src/lib/patternfly && rmdir -p pkg/lib
166+
160167
$(NODE_MODULES_TEST): package.json
161168
# if it exists already, npm install won't update it; force that so that we always get up-to-date packages
162169
rm -f package-lock.json

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* along with Cockpit; If not, see <http://www.gnu.org/licenses/>.
1818
*/
1919

20-
import "./lib/patternfly-4-cockpit.scss";
20+
import "./lib/patternfly/patternfly-4-cockpit.scss";
2121

2222
import "core-js/stable";
2323

@@ -31,7 +31,7 @@ import { Application } from './app.jsx';
3131
* out of the dist/index.js and since it will maintain the order of the imported CSS,
3232
* the overrides will be correctly in the end of our stylesheet.
3333
*/
34-
import "./lib/patternfly-4-overrides.scss";
34+
import "./lib/patternfly/patternfly-4-overrides.scss";
3535

3636
document.addEventListener("DOMContentLoaded", function () {
3737
ReactDOM.render(React.createElement(Application, {}), document.getElementById('app'));

src/lib/_fonts.scss

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/lib/patternfly-4-cockpit.scss

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/lib/patternfly-4-overrides.scss

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)