Skip to content

Commit dbe69fa

Browse files
authoredAug 6, 2020
Merge pull request #3 from neonexus/master
Renamed / moved a few things for clarity. Added README for React source folder.
2 parents 4a485b4 + d68f8e7 commit dbe69fa

File tree

7 files changed

+16
-6
lines changed

7 files changed

+16
-6
lines changed
 

‎assets/src/Admin/AdminRouter.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import Login from '../Admin/Login';
1212
import SidebarNav from './SidebarNav';
1313
import Upgrade from './Upgrade';
1414

15-
import {APIProvider} from '../data/api';
16-
import {UserProvider, UserConsumer} from '../data/user';
15+
import {APIProvider} from '../data/apiContext';
16+
import {UserProvider, UserConsumer} from '../data/userContext';
1717

1818
class AdminRouter extends React.Component {
1919
constructor(props) {

‎assets/src/Admin/Login.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33

4-
import {APIConsumer} from '../data/api';
5-
import {UserConsumer} from '../data/user';
4+
import {APIConsumer} from '../data/apiContext';
5+
import {UserConsumer} from '../data/userContext';
66

77
import {Row, Button, Form} from 'react-bootstrap';
88

‎assets/src/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# React Source Files
2+
3+
This is where our React source files live.
4+
5+
## Things to note
6+
7+
* [`index.jsx`](index.jsx) is only used by Webpack dev server. Otherwise, is useless on remote servers.
8+
* The other 2 files in the root of this directory are Webpack entry points. These files are the starting point for our React apps.
9+
* The `common` folder is where shared, custom components should live.
10+
* The `data` folder is where React contexts live.
File renamed without changes.

‎assets/src/data/api.jsx renamed to ‎assets/src/data/apiContext.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import api from '../common/api';
2+
import api from './api';
33

44
const apiContext = React.createContext();
55

File renamed without changes.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sails-react-bootstrap-webpack",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "An opinionated base configuration of Sails, with Webpack for React support, and Bootstrap for styling.",
55
"keywords": [
66
"sails",

0 commit comments

Comments
 (0)