-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* `functions` option which includes function setup with babel * Error Handling option - includes Stackdriver client side error handling * Analytics option - includes Google analytics * `blueprints` option * `engines` added to `package.json` * `function` sub-generator for generating Cloud Functions for HTTPS, Firestore, RTDB, Storage, and Auth * Functions dependency install is now run for main generator * `port` (local server port number) is now within `project.config.js` for easy switching
- Loading branch information
1 parent
76e7dd0
commit 9ca6ac3
Showing
159 changed files
with
11,550 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...ct-firebase-redux/blueprints/component/files/src/components/__name__/__name__.enhancer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { compose } from 'redux' | ||
import { withHandlers } from 'recompose' | ||
import { withNotifications } from 'modules/notification' | ||
|
||
export default compose( | ||
withNotifications, | ||
withHandlers({ | ||
|
||
}) | ||
) |
18 changes: 18 additions & 0 deletions
18
examples/react-firebase-redux/blueprints/component/files/src/components/__name__/__name__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import classes from './<%= pascalEntityName %>.scss' | ||
|
||
export const <%= pascalEntityName %> = ({ <%= camelEntityName %> }) => ( | ||
<div className={classes.container}> | ||
<h1><%= pascalEntityName %></h1> | ||
<div> | ||
<pre>{JSON.stringify(<%= camelEntityName %>, null, 2)}</pre> | ||
</div> | ||
</div> | ||
) | ||
|
||
<%= pascalEntityName %>.propTypes = { | ||
<%= camelEntityName %>: PropTypes.object | ||
} | ||
|
||
export default <%= pascalEntityName %> |
5 changes: 5 additions & 0 deletions
5
...les/react-firebase-redux/blueprints/component/files/src/components/__name__/__name__.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@import 'base'; | ||
|
||
.container { | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
examples/react-firebase-redux/blueprints/component/files/src/components/__name__/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import <%= pascalEntityName %> from './<%= pascalEntityName %>' | ||
import enhancer from './<%= pascalEntityName %>.enhancer' | ||
|
||
export default enhancer(<%= pascalEntityName %>) |
21 changes: 21 additions & 0 deletions
21
...eact-firebase-redux/blueprints/component/files/tests/components/__name__/__name__.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react' | ||
import <%= pascalEntityName %> from 'components/<%= pascalEntityName %>' | ||
import { shallow } from 'enzyme' | ||
|
||
describe('(Component) <%= pascalEntityName %>', () => { | ||
let _component | ||
|
||
beforeEach(() => { | ||
_component = shallow( | ||
<<%= pascalEntityName %> | ||
<%= camelEntityName %>={{}} | ||
/> | ||
) | ||
}) | ||
|
||
it('Renders div', () => { | ||
const firstDiv = _component.find('div') | ||
expect(firstDiv).to.exist | ||
}) | ||
|
||
}) |
25 changes: 25 additions & 0 deletions
25
examples/react-firebase-redux/blueprints/component/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// module.exports = { | ||
// locals: function(options) { | ||
// // Return custom template variables here. | ||
// return {}; | ||
// }, | ||
|
||
// fileMapTokens: function(options) ( | ||
// // Return custom tokens to be replaced in your files | ||
// return { | ||
// __token__: function(options){ | ||
// // logic to determine value goes here | ||
// return 'value'; | ||
// } | ||
// } | ||
// }, | ||
|
||
// Should probably never need to be overriden | ||
// | ||
// filesPath: function() { | ||
// return path.join(this.path, 'files'); | ||
// }, | ||
|
||
// beforeInstall: function(options) {}, | ||
// afterInstall: function(options) {}, | ||
// }; |
4 changes: 4 additions & 0 deletions
4
...firebase-redux/blueprints/form/files/src/components/__name__Form/__name__Form.enhancer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { reduxForm } from 'redux-form' | ||
import { formNames } from 'constants' | ||
|
||
export default reduxForm({ form: formNames.<%= pascalEntityName %> }) |
35 changes: 35 additions & 0 deletions
35
...es/react-firebase-redux/blueprints/form/files/src/components/__name__Form/__name__Form.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import { Field } from 'redux-form' | ||
import { TextField } from 'redux-form-material-ui' | ||
import Button from 'material-ui/Button' | ||
import classes from './<%= pascalEntityName %>Form.scss' | ||
|
||
export const <%= pascalEntityName %>Form = ({ | ||
handleSubmit, | ||
submitting, | ||
pristine | ||
}) => ( | ||
<form className={classes.container} onSubmit={handleSubmit}> | ||
<Field | ||
name="displayName" | ||
component={TextField} | ||
label="Display Name" | ||
/> | ||
<Button | ||
disabled={submitting || pristine} | ||
color="primary" | ||
type="submit" | ||
className={classes.submit}> | ||
Save | ||
</Button> | ||
</form> | ||
) | ||
|
||
<%= pascalEntityName %>Form.propTypes = { | ||
submitting: PropTypes.bool.isRequired, // from enhancer (reduxForm) | ||
pristine: PropTypes.bool.isRequired, // from enhancer (reduxForm) | ||
handleSubmit: PropTypes.func.isRequired // from enhancer (reduxForm) | ||
} | ||
|
||
export default <%= pascalEntityName %>Form |
5 changes: 5 additions & 0 deletions
5
.../react-firebase-redux/blueprints/form/files/src/components/__name__Form/__name__Form.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@import 'base'; | ||
|
||
.container { | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
examples/react-firebase-redux/blueprints/form/files/src/components/__name__Form/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import <%= pascalEntityName %>Form from './<%= pascalEntityName %>Form' | ||
import enhancer from './<%= pascalEntityName %>Form.enhancer' | ||
|
||
export default enhancer(<%= pascalEntityName %>Form) |
21 changes: 21 additions & 0 deletions
21
...react-firebase-redux/blueprints/form/files/tests/components/__name__Form/__name__.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react' | ||
import <%= pascalEntityName %>Form from 'components/<%= pascalEntityName %>Form' | ||
import { shallow } from 'enzyme' | ||
|
||
describe('(Component) <%= pascalEntityName %>Form', () => { | ||
let _component | ||
|
||
beforeEach(() => { | ||
_component = shallow( | ||
<<%= pascalEntityName %>Form | ||
onSubmit={() => { }} | ||
/> | ||
) | ||
}) | ||
|
||
it('Renders div', () => { | ||
const firstDiv = _component.find('div') | ||
expect(firstDiv).to.exist | ||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// module.exports = { | ||
// locals: function(options) { | ||
// // Return custom template variables here. | ||
// return {}; | ||
// }, | ||
|
||
// fileMapTokens: function(options) ( | ||
// // Return custom tokens to be replaced in your files | ||
// return { | ||
// __token__: function(options){ | ||
// // logic to determine value goes here | ||
// return 'value'; | ||
// } | ||
// } | ||
// }, | ||
|
||
// Should probably never need to be overriden | ||
// | ||
// filesPath: function() { | ||
// return path.join(this.path, 'files'); | ||
// }, | ||
|
||
// beforeInstall: function(options) {}, | ||
// afterInstall: function(options) {}, | ||
// }; |
18 changes: 18 additions & 0 deletions
18
examples/react-firebase-redux/blueprints/function/files/functions/src/__name__/__name__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import classes from './<%= pascalEntityName %>.scss' | ||
|
||
export const <%= pascalEntityName %> = ({ <%= camelEntityName %> }) => ( | ||
<div className={classes.container}> | ||
<h1><%= pascalEntityName %></h1> | ||
<div> | ||
<pre>{JSON.stringify(<%= camelEntityName %>, null, 2)}</pre> | ||
</div> | ||
</div> | ||
) | ||
|
||
<%= pascalEntityName %>.propTypes = { | ||
<%= camelEntityName %>: PropTypes.object | ||
} | ||
|
||
export default <%= pascalEntityName %> |
4 changes: 4 additions & 0 deletions
4
examples/react-firebase-redux/blueprints/function/files/functions/src/__name__/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import <%= pascalEntityName %> from './<%= pascalEntityName %>' | ||
import enhancer from './<%= pascalEntityName %>.enhancer' | ||
|
||
export default enhancer(<%= pascalEntityName %>) |
Oops, something went wrong.