Building zip for itch with grunt

main
Ashelyn Dawn 4 years ago
parent 73613b1a0b
commit 0dfd566b0b

1
.gitignore vendored

@ -10,6 +10,7 @@
# production
/build
/*.zip
# misc
.DS_Store

@ -0,0 +1,34 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sed: {
relativePaths: {
path: './build/index.html',
pattern: '="/',
replacement: '="./'
}
},
compress: {
main: {
createEmptyArchive: false,
options: {
archive: 'DrowningAmongStars_<%= pkg.version %>.zip'
},
files: [{
expand: true,
cwd: './build/',
src: [
'./index.html',
'./static/**'
],
dest: '/'
}]
}
},
})
grunt.loadNpmTasks('grunt-sed')
grunt.loadNpmTasks('grunt-contrib-compress')
grunt.registerTask('default', ['sed', 'compress'])
}

1471
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -24,7 +24,8 @@
"dev": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"export": "npm run build && grunt"
},
"eslintConfig": {
"extends": "react-app"
@ -42,6 +43,9 @@
]
},
"devDependencies": {
"@types/webpack-env": "^1.15.2"
"@types/webpack-env": "^1.15.2",
"grunt": "^1.2.1",
"grunt-contrib-compress": "^1.6.0",
"grunt-sed": "^0.1.1"
}
}

@ -2,43 +2,13 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link href="https://fonts.googleapis.com/css2?family=family=Share+Tech+Mono&family=Source+Code+Pro:wght@300&family=VT323&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Drowning Among Stars</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

@ -1,6 +1,7 @@
.options {
max-width: 800px;
width: calc(100vw - 200px);
width: calc(100vw - 40px);
font-size: 12px;
}
.options button {

Loading…
Cancel
Save