Skip to content

Commit

Permalink
Merge pull request #109 from Financial-Times/revert-104-revert-101-bo…
Browse files Browse the repository at this point in the history
…wer-to-npm

(After revert) CPP-726 Migrate n-feedback away from bower
  • Loading branch information
emortong committed Jan 7, 2022
2 parents 951caa2 + 74a02b9 commit dcf62f8
Show file tree
Hide file tree
Showing 13 changed files with 17,825 additions and 10,263 deletions.
6 changes: 3 additions & 3 deletions .gitignore
@@ -1,9 +1,9 @@
node_modules/
bower_components/
.DS_Store
.editorconfig
.eslintrc.js
/public/main.css
/public/main.js
/public/manifest.json
/public/styles.css
/public/scripts.bundle.js
/pa11y_screenCapture/*
*.env*
13 changes: 6 additions & 7 deletions Makefile
Expand Up @@ -12,14 +12,13 @@ test:
make unit-test

demo-build:
@rm -rf bower_components/n-feedback
@mkdir bower_components/n-feedback
@cp main.scss bower_components/n-feedback/main.scss
@cp index.js bower_components/n-feedback/index.js
@cp -r src/ bower_components/n-feedback/src/
@cp -r templates/ bower_components/n-feedback/templates/
@rm -rf node_modules/n-feedback
@mkdir node_modules/n-feedback
@cp main.scss node_modules/n-feedback/main.scss
@cp index.js node_modules/n-feedback/index.js
@cp -r src/ node_modules/n-feedback/src/
@cp -r templates/ node_modules/n-feedback/templates/
@webpack --mode development
@node-sass demos/src/demo.scss public/main.css --include-path bower_components
@$(DONE)

demo: demo-build
Expand Down
4 changes: 0 additions & 4 deletions README.md
Expand Up @@ -15,10 +15,6 @@ Go to [http://local.ft.com:5005/](http://local.ft.com:5005/)
```
npm install --save @financial-times/n-feedback
```
or
```
bower install --save n-feedback
```

Use handlebars template
```
Expand Down
23 changes: 0 additions & 23 deletions bower.json

This file was deleted.

4 changes: 2 additions & 2 deletions demos/demo-simple.html
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Financial Times</title>
<link rel="stylesheet" href="/public/main.css" />
<link type="text/css" rel="stylesheet" href="/public/styles.css" />
</head>
<body>
<div class="o-grid-container">
Expand All @@ -13,6 +13,6 @@ <h1>Demo of n-feedback</h1>
{{> demos/feedback-partial }}
</div>
</div>
<script src="/public/main.js"></script>
<script src="/public/scripts.bundle.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions demos/demo.html
Expand Up @@ -23,6 +23,7 @@
<link rel="preconnect" href="https://tpc.googlesyndication.com">
<link rel="preconnect" href="https://imasdk.googleapis.com">
<link rel="preconnect" href="https://z.moatads.com">
<link type="text/css" rel="stylesheet" href="/public/styles.css" />

<script>
window.FT = window.FT || {};
Expand Down
2 changes: 1 addition & 1 deletion demos/feedback-partial.html
@@ -1,3 +1,3 @@
{{> templates/feedback-container }}

<script src="/public/main.js"></script>
<script src="/public/scripts.bundle.js"></script>
2 changes: 1 addition & 1 deletion index.js
@@ -1,5 +1,5 @@
// o-overlay export is different depending on if n-feedback is being imported using bower or npm
let Overlay = require('o-overlay');
let Overlay = require('@financial-times/o-overlay');
Overlay = Overlay.default || Overlay;

const surveyBuilder = require('./src/survey-builder');
Expand Down
14 changes: 7 additions & 7 deletions main.scss
@@ -1,10 +1,10 @@
@import 'o-buttons/main';
@import 'o-forms/main';
@import 'o-overlay/main';
@import 'o-icons/main';
@import 'o-colors/main';
@import 'o-typography/main';
@import 'o-loading/main';
@import '@financial-times/o-buttons/main';
@import '@financial-times/o-forms/main';
@import '@financial-times/o-overlay/main';
@import '@financial-times/o-icons/main';
@import '@financial-times/o-colors/main';
@import '@financial-times/o-typography/main';
@import '@financial-times/o-loading/main';

@include oForms($opts: (
'elements': (
Expand Down

0 comments on commit dcf62f8

Please sign in to comment.