This commit is contained in:
Vlad Filippov 2018-02-15 15:52:17 -05:00 коммит произвёл GitHub
Родитель c3c38dc7dd
Коммит 6204caddbd
42 изменённых файлов: 399 добавлений и 446 удалений

Просмотреть файл

@ -1,4 +0,0 @@
{
"directory": "app/bower_components",
"analytics": false
}

Просмотреть файл

@ -1,4 +1,3 @@
.tmp/**
app/bower_components/**
app/scripts/vendor/**
dist/**

4
packages/fxa-content-server/.gitignore поставляемый
Просмотреть файл

@ -18,9 +18,6 @@ npm-debug.log*
node_modules
browser_modules
### Bower ###
app/bower_components
### Babel compiled scripts ###
.es5
.es5cache
@ -30,7 +27,6 @@ app/bower_components
!.gitignore
!.git*
!.eslintrc
!.bowerrc
!.editorconfig
!.npmignore
!.travis.yml

Просмотреть файл

@ -31,7 +31,6 @@ group: deprecated-2017Q3
cache:
directories:
- node_modules
- app/bower_components
- deps/node_modules/fxa-auth-server/node_modules
- deps/node_modules/fxa-profile-server/node_modules
- deps/node_modules/fxa-oauth-server/node_modules

Просмотреть файл

@ -110,10 +110,10 @@ reference GitHub issues that this commit **Closes**.
## Dependencies and Tools
### Bower
### npm
We use [Bower](http://bower.io/) to manage front-end packages. These components are [automatically
installed](https://github.com/mozilla/fxa-content-server/blob/master/package.json#L7) when you install this project and are placed into the `app` directory.
We use [npm](http://npmjs.com/) to manage all dependencies. These components are [automatically
installed](https://github.com/mozilla/fxa-content-server/blob/master/package.json#L7) when you install this project.
### L10N

Просмотреть файл

@ -11,8 +11,6 @@ ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
RUN apk add --no-cache git
COPY .bowerrc .bowerrc
COPY bower.json bower.json
COPY npm-shrinkwrap.json npm-shrinkwrap.json
COPY package.json package.json
COPY scripts/download_l10n.sh scripts/download_l10n.sh

Просмотреть файл

@ -1,5 +1,5 @@
@import '../bower_components/jquery-modal/jquery.modal';
@import '../bower_components/fxa-checkbox/checkbox';
@import '../../node_modules/jquery-modal/jquery.modal';
@import '../../node_modules/fxa-checkbox/checkbox';
@import 'modules/iframe';
@import 'modules/branding';
@import 'modules/tooltip';

Просмотреть файл

@ -1,3 +1,4 @@
@import '../../node_modules/normalize.css/normalize';
@import 'variables';
@import 'mixins';
@import 'breakpoints';

Просмотреть файл

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Based on bower_components/blanket/src/reporters/lcov_reporter.js
* Based on node_modules/blanket/src/reporters/lcov_reporter.js
*/
//lcov_reporter

Просмотреть файл

@ -261,9 +261,6 @@ const runTests = function () {
};
var filterFilesFromStack = [
'bower_components/blanket/dist/qunit/blanket.js',
'bower_components/p/p.js',
'bower_components/requirejs/require.js',
'tests/test_start.js'
];

Просмотреть файл

@ -1,33 +0,0 @@
{
"name": "fxa-content-server",
"version": "0.0.0",
"dependencies": {
"Duration.js": "duration.js#3.6.0",
"backbone": "1.1.1",
"blanket": "1.1.5",
"blueimp-canvas-to-blob": "2.1.0",
"chai": "1.8.1",
"cocktail": "0.5.9",
"easteregg": "https://github.com/mozilla/fxa-easter-egg.git#ab20cd517cf8ae9feee115e48745189d28e13bc3",
"es6-promise": "https://github.com/stefanpenner/es6-promise.git#4.1.1",
"fxa-checkbox": "mozilla/fxa-checkbox#7f856afffd394a144f718e28e6fb79092d6ccddd",
"fxa-crypto-relier": "https://github.com/mozilla/fxa-crypto-relier.git#v2.1.0",
"html5shiv": "3.7.2",
"jquery": "3.1.0",
"jquery-modal": "https://github.com/shane-tomlinson/jquery-modal.git#0576775d1b4590314b114386019f4c7421c77503",
"jquery-simulate": "1.0.1",
"jquery-ui": "1.11.0",
"jquery-ui-touch-punch": "https://github.com/zaach/jquery-ui-touch-punch.git#89e5a9159494de37df1e09cccf9036dda5429830",
"js-md5": "md5#0.6.0",
"mailcheck": "https://github.com/mailcheck/mailcheck.git#d995fcc1d02c124a893c2cb0fce2e0ce5f36bce4",
"mocha-blanketjs-adapter": "1.0.0",
"node-uuid": "1.4.3",
"normalize-css": "2.1.3",
"raven-js": "https://github.com/vladikoff/raven-js.git#customEndpoint-3.13.0",
"sinon": "http://sinonjs.org/releases/sinon-3.2.1.js",
"tos-pp": "https://github.com/mozilla/legal-docs.git",
"ua-parser-js": "https://github.com/vladikoff/ua-parser-js.git#643d1698aef5bed095e1264ae258902bf346175c",
"vat": "0.0.9",
"webrtc-adapter": "0.2.5"
}
}

Просмотреть файл

@ -15,7 +15,7 @@ dependencies:
- npm i --production
- CONFIG_FILES=server/config/local.json,server/config/production.json,tests/ci/config_circleci.json node_modules/.bin/grunt build
- nohup bash -c "CONFIG_FILES=server/config/local.json,server/config/production.json,tests/ci/config_circleci.json node_modules/.bin/grunt serverproc:dist &"
- npm install intern bower xmlhttprequest firefox-profile request sync-exec convict yargs requirejs leadfoot
- npm install intern xmlhttprequest firefox-profile request sync-exec convict yargs requirejs leadfoot
post:
- curl 127.0.0.1:3030
- /home/ubuntu/fxa-content-server/firefox/firefox --version

Просмотреть файл

@ -86,7 +86,7 @@ The profile-client communicates with the Firefox Accounts [Profile Server](https
The content server web client is made up of many layers. An item is only allowed to interact with a layer below it, but not with ancestors or siblings.
[app-start.js](https://github.com/mozilla/fxa-content-server/blob/master/app/scripts/lib/app-start.js) is where the fun begins. It creates several models and a router. The router is passed a reference to several models. The router creates views. Only views are allowed to interact with templates. Models and Views use functionality provided by lib modules. vendor and bower_components are external components and should be fully self contained. The full application lifecycle is described in the section `Application lifecycle`.
[app-start.js](https://github.com/mozilla/fxa-content-server/blob/master/app/scripts/lib/app-start.js) is where the fun begins. It creates several models and a router. The router is passed a reference to several models. The router creates views. Only views are allowed to interact with templates. Models and Views use functionality provided by lib modules. vendor are external components and should be fully self contained. The full application lifecycle is described in the section `Application lifecycle`.
```
app-start |
@ -94,7 +94,7 @@ The content server web client is made up of many layers. An item is only allowed
views
models | templates
lib |
vendor bower_components |
vendor |
```
### Application lifecycle

Просмотреть файл

@ -8,7 +8,7 @@ module.exports = function (grunt) {
dest: '<%= yeoman.dist %>/app.bundle.js',
src: [
'<%= yeoman.dist %>/app.bundle.js',
'app/bower_components/easteregg/src/easteregg.js'
'node_modules/easterEgg/src/easteregg.js'
]
}
});

Просмотреть файл

@ -6,12 +6,10 @@ module.exports = function (grunt) {
grunt.config('concurrent', {
dist: [
'copy:styles',
'copy:normalize',
'connect_fonts_copy'
],
server: [
'copy:styles',
'copy:normalize',
'connect_fonts_copy'
],
test: ['copy:styles']

Просмотреть файл

@ -33,11 +33,6 @@ module.exports = function (grunt) {
src: 'en/{500,502,503}.html'
}]
},
// copy normalize.css to .tmp during build, this library is required by grunt-usemin to be in .tmp
normalize: {
dest: '<%= yeoman.tmp %>/bower_components/normalize-css/normalize.css',
src: 'app/bower_components/normalize-css/normalize.css'
},
strings: {
files: [
{

Просмотреть файл

@ -10,7 +10,6 @@ module.exports = function (grunt) {
},
src: [
'{,<%= yeoman.app %>/**/,grunttasks/**/,scripts/**/,server/**/,tests/**/}*.js',
'!<%= yeoman.app %>/bower_components/**',
'!<%= yeoman.app %>/scripts/vendor/**'
]
}

Просмотреть файл

@ -7,7 +7,6 @@ module.exports = function (grunt) {
app: {
src: [
'{,<%= yeoman.app %>/**/}*.json',
'!<%= yeoman.app %>/bower_components/**',
'!<%= yeoman.app %>/i18n/**',
'!<%= yeoman.app %>/scripts/vendor/**',
'!<%= yeoman.app %>/tests/**'
@ -15,7 +14,6 @@ module.exports = function (grunt) {
},
config: {
src: [
'.bowerrc',
'.eslintrc'
]
},

Просмотреть файл

@ -9,7 +9,6 @@ module.exports = function (grunt) {
no_children: { //eslint-disable-line camelcase
files: {
src: [
'<%= yeoman.dist %>/bower_components/**/*.js',
'<%= yeoman.dist %>/scripts/vendor/**/*.js',
'<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
'!<%= yeoman.dist %>/images/apple_app_store_button/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',

Просмотреть файл

@ -8,7 +8,6 @@ module.exports = function (grunt) {
files: {
src: [
'<%= yeoman.app %>/**/*.{js,css,scss,html}',
'!<%= yeoman.app %>/bower_components/**',
'!<%= yeoman.app %>/scripts/vendor/**',
'grunttasks/*.js',
'scripts/*.js',

Просмотреть файл

@ -8,7 +8,6 @@ module.exports = function (grunt) {
livereload: {
files: [
'<%= yeoman.app %>/**/*.js',
'!<%= yeoman.app %>/bower_components/**',
'!<%= yeoman.app %>/scripts/vendor/**'
],
options: {

Просмотреть файл

@ -5,7 +5,7 @@
module.exports = function (grunt) {
var TEMP_DIR = '.tmp';
var TEMPLATE_ROOT = 'server/templates';
var TOS_PP_REPO_ROOT = 'app/bower_components/tos-pp';
var TOS_PP_REPO_ROOT = 'node_modules/legal-docs';
grunt.config('yeoman', {
/*eslint-disable camelcase */

Просмотреть файл

@ -10,7 +10,7 @@ Here are a few things to know:
* Do `git add` the file you are working on as often as possible. Otherwise you might just run `grunt` and itll overwrite all your work.
* The files that the default behavior uses to generate the content is from `fxa-content-server-l10n`, that is handled by npm install via git.
* To work locally —and not get your work overwritten by bower— use those two commands:
* To work locally use those two commands:
grunt po2json
grunt serverproc:test
@ -70,7 +70,7 @@ Commit the merged .po files to master and enjoy.
## Updating translations
Translators will update the `.po` files in the l10n repo, which are downloaded as a bower dependency. To convert the new translations into JSON for the app to use, run:
Translators will update the `.po` files in the l10n repo, which are downloaded via the `scripts/download_l10n.sh` script. To convert the new translations into JSON for the app to use, run:
grunt l10n-create-json

642
packages/fxa-content-server/npm-shrinkwrap.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -3,8 +3,8 @@
"version": "1.105.2",
"description": "Firefox Accounts Content Server",
"scripts": {
"build-production": "grunt build",
"postinstall": "bower update --allow-root --config.interactive=false -s && scripts/download_l10n.sh",
"build-production": "NODE_ENV=production grunt build",
"postinstall": "scripts/download_l10n.sh",
"prepush": "npm run lint",
"shrink": "npmshrink:prod",
"lint": "eslint app server tests --cache",
@ -34,9 +34,11 @@
"babel-middleware": "git://github.com/shane-tomlinson/babel-middleware.git#4c70de91",
"babel-plugin-syntax-dynamic-import": "6.18.0",
"babel-preset-es2015": "6.24.1",
"backbone": "1.1.1",
"backbone.cocktail": "git://github.com/onsi/cocktail.git#87971c88e2e4f904a0984b5f236ee5dbb21ddb4a",
"bluebird": "3.5.0",
"blueimp-canvas-to-blob": "2.1.0",
"body-parser": "1.18.2",
"bower": "1.8.2",
"celebrate": "7.0.3",
"connect-cachify": "0.0.17",
"connect-fonts-firasans": "0.0.6",
@ -44,8 +46,13 @@
"convict": "1.5.0",
"cookie-parser": "1.4.3",
"cors": "2.8.4",
"duration-js": "3.6.0",
"easterEgg": "git://github.com/mozilla/fxa-easter-egg.git#ab20cd517cf8ae9feee115e48745189d28e13bc3",
"es6-promise": "4.1.1",
"express": "4.16.2",
"extend": "3.0.1",
"fxa-checkbox": "git://github.com/mozilla/fxa-checkbox.git#7f856afffd394a144f718e28e6fb79092d6ccddd",
"fxa-crypto-relier": "2.1.0",
"fxa-geodb": "1.0.0",
"fxa-js-client": "1.0.1",
"fxa-mustache-loader": "0.0.2",
@ -76,9 +83,17 @@
"helmet": "3.8.2",
"i18n-abide": "0.0.25",
"joi": "10.4.1",
"jquery": "3.1.0",
"jquery-modal": "git://github.com/shane-tomlinson/jquery-modal.git#0576775d1b4590314b114386019f4c7421c77503",
"jquery-simulate": "1.0.2",
"jquery-ui": "1.12.1",
"jquery-ui-touch-punch-amd": "1.0.0",
"js-md5": "0.6.0",
"jsxgettext-recursive": "git://github.com/vladikoff/jsxgettext-recursive#msgctxt-support",
"legal-docs": "git://github.com/mozilla/legal-docs.git#master",
"load-grunt-tasks": "3.5.2",
"lodash": "4.17.4",
"mailcheck": "git://github.com/mailcheck/mailcheck.git#d995fcc1d02c124a893c2cb0fce2e0ce5f36bce4",
"mkdirp": "0.5.1",
"mocha": "4.0.1",
"morgan": "1.9.0",
@ -86,22 +101,28 @@
"mustache": "2.3.0",
"node-statsd": "0.1.1",
"node-uap": "git://github.com/vladikoff/node-uap.git#9cdd16247",
"node-uuid": "1.4.8",
"node-vat": "0.0.9",
"normalize.css": "3.0.1",
"on-headers": "1.0.1",
"photon-colors": "1.0.3",
"raven": "0.12.3",
"raven-js": "git://github.com/vladikoff/raven-js.git#customEndpoint-3.13.0",
"serve-static": "1.13.1",
"speed-trap": "git://github.com/rum-diary/speed-trap#0.0.7",
"time-grunt": "1.4.0",
"ua-parser-js": "git://github.com/vladikoff/ua-parser-js.git#fxa-version",
"uglifyjs-webpack-plugin": "1.1.8",
"underscore": "1.8.3",
"universal-analytics": "0.4.15",
"webpack": "3.10.0",
"webpack-dev-middleware": "2.0.4"
"webrtc-adapter-test": "0.2.5"
},
"devDependencies": {
"babel-cli": "6.26.0",
"babel-eslint": "8.2.1",
"babel-plugin-dynamic-import-webpack": "1.0.2",
"chai": "1.8.1",
"coveralls": "2.11.9",
"css": "2.2.1",
"eslint": "4.16.0",
@ -127,8 +148,9 @@
"npmshrink": "1.0.1",
"proxyquire": "1.7.4",
"requirejs": "2.3.5",
"sinon": "1.17.3",
"sinon": "3.2.1",
"sync-exec": "0.6.2",
"webpack-dev-middleware": "2.0.4",
"xmlhttprequest": "git://github.com/zaach/node-XMLHttpRequest.git#onerror",
"yargs": "10.0.3"
},

Просмотреть файл

@ -559,7 +559,6 @@ const conf = module.exports = convict({
excludeFiles: [
'/scripts/../tests/',
'/scripts/vendor/',
'/scripts/../bower_components/',
'require_config'
],
globalThreshold: 90,

Просмотреть файл

@ -9,7 +9,7 @@
* tosPpVersion at startup.
*
* If l10nVersion and tosPpVersion cannot be loaded statically from the
* content in ../../app/bower_components, then just show UNKNOWN.
* content in ../../node_modules, then just show UNKNOWN.
*
* If commitHash cannot be found from ./config/version.json (i.e., this is not
* production or stage), then an attempt will be made to determine commitHash
@ -83,9 +83,9 @@ function getL10nVersion () {
function getTosPpVersion () {
try {
const bowerPath = '../../app/bower_components/tos-pp/.bower.json';
const bowerInfo = require(bowerPath);
return bowerInfo && bowerInfo._release;
const pkgPath = '../../node_modules/legal-docs/package.json';
const pkgInfo = require(pkgPath);
return pkgInfo && pkgInfo.gitHead;
} catch (e) {
/* ignore */
}

Просмотреть файл

@ -11,7 +11,6 @@
<meta name="robots" content="noindex,nofollow">
<!-- build:css(.tmp) /styles/{{ locale }}.css -->
<link rel="stylesheet" href="/bower_components/normalize-css/normalize.css">
<link rel="stylesheet" href="/styles/fontello.css">
{{#if fontSupportDisabled}}
<link rel="stylesheet" href="/styles/system-font-main.css">

Просмотреть файл

@ -11,7 +11,6 @@
<meta name="robots" content="noindex,nofollow">
<!-- build:css(.tmp) /styles/{{ locale }}.css -->
<link rel="stylesheet" href="/bower_components/normalize-css/normalize.css">
<link rel="stylesheet" href="/styles/fontello.css">
{{#if fontSupportDisabled}}
<link rel="stylesheet" href="/styles/system-font-main.css">

Просмотреть файл

@ -11,7 +11,6 @@
<meta name="robots" content="noindex,nofollow">
<!-- build:css(.tmp) /styles/{{ locale }}.css -->
<link rel="stylesheet" href="/bower_components/normalize-css/normalize.css">
<link rel="stylesheet" href="/styles/fontello.css">
{{#if fontSupportDisabled}}
<link rel="stylesheet" href="/styles/system-font-main.css">

Просмотреть файл

@ -11,7 +11,6 @@
<meta name="robots" content="noindex,nofollow">
<!-- build:css(.tmp) /styles/{{ locale }}.css -->
<link rel="stylesheet" href="/bower_components/normalize-css/normalize.css">
<link rel="stylesheet" href="/styles/fontello.css">
{{#if fontSupportDisabled}}
<link rel="stylesheet" href="/styles/system-font-main.css">

Просмотреть файл

@ -15,7 +15,6 @@
<meta name="apple-itunes-app" content="app-id=989804926, affiliate-data=ct=smartbanner-fxa">
<!-- build:css(.tmp) /styles/{{ locale }}.css -->
<link rel="stylesheet" href="/bower_components/normalize-css/normalize.css">
<link rel="stylesheet" href="/styles/fontello.css">
{{#if fontSupportDisabled}}
<link rel="stylesheet" href="/styles/system-font-main.css">
@ -26,13 +25,6 @@
<!-- endbuild -->
<script type="text/javascript" src="{{ bundlePath }}/head.bundle.js"></script>
<!--[if lt IE 9]>
<!-- build:js /bower_components/html5shiv/dist/html5shiv.js -->
<script src="/bower_components/html5shiv/dist/html5shiv.js"></script>
<!-- endbuild -->
<![endif]-->
</head>
<body data-flow-id="{{flowId}}" data-flow-begin="{{flowBeginTime}}" data-static-resource-host="{{{staticResourceUrl}}}">
<div id="fox-logo"></div>

Просмотреть файл

@ -11,7 +11,6 @@
<meta name="robots" content="noindex,nofollow">
<!-- build:css(.tmp) /styles/{{ locale }}.css -->
<link rel="stylesheet" href="/bower_components/normalize-css/normalize.css">
<link rel="stylesheet" href="/styles/fontello.css">
{{#if fontSupportDisabled}}
<link rel="stylesheet" href="/styles/system-font-main.css">

Просмотреть файл

@ -11,7 +11,6 @@
<meta name="robots" content="noindex,nofollow">
<!-- build:css(.tmp) /styles/{{ locale }}.css -->
<link rel="stylesheet" href="/bower_components/normalize-css/normalize.css">
<link rel="stylesheet" href="/styles/fontello.css">
{{#if fontSupportDisabled}}
<link rel="stylesheet" href="/styles/system-font-main.css">

Просмотреть файл

@ -22,7 +22,7 @@ const APP_VERSION = /^[0-9]+\.([0-9]+)\./.exec(pkg.version)[1];
registerSuite('amplitude', {
beforeEach: function() {
sinon.stub(process.stderr, 'write', () => {});
sinon.stub(process.stderr, 'write').callsFake(() => {});
},
afterEach: function() {

Просмотреть файл

@ -21,7 +21,7 @@ registerSuite('flow-event', {
/*eslint-enable camelcase*/
};
sandbox = sinon.sandbox.create();
sandbox.stub(process.stderr, 'write', () => {});
sandbox.stub(process.stderr, 'write').callsFake(() => {});
mocks = {
amplitude: sinon.spy(),
config: {

Просмотреть файл

@ -16,10 +16,10 @@ var mockDateNow, mockRandomBytes, mockFlowIdKey, mockUserAgent;
suite.beforeEach = function () {
mockFlowIdKey = 'test hmac key';
mockUserAgent = 'test user agent';
sinon.stub(Date, 'now', function () {
sinon.stub(Date, 'now').callsFake(function () {
return mockDateNow;
});
sinon.stub(crypto, 'randomBytes', function (size) {
sinon.stub(crypto, 'randomBytes').callsFake(function (size) {
if (mockRandomBytes) {
return new Buffer(mockRandomBytes);
} else {

Просмотреть файл

@ -40,7 +40,7 @@ registerSuite('html-middleware', {
},
tests: {
'it calls middleware if an html response type': function () {
sinon.stub(res, 'getHeader', () => 'text/html; charset=UTF-8');
sinon.stub(res, 'getHeader').callsFake(() => 'text/html; charset=UTF-8');
wrappedMiddleware(req, res, next);
assert.isTrue(originalMiddleware.calledOnce);
@ -49,7 +49,7 @@ registerSuite('html-middleware', {
},
'it does not call middleware if a non-html response type': function () {
sinon.stub(res, 'getHeader', () => 'application/json; charset=UTF-8');
sinon.stub(res, 'getHeader').callsFake(() => 'application/json; charset=UTF-8');
wrappedMiddleware(req, res, next);
assert.isFalse(originalMiddleware.called);

Просмотреть файл

@ -94,7 +94,7 @@ registerSuite('routes/post-metrics', {
'route.preProcess': {
'route.preProcess with text/plain Content-Type': {
before: function () {
sinon.stub(Date, 'now', function () {
sinon.stub(Date, 'now').callsFake(function () {
return 1000;
});
setupMetricsHandlerTests({
@ -136,7 +136,7 @@ registerSuite('routes/post-metrics', {
'route.process': {
before: function () {
sinon.stub(Date, 'now', function () {
sinon.stub(Date, 'now').callsFake(function () {
return 1000;
});
setupMetricsHandlerTests({
@ -235,7 +235,7 @@ registerSuite('routes/post-metrics', {
'route.process with isSampledUser=false': {
before: function () {
sinon.stub(Date, 'now', function () {
sinon.stub(Date, 'now').callsFake(function () {
return 1000;
});
setupMetricsHandlerTests({

Просмотреть файл

@ -8,7 +8,6 @@ export NPM_CONFIG_LOGLEVEL=warn
node ./tests/teamcity/install-npm-deps.js \
bluebird \
bower \
convict \
css \
extend \

Просмотреть файл

@ -72,7 +72,6 @@ export npm_config_tmp=~/fxatemp
set -o xtrace # echo the following commands
node ./tests/teamcity/install-npm-deps.js \
bower \
convict \
firefox-profile \
fxa-js-client \
@ -85,8 +84,6 @@ node ./tests/teamcity/install-npm-deps.js \
xmlhttprequest \
yargs
node_modules/.bin/bower install --config.interactive=false
$FXA_FIREFOX_BINARY --version 2>/dev/null # squelch annoying 'GLib-CRITICAL **' message
# Tell the test where the X Server is located

Просмотреть файл

@ -54,35 +54,31 @@ const webpackConfig = {
'node_modules'
],
alias: {
backbone: path.resolve(__dirname, 'app/bower_components/backbone/backbone'),
canvasToBlob: path.resolve(__dirname, 'app/bower_components/blueimp-canvas-to-blob/js/canvas-to-blob'),
chai: path.resolve(__dirname, 'app/bower_components/chai/chai'),
'cocktail-lib': path.resolve(__dirname, 'app/bower_components/cocktail/Cocktail'),
canvasToBlob: path.resolve(__dirname, 'node_modules/blueimp-canvas-to-blob/js/canvas-to-blob'),
'cocktail-lib': path.resolve(__dirname, 'node_modules/backbone.cocktail/Cocktail'),
cocktail: path.resolve(__dirname, 'app/scripts/lib/cocktail'),
draggable: path.resolve(__dirname, 'app/bower_components/jquery-ui/ui/draggable'),
duration: path.resolve(__dirname, 'app/bower_components/Duration.js/duration'),
'es6-promise': path.resolve(__dirname, 'app/bower_components/es6-promise/dist/es6-promise'),
fxaCheckbox: path.resolve(__dirname, 'app/bower_components/fxa-checkbox/checkbox'),
draggable: path.resolve(__dirname, 'node_modules/jquery-ui/ui/widgets/draggable'),
duration: path.resolve(__dirname, 'node_modules/duration-js/duration'),
'es6-promise': path.resolve(__dirname, 'node_modules/es6-promise/dist/es6-promise'),
fxaCheckbox: path.resolve(__dirname, 'node_modules/fxa-checkbox/checkbox'),
fxaClient: 'fxa-js-client/client/FxAccountClient',
fxaCryptoDeriver: path.resolve(__dirname, 'app/bower_components/fxa-crypto-relier/dist/fxa-crypto-relier/fxa-crypto-deriver'),
jquery: path.resolve(__dirname, 'app/bower_components/jquery/dist/jquery'),
'jquery-simulate': path.resolve(__dirname, 'app/bower_components/jquery-simulate/jquery.simulate'),
fxaCryptoDeriver: path.resolve(__dirname, 'node_modules/fxa-crypto-relier/dist/fxa-crypto-relier/fxa-crypto-deriver'),
// jwcrypto is used by the main app and only contains DSA
// jwcrypto.rs is used by the unit tests to unbundle and verify
// assertions, which require RSA.
jwcrypto: path.resolve(__dirname, 'app/scripts/vendor/jwcrypto/jwcrypto.ds'),
'jwcrypto.rs': path.resolve(__dirname, 'app/scripts/vendor/jwcrypto/jwcrypto.rs'),
mailcheck: path.resolve(__dirname, 'app/bower_components/mailcheck/src/mailcheck'),
md5: path.resolve(__dirname, 'app/bower_components/js-md5/src/md5'),
mailcheck: path.resolve(__dirname, 'node_modules/mailcheck/src/mailcheck'),
md5: path.resolve(__dirname, 'node_modules/js-md5/src/md5'),
mocha: 'mocha/mocha',
modal: path.resolve(__dirname, 'app/bower_components/jquery-modal/jquery.modal'),
raven: path.resolve(__dirname, 'app/bower_components/raven-js/dist/raven'),
sinon: path.resolve(__dirname, 'app/bower_components/sinon/index'),
'touch-punch': path.resolve(__dirname, 'app/bower_components/jquery-ui-touch-punch/jquery.ui.touch-punch'),
'ua-parser-js': path.resolve(__dirname, 'app/bower_components/ua-parser-js/src/ua-parser'),
uuid: path.resolve(__dirname, 'app/bower_components/node-uuid/uuid'),
vat: path.resolve(__dirname, 'app/bower_components/vat/vat'),
webrtc: path.resolve(__dirname, 'app/bower_components/webrtc-adapter/adapter')
modal: path.resolve(__dirname, 'node_modules/jquery-modal/jquery.modal'),
raven: path.resolve(__dirname, 'node_modules/raven-js/dist/raven'),
sinon: path.resolve(__dirname, 'node_modules/sinon/pkg/sinon-3.2.1'),
'touch-punch': path.resolve(__dirname, 'node_modules/jquery-ui-touch-punch-amd/jquery.ui.touch-punch'),
'ua-parser-js': path.resolve(__dirname, 'node_modules/ua-parser-js/src/ua-parser'),
uuid: path.resolve(__dirname, 'node_modules/node-uuid/uuid'),
vat: path.resolve(__dirname, 'node_modules/node-vat/vat'),
webrtc: path.resolve(__dirname, 'node_modules/webrtc-adapter-test/adapter')
}
},