Skip to content

Commit

Permalink
production bundle optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno12mota committed Nov 11, 2016
1 parent e3bf525 commit a6ba697
Show file tree
Hide file tree
Showing 90 changed files with 147 additions and 357 deletions.
4 changes: 2 additions & 2 deletions lib/server/graphql/mutations/schemas/update.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import find from 'lodash.find';
import forEach from 'lodash.foreach';
import find from 'lodash/find';
import forEach from 'lodash/forEach';
import getProjection from 'helpers/get-projection';
import singleStatics from 'statics/schema-single-static-properties';
import {GraphQLNonNull} from 'graphql';
Expand Down
2 changes: 1 addition & 1 deletion lib/server/graphql/query-pagination.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import {
GraphQLString,
GraphQLInt,
Expand Down
2 changes: 1 addition & 1 deletion lib/server/graphql/types/generators/schema-entry-input.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import GraphQLJSON from 'graphql-type-json';
import {
GraphQLInputObjectType,
Expand Down
2 changes: 1 addition & 1 deletion lib/server/graphql/types/generators/schema-entry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import GraphQLJSON from 'graphql-type-json';
import {
GraphQLObjectType,
Expand Down
2 changes: 1 addition & 1 deletion lib/server/graphql/types/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import GraphQLJSON from 'graphql-type-json';
import PageModel from '../../models/page';
import UserModel from '../../models/user';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import userType from './user';

const menuType = new GraphQLObjectType({
Expand Down
2 changes: 1 addition & 1 deletion lib/server/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import bodyParser from 'body-parser';
import connectMongo from 'connect-mongo';
import express from 'express';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import graphqlHTTP from 'express-graphql';
import mongoose from 'mongoose';
import morgan from 'morgan';
Expand Down
2 changes: 1 addition & 1 deletion lib/server/middleware/fonts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import getWebFontLoader from 'helpers/fonts/get-webfontloader';

import SettingModel from '../models/setting';
Expand Down
2 changes: 1 addition & 1 deletion lib/server/models/schema-entry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import mongoose from 'mongoose';
import singleStatics from 'statics/schema-single-static-properties';
import {TypesNative} from 'helpers/data-types/native';
Expand Down
2 changes: 1 addition & 1 deletion lib/server/routers/media.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import path from 'path';
import resizeImage from 'helpers/resize-image';
import {Router} from 'express';
Expand Down
2 changes: 1 addition & 1 deletion lib/server/routers/public.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import getBaseComponent from 'helpers/get-base-component';
import getDefaultFavicon from 'helpers/default-favicon';
import nodemailer from 'nodemailer';
Expand Down
4 changes: 2 additions & 2 deletions lib/server/schema.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import clone from 'lodash.clone';
import forEach from 'lodash.foreach';
import clone from 'lodash/clone';
import forEach from 'lodash/forEach';
import {
GraphQLObjectType,
GraphQLSchema
Expand Down
4 changes: 2 additions & 2 deletions lib/shared/actions/page-builder.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import actionTypes from 'actions';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import getElement from 'helpers/get-element';
import getSchemaLinkActions from 'helpers/schema-link-actions';
import merge from 'lodash.merge';
import merge from 'lodash/merge';
import {dropDraft, saveDraft, updateDraft} from 'actions/draft';
import {mutation} from 'relate-js';
import {saveStyle, updateStyle} from 'actions/styles';
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/actions/settings.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import actionTypes from 'actions';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import {mutation} from 'relate-js';

export function changeSettingValue (id, value) {
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/components/button/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Component from 'components/component';
import cx from 'classnames';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import React, {PropTypes} from 'react';

import styles from './index.less';
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/components/dnd/droppable/droppable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import AnimateProps from 'components/animate-props';
import Component from 'components/component';
import bind from 'decorators/bind';
import cx from 'classnames';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import React, {PropTypes} from 'react';
import {findDOMNode} from 'react-dom';

Expand Down
2 changes: 1 addition & 1 deletion lib/shared/components/styles/styles.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import Component from 'components/component';
import React, {PropTypes} from 'react';
import {Component as Jss} from 'relax-jss';
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/decorators/query-props.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import hoistStatics from 'hoist-non-react-statics';
import qs from 'query-string';
import Component from 'components/component';
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/elements/button/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Component from 'components/component';
import Link from 'components/link';
import cx from 'classnames';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import React, {PropTypes} from 'react';
import {changeElementChildren} from 'actions/page-builder';

Expand Down
2 changes: 1 addition & 1 deletion lib/shared/elements/columns/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Component from 'components/component';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import React, {PropTypes, cloneElement} from 'react';

import classes from './classes';
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/elements/date/props-schema.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import moment from 'moment';

const momentDate = moment();
Expand Down
4 changes: 2 additions & 2 deletions lib/shared/elements/form/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Component from 'components/component';
import bind from 'decorators/bind';
import forEach from 'lodash.foreach';
import set from 'lodash.set';
import forEach from 'lodash/forEach';
import set from 'lodash/set';
import React, {PropTypes} from 'react';
import {addSchemaEntry} from 'actions/schema-entry';
import {findDOMNode} from 'react-dom';
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/elements/menu/menu.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Component from 'components/component';
import Spinner from 'components/spinner';
import cx from 'classnames';
import get from 'lodash.get';
import get from 'lodash/get';
import React, {PropTypes} from 'react';

import Button from './button';
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/elements/mobile-menu/menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Component from 'components/component';
import Portal from 'components/portal';
import bind from 'decorators/bind';
import cx from 'classnames';
import get from 'lodash.get';
import get from 'lodash/get';
import React, {PropTypes} from 'react';

import Button from './button';
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/elements/raw/style.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import css from 'helpers/styles/css';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import layoutOptions from 'helpers/styles/layout-options';

export default {
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/element-links/get-by-action.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

export default (links, action) => {
let result;
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/get-element-css.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import displays from 'statics/displays';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

export default function getElementCss (element, display) {
let elementCss = element.css || {};
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/get-element-props.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import displays from 'statics/displays';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

export default function getElementProps (element, display) {
let elementProps = element.props || {};
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/get-element-style-values.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import displays from 'statics/displays';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

export default function getElementStyleValues (defaults, options, displayOptions, display) {
const displayValues = {};
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/get-links-properties-map.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

export default (schemaLinks) => {
const propertiesLinks = {};
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/parse-fields.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

export default function parseFields (data, keys) {
let result = data;
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/parse-settings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

export default function parseSettings (_settings) {
const settings = {};
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/schema-link-actions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Utils from 'helpers/utils';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

export default function (pageBuilder, linkedElement, property, goal) {
const actionsValues = [];
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/set-element-links.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

/**
* Processes an elements links, returning the results
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/stringify-fields.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

export default function stringifyFields (data, keys) {
let result = data;
Expand Down
4 changes: 2 additions & 2 deletions lib/shared/helpers/styles-manager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import find from 'lodash.find';
import forEach from 'lodash.foreach';
import find from 'lodash/find';
import forEach from 'lodash/forEach';
import {Stylesheet} from 'relax-jss';

import getElementStyleValues from './get-element-style-values';
Expand Down
6 changes: 3 additions & 3 deletions lib/shared/helpers/styles/colors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import colr from 'colr';
import find from 'lodash.find';
import forEach from 'lodash.foreach';
import sortBy from 'lodash.sortby';
import find from 'lodash/find';
import forEach from 'lodash/forEach';
import sortBy from 'lodash/sortBy';

let colorsCollection = [];

Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/styles/css.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import invariant from 'invariant';
import utils from 'helpers/utils';

Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/traverser/children.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

import calculateElement from './element';

Expand Down
2 changes: 1 addition & 1 deletion lib/shared/helpers/traverser/links.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

/**
* Processes an elements links, returning the results
Expand Down
4 changes: 2 additions & 2 deletions lib/shared/helpers/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Colr from 'colr';
import cloneDeep from 'lodash.clonedeep';
import forEach from 'lodash.foreach';
import cloneDeep from 'lodash/cloneDeep';
import forEach from 'lodash/forEach';

import {getColorString} from './styles/colors';

Expand Down
2 changes: 1 addition & 1 deletion lib/shared/reducers/fonts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import actionTypes from 'actions';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import Relate from 'relate-js';

export const defaultState = {
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/reducers/media.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import actionTypes from 'actions';
import findIndex from 'lodash.findindex';
import findIndex from 'lodash/findIndex';

export const defaultState = {
display: 'grid',
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/reducers/menu.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Relate from 'relate-js';
import actionTypes from 'actions';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

export const defaultState = {};

Expand Down
4 changes: 2 additions & 2 deletions lib/shared/reducers/page-builder-actions/add.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import cloneDeep from 'lodash.clonedeep';
import cloneDeep from 'lodash/cloneDeep';
import elements from 'elements';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import changeDocContext from './helpers/change-doc-context';
import getId from './helpers/get-id';
import addChildren from './helpers/add-children';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import get from 'lodash.get';
import set from 'lodash.set';
import get from 'lodash/get';
import set from 'lodash/set';

/**
* Changes a property from the document (text)
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/reducers/page-builder-actions/duplicate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import cloneDeep from 'lodash.clonedeep';
import cloneDeep from 'lodash/cloneDeep';

import changeDocContext from './helpers/change-doc-context';
import cloneChildren from './helpers/clone-children';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

import invariant from 'invariant';
import getId from './get-id';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import get from 'lodash.get';
import get from 'lodash/get';
import links from 'helpers/traverser/links';

import getDocFromContext from './get-doc-from-context';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import cloneDeep from 'lodash.clonedeep';
import forEach from 'lodash.foreach';
import cloneDeep from 'lodash/cloneDeep';
import forEach from 'lodash/forEach';

import getId from './get-id';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

export default function removeChildren (children, copiedData) {
const childrenElements = {};
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/reducers/page-builder-actions/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

import add from './add';
import addLink from './add-link';
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/reducers/page-builder.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Relate from 'relate-js';
import actionTypes from 'actions';
import elements from 'elements';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

import checkOverAndSelected from './page-builder-actions/helpers/check-over-selected';
import doAction from './page-builder-actions';
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/reducers/schema-entry.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import actionTypes from 'actions';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';

const defaultState = {
saving: false,
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/reducers/schema.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import actionTypes from 'actions';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import slugify from 'slug';

const defaultState = {
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/reducers/settings.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import actionTypes from 'actions';
import forEach from 'lodash.foreach';
import forEach from 'lodash/forEach';
import {actionTypes as relateActionTypes} from 'relate-js';

const defaultState = {
Expand Down
Loading

0 comments on commit a6ba697

Please sign in to comment.