Skip to content

Commit

Permalink
Moved back {src/pages => pages} and {src/* => lib/*} due to vercel/ne…
Browse files Browse the repository at this point in the history
  • Loading branch information
amercier committed Jan 6, 2019
1 parent 121e3f7 commit 24c7bf5
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 30 deletions.
15 changes: 14 additions & 1 deletion .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
const env = require('./src/env.config.js');
const AUTO_ENV_VARS = /^REACT_APP_/i;

/**
* Extracts all environment variables starting by REACT_APP_.
*
* @type {Object} An object sub-set of process.env containing only REACT_APP_ variables.
*/
const env = Object.entries(process.env).reduce(
(exports, [key, value]) =>
AUTO_ENV_VARS.test(key)
? { ...exports, [`process.env.${key}`]: value }
: exports,
{},
);

// TODO Find a way to move this back to package.json
module.exports = {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
"redux-mock-store": "^1.5.3"
},
"scripts": {
"dev": "next src",
"build": "next build src",
"start": "next start src",
"dev": "next",
"build": "next build",
"start": "next start",
"lint": "run-p lint:*",
"lint:prettier": "prettier --list-different '**/*'",
"lint:eslint": "eslint --ignore-path .gitignore --ignore-pattern src/serviceWorker.js --ext .js,.jsx .",
"lint:eslint": "eslint --ignore-path .gitignore --ext .js,.jsx .",
"test": "jest"
},
"prettier": {
Expand Down Expand Up @@ -81,6 +81,6 @@
"snapshotSerializers": [
"enzyme-to-json/serializer"
],
"setupTestFrameworkScriptFile": "<rootDir>/src/jest.config.js"
"setupTestFrameworkScriptFile": "<rootDir>/setup-tests.js"
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pages/_app.jsx → pages/_app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import App, { Container } from 'next/app';
import { Provider } from 'react-redux';
import withRedux from 'next-redux-wrapper';
import withReduxSaga from 'next-redux-saga';
import makeStore from '../store';
import makeStore from '../lib/store';

/**
* Redux-connected app, using next-redux-wrapper.
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.jsx → pages/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { string, number, arrayOf, shape } from 'prop-types';
import { connect } from 'react-redux';
import { doStartPollingItems, doFetchItems } from '../actions/item';
import { doStartPollingItems, doFetchItems } from '../lib/actions/item';

/**
* Home page.
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.spec.jsx → pages/index.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Provider } from 'react-redux';
import configureStore from 'redux-mock-store';
import { mount, shallow } from 'enzyme';
import { doStartPollingItems, doFetchItems } from '../actions/item';
import { doStartPollingItems, doFetchItems } from '../lib/actions/item';
import ConnectedIndex, { Index } from '.';

const itemsStub = {
Expand Down
File renamed without changes.
12 changes: 0 additions & 12 deletions src/env.config.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/next.config.js

This file was deleted.

0 comments on commit 24c7bf5

Please sign in to comment.