bundle css and firebase

This commit is contained in:
Ayo 2019-12-10 12:27:06 +08:00
parent 20f1347127
commit 9a34995b86
8 changed files with 1184 additions and 17 deletions

View file

@ -33,10 +33,6 @@
<button onclick="updateLeaders()">Update Leaders</button> <button onclick="updateLeaders()">Update Leaders</button>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-firestore.js"></script>
<script type=module src="ayo.js"></script> <script type=module src="ayo.js"></script>
</body> </body>

View file

@ -22,8 +22,6 @@
gtag('config', 'UA-113797180-1'); gtag('config', 'UA-113797180-1');
</script> </script>
<link rel="stylesheet" href="/main.css" />
<link rel="stylesheet" href="/src/services/loading/loading.css" />
<link rel="shortcut icon" type="image/png" href="/favicon.ico"> <link rel="shortcut icon" type="image/png" href="/favicon.ico">
</head> </head>
<body> <body>
@ -40,10 +38,6 @@
</div> </div>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-firestore.js"></script>
<script type="module" src="/dist/main.js"></script> <script type="module" src="/dist/main.js"></script>
</body> </body>
</html> </html>

1171
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -12,10 +12,13 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"firebase": "^7.5.2",
"webpack": "^4.41.2" "webpack": "^4.41.2"
}, },
"devDependencies": { "devDependencies": {
"css-loader": "^3.3.0",
"http-server": "^0.12.0", "http-server": "^0.12.0",
"style-loader": "^1.0.1",
"webpack-cli": "^3.3.10" "webpack-cli": "^3.3.10"
} }
} }

View file

@ -5,9 +5,11 @@
Blog: FullHacker.com Blog: FullHacker.com
Live: games.fullhacker.com/minesweeper Live: games.fullhacker.com/minesweeper
*/ */
import './index.css';
import './services/loading/loading.css';
import { Minesweeper } from './minesweeper.js'; import { Minesweeper } from './minesweeper.js';
/** start the game **/ /** start the game **/
const myMinesweeper = new Minesweeper(); const myMinesweeper = new Minesweeper();
myMinesweeper.initialize(); myMinesweeper.initialize();
console.log('hey');

View file

@ -1,3 +1,6 @@
import firebase from 'firebase/app';
import 'firebase/firestore';
export class DatabaseService { export class DatabaseService {
constructor() { constructor() {
// Your web app's Firebase configuration // Your web app's Firebase configuration

10
webpack.config.js Normal file
View file

@ -0,0 +1,10 @@
module.exports = {
module: {
rules: [
{
test: /\.css$/i,
use:['style-loader','css-loader']
},
],
},
};