-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #346 from EnCiv/civ-serv
Uses Civil Server
- Loading branch information
Showing
25 changed files
with
32,945 additions
and
39,850 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Helmet } from 'react-helmet' | ||
|
||
const DynamicFontSizeHelmet = | ||
typeof window === 'undefined' | ||
? () => ( | ||
<Helmet | ||
script={[ | ||
{ | ||
type: 'text/javascript', | ||
innerHTML: `function setFontSize(){document.getElementsByTagName("html")[0].style.fontSize=Math.round(Math.min(window.innerWidth,window.innerHeight))/100*(15/(1080/100))+'px'}; addEventListener('resize',setFontSize); setFontSize();`, | ||
}, | ||
]} | ||
/> | ||
) | ||
: () => null | ||
|
||
export default DynamicFontSizeHelmet |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
#*************************************************************************' | ||
# These directoies need to exist in dist, even if you don't have them in your project | ||
# *************************************************************************' | ||
|
||
mkdir -p dist/events | ||
mkdir -p dist/routes | ||
mkdir -p dist/socket-apis | ||
mkdir -p dist/data-components | ||
mkdir -p dist/web-components | ||
# | ||
# assets is where static files go | ||
# | ||
mkdir -p ./assets/js/ | ||
# you can start with the favicon images from civil-server - but you should to replace them with your own some day | ||
mkdir -p ./assets/images | ||
cp -rp node_modules/civil-server/assets/images ./assets/images | ||
|
||
# | ||
# Update/create web-components/index.js to require all react components in that director, and in the listed child/peer directories. Web components are used by the getIota route - which uses reactServerRender | ||
# | ||
react-directory-indexer app/web-components/ node_modules/civil-server/dist/web-components/ || { | ||
echo Could not build web-components | ||
exit 1 | ||
} | ||
# | ||
# Update/create data-components/index.js to require all data-components in that director, and in the listed child/peer directories. Data components are used by the getIota route. | ||
# | ||
react-directory-indexer --data app/data-components/ node_modules/civil-server/dist/data-components/ || { | ||
echo Could not build data-components | ||
exit 1 | ||
} | ||
|
||
npm run svgr || { | ||
echo Could not svgr | ||
exit 1 | ||
} | ||
|
||
npm run transpile || { | ||
echo Could not transpile; | ||
exit 1 | ||
} | ||
|
||
# don't run webpack if this is a dependency of another project - the memory usage will blow out heroku build | ||
if test \"$NPM_PROJECT\" = \"\" || test \"$NPM_PROJECT\" == \"undebate\" ; then { | ||
npm run packbuild || { | ||
echo Could not webpack; | ||
exit 1 | ||
} | ||
}; fi | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.