修改mobile打包流程
This commit is contained in:
parent
5eb14f26fb
commit
41192dacff
@ -5,6 +5,7 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"desktop": "webpack --config ./webpack.desktop.js",
|
||||
"mobile": "webpack --config ./webpack.mobile.js",
|
||||
"deploy:prod": "rm -f ./src/.DS_Store && aws s3 sync ./src s3://cebg.games.new --acl public-read --exclude \"pubgv4/*\" --exclude \"release/*\"",
|
||||
"refresh:prod": "aws cloudfront create-invalidation --distribution-id EE4HC9OXEQC7Y --paths \"/*\""
|
||||
},
|
||||
|
@ -18,10 +18,6 @@
|
||||
content="CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game"
|
||||
/>
|
||||
<title>404 | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS</title>
|
||||
<script src="./js/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/base.css" />
|
||||
<link rel="stylesheet" href="./css/main.css" />
|
||||
<link rel="stylesheet" href="./css/modal.css" />
|
||||
<style>
|
||||
h1 {
|
||||
font-size: 20px;
|
||||
@ -159,8 +155,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="./js/main.js"></script>
|
||||
<script type="text/javascript" src="./js/jcchain.js"></script>
|
||||
<script type="text/javascript" src="./js/chain.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-2.2.4.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -18,11 +18,6 @@
|
||||
content="CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game"
|
||||
/>
|
||||
<title>NFT | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS</title>
|
||||
<script src="./js/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/base.css" />
|
||||
<link rel="stylesheet" href="./css/main.css" />
|
||||
<link rel="stylesheet" href="./css/swiper.css" />
|
||||
<link rel="stylesheet" href="./css/modal.css" />
|
||||
</head>
|
||||
<body>
|
||||
<section class="main">
|
||||
@ -557,10 +552,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="./js/main.js"></script>
|
||||
<script type="text/javascript" src="./js/swiper.min.js"></script>
|
||||
<script type="text/javascript" src="./js/jcchain.js"></script>
|
||||
<script type="text/javascript" src="./js/chain.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-2.2.4.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/swiper@3.4.2/dist/js/swiper.min.js"
|
||||
integrity="sha256-ShAhm+50eq3u2njxZteHrfMlg/Nh+I1EtHL289p5gIM="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
var mySwiper = ''
|
||||
var mySwiper2 = ''
|
||||
|
@ -18,10 +18,6 @@
|
||||
content="CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game"
|
||||
/>
|
||||
<title>Roadmap | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS</title>
|
||||
<script src="./js/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/base.css" />
|
||||
<link rel="stylesheet" href="./css/main.css" />
|
||||
<link rel="stylesheet" href="./css/modal.css" />
|
||||
</head>
|
||||
<body>
|
||||
<section class="main">
|
||||
@ -142,8 +138,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="./js/main.js"></script>
|
||||
<script type="text/javascript" src="./js/jcchain.js"></script>
|
||||
<script type="text/javascript" src="./js/chain.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-2.2.4.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -18,10 +18,6 @@
|
||||
content="CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game"
|
||||
/>
|
||||
<title>Tokenomic | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS</title>
|
||||
<script src="./js/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/base.css" />
|
||||
<link rel="stylesheet" href="./css/main.css" />
|
||||
<link rel="stylesheet" href="./css/modal.css" />
|
||||
</head>
|
||||
<body>
|
||||
<section class="main">
|
||||
@ -123,7 +119,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tokenomic-p-con" style="padding-top: 20px;">
|
||||
<img src="imgMobile/TOKENOMIC/02/tcz@2x.png" width="90%" "/>
|
||||
<img src="imgMobile/TOKENOMIC/02/tcz@2x.png" width="90%" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="tokenomic-p-item">
|
||||
@ -228,9 +224,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="./js/main.js"></script>
|
||||
<script type="text/javascript" src="./js/jcchain.js"></script>
|
||||
<script type="text/javascript" src="./js/chain.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-2.2.4.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('.tokenomic-tab-inner li').click(function () {
|
||||
|
@ -18,10 +18,6 @@
|
||||
content="CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game"
|
||||
/>
|
||||
<title>Gameplay | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS</title>
|
||||
<script src="./js/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/base.css" />
|
||||
<link rel="stylesheet" href="./css/main.css" />
|
||||
<link rel="stylesheet" href="./css/modal.css" />
|
||||
</head>
|
||||
<body>
|
||||
<section class="main">
|
||||
@ -234,9 +230,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="./js/main.js"></script>
|
||||
<script type="text/javascript" src="./js/jcchain.js"></script>
|
||||
<script type="text/javascript" src="./js/chain.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-2.2.4.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<script>
|
||||
// $('#gameVideo').click(function () {
|
||||
// $('.video-mask').hide()
|
||||
|
@ -18,11 +18,6 @@
|
||||
content="CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game"
|
||||
/>
|
||||
<title>CEBG: CRYPTO ELITE‘S BATTLEGROUNDS</title>
|
||||
<script src="./js/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/base.css" />
|
||||
<link rel="stylesheet" href="./css/main.css" />
|
||||
<link rel="stylesheet" href="./css/swiper.css" />
|
||||
<link rel="stylesheet" href="./css/modal.css" />
|
||||
</head>
|
||||
<body>
|
||||
<section class="main">
|
||||
@ -290,10 +285,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="./js/main.js"></script>
|
||||
<script type="text/javascript" src="./js/swiper.min.js"></script>
|
||||
<script type="text/javascript" src="./js/jcchain.js"></script>
|
||||
<script type="text/javascript" src="./js/chain.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-2.2.4.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/swiper@3.4.2/dist/js/swiper.min.js"
|
||||
integrity="sha256-ShAhm+50eq3u2njxZteHrfMlg/Nh+I1EtHL289p5gIM="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var mySwiper = $('.swiper-container').swiper({
|
||||
|
6
src/mobile/js/app.js
Normal file
6
src/mobile/js/app.js
Normal file
@ -0,0 +1,6 @@
|
||||
require('../css/base.css')
|
||||
require('../css/main.css')
|
||||
require('../css/modal.css')
|
||||
require('../../../node_modules/swiper/dist/css/swiper.css')
|
||||
require('./main.js')
|
||||
require('./chain.js')
|
@ -1,38 +1,38 @@
|
||||
$(function () {
|
||||
var chain = new jcchain.JCChain()
|
||||
var toggleLoginBtn = function () {
|
||||
if (chain.logined) {
|
||||
$('#header_loginbtn').hide()
|
||||
$('#header_logoutbtn').show()
|
||||
} else {
|
||||
$('#header_loginbtn').show()
|
||||
$('#header_logoutbtn').hide()
|
||||
}
|
||||
}
|
||||
toggleLoginBtn()
|
||||
var logSuccess = function () {
|
||||
console.log('login success')
|
||||
toggleLoginBtn()
|
||||
}
|
||||
$('#header_loginbtn').click(function () {
|
||||
chain.login().then(logSuccess.bind(this))
|
||||
})
|
||||
var jcchain = require('../../desktop/js/jcchain.js')
|
||||
|
||||
$('#header_logoutbtn').click(function () {
|
||||
chain.logout().then(() => {
|
||||
toggleLoginBtn()
|
||||
})
|
||||
})
|
||||
jcchain.EventBus.$on(jcchain.SHOW_CHAIN_MODAL, function () {
|
||||
console.log('show chain modal')
|
||||
$('#wallet_modal').show()
|
||||
})
|
||||
$('#metamask_card').click(function () {
|
||||
chain.selectWalletAndLogin(1).then(logSuccess.bind(this))
|
||||
$('#wallet_modal').hide()
|
||||
})
|
||||
$('#wc_card').click(function () {
|
||||
chain.selectWalletAndLogin(2).then(logSuccess.bind(this))
|
||||
$('#wallet_modal').hide()
|
||||
var chain = new jcchain.JCChain()
|
||||
var toggleLoginBtn = function () {
|
||||
if (chain.logined) {
|
||||
$('#header_loginbtn').hide()
|
||||
$('#header_logoutbtn').show()
|
||||
} else {
|
||||
$('#header_loginbtn').show()
|
||||
$('#header_logoutbtn').hide()
|
||||
}
|
||||
}
|
||||
toggleLoginBtn()
|
||||
var logSuccess = function () {
|
||||
console.log('login success')
|
||||
toggleLoginBtn()
|
||||
}
|
||||
$('#header_loginbtn').click(function () {
|
||||
chain.login().then(logSuccess.bind(this))
|
||||
})
|
||||
|
||||
$('#header_logoutbtn').click(function () {
|
||||
chain.logout().then(() => {
|
||||
toggleLoginBtn()
|
||||
})
|
||||
})
|
||||
jcchain.EventBus.$on(jcchain.SHOW_CHAIN_MODAL, function () {
|
||||
console.log('show chain modal')
|
||||
$('#wallet_modal').show()
|
||||
})
|
||||
$('#metamask_card').click(function () {
|
||||
chain.selectWalletAndLogin(1).then(logSuccess.bind(this))
|
||||
$('#wallet_modal').hide()
|
||||
})
|
||||
$('#wc_card').click(function () {
|
||||
chain.selectWalletAndLogin(2).then(logSuccess.bind(this))
|
||||
$('#wallet_modal').hide()
|
||||
})
|
||||
|
File diff suppressed because one or more lines are too long
@ -18,10 +18,7 @@
|
||||
content="CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game"
|
||||
/>
|
||||
<title>Privacy Policy | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS</title>
|
||||
<script src="./js/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/base.css" />
|
||||
<link rel="stylesheet" href="./css/main.css" />
|
||||
<link rel="stylesheet" href="./css/modal.css" />
|
||||
|
||||
<style>
|
||||
h1 {
|
||||
font-size: 20px;
|
||||
@ -316,8 +313,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="./js/main.js"></script>
|
||||
<script type="text/javascript" src="./js/jcchain.js"></script>
|
||||
<script type="text/javascript" src="./js/chain.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-2.2.4.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -18,10 +18,6 @@
|
||||
content="CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game"
|
||||
/>
|
||||
<title>Team | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS</title>
|
||||
<script src="./js/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/base.css" />
|
||||
<link rel="stylesheet" href="./css/main.css" />
|
||||
<link rel="stylesheet" href="./css/modal.css" />
|
||||
</head>
|
||||
<body>
|
||||
<section class="main">
|
||||
@ -227,8 +223,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="./js/main.js"></script>
|
||||
<script type="text/javascript" src="./js/jcchain.js"></script>
|
||||
<script type="text/javascript" src="./js/chain.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-2.2.4.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -18,10 +18,6 @@
|
||||
content="CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game"
|
||||
/>
|
||||
<title>Terms | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS</title>
|
||||
<script src="./js/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="./css/base.css" />
|
||||
<link rel="stylesheet" href="./css/main.css" />
|
||||
<link rel="stylesheet" href="./css/modal.css" />
|
||||
<style>
|
||||
h1 {
|
||||
font-size: 20px;
|
||||
@ -558,8 +554,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="./js/main.js"></script>
|
||||
<script type="text/javascript" src="./js/jcchain.js"></script>
|
||||
<script type="text/javascript" src="./js/chain.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-2.2.4.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
</body>
|
||||
</html>
|
||||
|
97
webpack.mobile.js
Normal file
97
webpack.mobile.js
Normal file
@ -0,0 +1,97 @@
|
||||
const path = require('path')
|
||||
const glob = require('glob')
|
||||
var webpack = require('webpack')
|
||||
const htmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')
|
||||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
|
||||
const entryFiles = glob.sync(path.join(__dirname, './src/mobile/*.html'))
|
||||
const htmlWebpackPlugins = []
|
||||
|
||||
entryFiles.map((entryFile) => {
|
||||
const matchRes = entryFile.match(/src\/mobile\/(.*)\.html$/)
|
||||
const pageName = matchRes && matchRes[1]
|
||||
console.log(pageName)
|
||||
htmlWebpackPlugins.push(
|
||||
new htmlWebpackPlugin({
|
||||
template: path.join(__dirname, `./src/mobile/${pageName}.html`),
|
||||
filename: `${pageName}.html`,
|
||||
inject: 'body',
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
entry: './src/mobile/js/app.js',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist/mobile'),
|
||||
filename: 'js/[name]-[hash].js',
|
||||
publicPath: './',
|
||||
assetModuleFilename: 'img/[hash][ext][query]',
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(png|jpg|gif|jpeg|svg)$/,
|
||||
// type: 'asset/resource',
|
||||
dependency: { not: ['url'] },
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
name: '[hash].[ext][query]',
|
||||
limit: 1024 * 10,
|
||||
outputPath: 'img',
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.(woff|ttf|svg|eot|ico)$/,
|
||||
use: ['url-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: [MiniCssExtractPlugin.loader, { loader: 'css-loader' }],
|
||||
},
|
||||
{
|
||||
test: /.html$/,
|
||||
loader: 'html-loader',
|
||||
options: {
|
||||
esModule: false,
|
||||
sources: {
|
||||
list: [
|
||||
'...',
|
||||
{
|
||||
tag: 'a',
|
||||
attribute: 'data-bigimg',
|
||||
type: 'src',
|
||||
},
|
||||
{
|
||||
tag: 'a',
|
||||
attribute: 'data-imgdetail',
|
||||
type: 'src',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
// {
|
||||
// exclude: /\.(css|js|html|json|less|png|jpg|gif|woff|ttf|svg|eot)$/,
|
||||
// loader: 'file-loader',
|
||||
// },
|
||||
],
|
||||
},
|
||||
plugins: [new MiniCssExtractPlugin()].concat(htmlWebpackPlugins),
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
chunks: 'all',
|
||||
},
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
extractComments: false,
|
||||
}),
|
||||
new OptimizeCssAssetsPlugin(),
|
||||
],
|
||||
},
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user