Common reorg (#8025)

* Re-organize common folder

* fix: Correct paths in tests

* fix: move new content to proper folder

* chore: Move audio folder to assets

* Move sprites to sprites assets directory

* Move css sprites to assets directory

* Split out readmes for common code and sprites

* Move images to assets directory

* Move destinatin of shared browserified file

* remove unused file

* move compiled js to client-old

* Fix karma tests

* fix: Correct paths for sprites
This commit is contained in:
Blade Barringer
2016-09-16 10:18:07 -05:00
committed by Matteo Pagliazzi
parent d971e673af
commit 81b7eeeb71
5956 changed files with 269 additions and 270 deletions
@@ -2,7 +2,7 @@ import {
requester,
translate as t,
} from '../../../../helpers/api-v3-integration.helper';
import i18n from '../../../../../common/script/i18n';
import i18n from '../../../../../website/common/script/i18n';
describe('GET /content', () => {
it('returns content (and does not require authentication)', async () => {
@@ -4,7 +4,7 @@ import {
translate as t,
} from '../../../../helpers/api-v3-integration.helper';
import { v4 as generateUUID } from 'uuid';
import common from '../../../../../common';
import common from '../../../../../website/common';
describe('GET /groups/:groupId/members', () => {
let user;
@@ -3,7 +3,7 @@ import {
translate as t,
} from '../../../../helpers/api-v3-integration.helper';
import { v4 as generateUUID } from 'uuid';
import common from '../../../../../common';
import common from '../../../../../website/common';
describe('GET /members/:memberId', () => {
let user;
@@ -4,7 +4,7 @@ import {
sleep,
} from '../../../../helpers/api-v3-integration.helper';
import { v4 as generateUUID } from 'uuid';
import { quests as questScrolls } from '../../../../../common/script/content';
import { quests as questScrolls } from '../../../../../website/common/script/content';
describe('POST /groups/:groupId/quests/invite/:questKey', () => {
let questingGroup;
@@ -1,7 +1,7 @@
import {
generateUser,
} from '../../../../helpers/api-integration/v3';
import common from '../../../../../common';
import common from '../../../../../website/common';
describe('GET /user', () => {
let user;
@@ -4,7 +4,7 @@ import {
generateDaily,
generateReward,
} from '../../../../helpers/api-integration/v3';
import common from '../../../../../common';
import common from '../../../../../website/common';
import { v4 as generateUUID } from 'uuid';
describe('GET /user/anonymized', () => {
@@ -4,7 +4,7 @@ import {
generateUser,
translate as t,
} from '../../../../helpers/api-integration/v3';
import shared from '../../../../../common/script';
import shared from '../../../../../website/common/script';
let content = shared.content;
@@ -2,7 +2,7 @@ import {
generateUser,
translate as t,
} from '../../../../helpers/api-integration/v3';
import shared from '../../../../../common/script';
import shared from '../../../../../website/common/script';
let content = shared.content;
@@ -2,7 +2,7 @@ import {
generateUser,
translate as t,
} from '../../../../helpers/api-integration/v3';
import shared from '../../../../../common/script';
import shared from '../../../../../website/common/script';
let content = shared.content;
@@ -2,7 +2,7 @@ import {
generateUser,
translate as t,
} from '../../../../helpers/api-integration/v3';
import shared from '../../../../../common/script';
import shared from '../../../../../website/common/script';
let content = shared.content;
@@ -4,7 +4,7 @@ import {
generateUser,
translate as t,
} from '../../../../helpers/api-integration/v3';
import content from '../../../../../common/script/content';
import content from '../../../../../website/common/script/content';
describe('POST /user/feed/:pet/:food', () => {
let user;
@@ -2,7 +2,7 @@ import {
generateUser,
translate as t,
} from '../../../../helpers/api-integration/v3';
import content from '../../../../../common/script/content/index';
import content from '../../../../../website/common/script/content/index';
describe('POST /user/open-mystery-item', () => {
let user;
@@ -2,7 +2,7 @@ import {
generateUser,
translate as t,
} from '../../../../helpers/api-integration/v3';
import content from '../../../../../common/script/content';
import content from '../../../../../website/common/script/content';
describe('POST /user/sell/:type/:key', () => {
let user;
+1 -1
View File
@@ -7,7 +7,7 @@ import { recoverCron, cron } from '../../../../../website/server/libs/cron';
import { model as User } from '../../../../../website/server/models/user';
import * as Tasks from '../../../../../website/server/models/task';
import { clone } from 'lodash';
import common from '../../../../../common';
import common from '../../../../../website/common';
// const scoreTask = common.ops.scoreTask;
+1 -1
View File
@@ -3,7 +3,7 @@ import {
getTasks,
syncableAttrs,
} from '../../../../../website/server/libs/taskManager';
import i18n from '../../../../../common/script/i18n';
import i18n from '../../../../../website/common/script/i18n';
import {
generateUser,
generateGroup,
@@ -4,7 +4,7 @@ import {
generateReq,
generateNext,
} from '../../../../helpers/api-unit.helper';
import i18n from '../../../../../common/script/i18n';
import i18n from '../../../../../website/common/script/i18n';
import { ensureAdmin, ensureSudo } from '../../../../../website/server/middlewares/ensureAccessRight';
import { NotAuthorized } from '../../../../../website/server/libs/errors';
@@ -7,7 +7,7 @@ import {
getUserLanguage,
attachTranslateFunction,
} from '../../../../../website/server/middlewares/language';
import common from '../../../../../common';
import common from '../../../../../website/common';
import Bluebird from 'bluebird';
import { model as User } from '../../../../../website/server/models/user';
+1 -1
View File
@@ -2,7 +2,7 @@ import { model as Challenge } from '../../../../../website/server/models/challen
import { model as Group } from '../../../../../website/server/models/group';
import { model as User } from '../../../../../website/server/models/user';
import * as Tasks from '../../../../../website/server/models/task';
import common from '../../../../../common/';
import common from '../../../../../website/common/';
import { each, find } from 'lodash';
describe('Challenge Model', () => {
+2 -2
View File
@@ -1,10 +1,10 @@
import { sleep } from '../../../../helpers/api-unit.helper';
import { model as Group } from '../../../../../website/server/models/group';
import { model as User } from '../../../../../website/server/models/user';
import { quests as questScrolls } from '../../../../../common/script/content';
import { quests as questScrolls } from '../../../../../website/common/script/content';
import * as email from '../../../../../website/server/libs/email';
import validator from 'validator';
import { TAVERN_ID } from '../../../../../common/script/';
import { TAVERN_ID } from '../../../../../website/common/script/';
describe('Group Model', () => {
let party, questLeader, participatingMember, nonParticipatingMember, undecidedMember;
+1 -1
View File
@@ -1,5 +1,5 @@
import { model as User } from '../../../../../website/server/models/user';
import common from '../../../../../common';
import common from '../../../../../website/common';
describe('User Model', () => {
it('keeps user._tmp when calling .toJSON', () => {