Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

Added createOptions scriptLocation #153

Merged
merged 2 commits into from
Apr 30, 2016
Merged

Added createOptions scriptLocation #153

merged 2 commits into from
Apr 30, 2016

Conversation

JustinMGaiam
Copy link
Contributor

@JustinMGaiam JustinMGaiam commented Apr 20, 2016

Adding a create option where the script, which contains REACT_ENGINE, can be added to the head of the html. Ideally I would like an option to not automatically render the script tag automatically plus a function to generate the script which allows me to put it where I want in the html component manually, but this works for now.

--- Usage ---
const engine = reactEngine.server.create({
routes: require('./routes.jsx'),
routesFilePath: './routes.jsx',
scriptLocation: 'head',
page404: require('./not-found.jsx'))
})

Adding a create option where the script, which contains __REACT_ENGINE__, can be added to the head of the html.  Ideally I would like an option to not automatically render the script tag automatically plus a function to generate the script which allows me to put it where I want in the html component manually, but this works for now.

--- Usage ---
const engine = reactEngine.server.create({
    routes: require('./routes.jsx'),
    routesFilePath: './routes.jsx',
    scriptLoc: 'head',
    page404: require('./not-found.jsx'))
  })
@vuhwang
Copy link
Contributor

vuhwang commented Apr 28, 2016

Would you mind updating the readme Server options spec section? Also could we use scriptLocation instead of scriptLoc?

@JustinMGaiam
Copy link
Contributor Author

@vuhwang I will get that changed to scriptLocation as well as update the README. Thanks for taking a look.

…mentation. Option name scriptLoc changed to scriptLocation.
@JustinMGaiam JustinMGaiam changed the title Added createOptions scriptLoc Added createOptions scriptLocation Apr 28, 2016
@JustinMGaiam
Copy link
Contributor Author

@vuhwang ok the scriptLocation changes have been made

@vuhwang vuhwang merged commit 8d98c40 into paypal:master Apr 30, 2016
@vuhwang
Copy link
Contributor

vuhwang commented Apr 30, 2016

thanks @JustinMGaiam. v3.3.0 has been published with this change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants