Skip to content

Commit

Permalink
webpacked the heck out of the build
Browse files Browse the repository at this point in the history
  • Loading branch information
dannycoates committed Aug 16, 2017
1 parent 0ab8ddc commit 757ac14
Show file tree
Hide file tree
Showing 16 changed files with 839 additions and 98 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ scripts
docs
firefox
public
views
webpack
frontend
4 changes: 1 addition & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,20 @@ deployment:
latest:
branch: master
commands:
- npm run build
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker build -t mozilla/send:latest .
- docker push mozilla/send:latest
tags:
tag: /.*/
owner: mozilla
commands:
- npm run build
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker build -t mozilla/send:$CIRCLE_TAG .
- docker push mozilla/send:$CIRCLE_TAG

test:
override:
- npm run build:version
- npm run build
- npm run lint
- npm test
- nsp check
6 changes: 4 additions & 2 deletions frontend/src/fileList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import Storage from './storage';
import * as metrics from './metrics';
import { allowedCopy, copyToClipboard, ONE_DAY_IN_MS } from './utils';
import bel from 'bel';
import copyImg from '../../public/resources/copy-16.svg';
import closeImg from '../../public/resources/close-16.svg';

const HOUR = 1000 * 60 * 60;
const storage = new Storage();
Expand Down Expand Up @@ -58,13 +60,13 @@ function addFile(file) {
<td>${file.name}</td>
<td>
<span class="icon-docs" data-l10n-id="copyUrlHover"></span>
<img onclick=${copyClick} src="/resources/copy-16.svg" class="icon-copy" data-l10n-id="copyUrlHover">
<img onclick=${copyClick} src="${copyImg}" class="icon-copy" data-l10n-id="copyUrlHover">
<span data-l10n-id="copiedUrl" class="text-copied" hidden="true"></span>
</td>
<td>${timeLeft(countdown)}</td>
<td>
<span class="icon-cancel-1" data-l10n-id="deleteButtonHover" title="Delete"></span>
<img onclick=${showPopup} src="/resources/close-16.svg" class="icon-delete" data-l10n-id="deleteButtonHover" title="Delete">
<img onclick=${showPopup} src="${closeImg}" class="icon-delete" data-l10n-id="deleteButtonHover" title="Delete">
<div class="popup">
<div class="popuptext" onclick=${stopProp} onblur=${cancel} tabindex="-1">
<div class="popup-message" data-l10n-id="deletePopupText"></div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/main.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*** index.html ***/
html {
background: url('resources/send_bg.svg');
background: url('../../public/resources/send_bg.svg');
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'segoe ui',
'helvetica neue', helvetica, ubuntu, roboto, noto, arial, sans-serif;
font-weight: 200;
Expand Down Expand Up @@ -89,7 +89,7 @@ body {

.feedback {
background-color: #0297f8;
background-image: url('resources/feedback.svg');
background-image: url('../../public/resources/feedback.svg');
background-position: 2px 4px;
background-repeat: no-repeat;
background-size: 18px;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function upload(event) {

storage.totalUploads += 1;

let file = null;
let file = '';
if (clickOrDrop === 'drop') {
if (!event.originalEvent.dataTransfer.files[0]) {
uploadWindow.classList.remove('ondrag');
Expand Down
Loading

0 comments on commit 757ac14

Please sign in to comment.