init 2
This commit is contained in:
parent
3df557b8f3
commit
81303cc3b2
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
4824
package-lock.json
generated
4824
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
21
package.json
21
package.json
@ -4,11 +4,28 @@
|
||||
"description": "",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "webpack",
|
||||
"dev": "webpack serve"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"alpine": "^0.2.1",
|
||||
"buffer": "^6.0.3",
|
||||
"cheerio": "^1.0.0",
|
||||
"lodash": "^4.17.21"
|
||||
"lodash": "^4.17.21",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"timers-browserify": "^2.0.12",
|
||||
"util": "^0.12.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"csp-html-webpack-plugin": "^5.1.0",
|
||||
"css-loader": "^7.1.2",
|
||||
"sass": "^1.85.1",
|
||||
"sass-loader": "^16.0.5",
|
||||
"style-loader": "^4.0.0",
|
||||
"webpack": "^5.98.0",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"webpack-dev-server": "^5.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -20,8 +20,8 @@
|
||||
|
||||
<link rel="icon" type="image/png" href="images/favicon.png">
|
||||
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
<script type="module" src="main.js"></script>
|
||||
<!--<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>-->
|
||||
<script src="steam.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
||||
2
public/steam.js
Normal file
2
public/steam.js
Normal file
File diff suppressed because one or more lines are too long
10
public/steam.js.LICENSE.txt
Normal file
10
public/steam.js.LICENSE.txt
Normal file
@ -0,0 +1,10 @@
|
||||
/*!
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <https://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
|
||||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
@ -1,18 +1,21 @@
|
||||
import { camelCasse } from 'lodash'
|
||||
import './style.scss'
|
||||
|
||||
import Alpine from "alpine";
|
||||
|
||||
|
||||
|
||||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.data('workshopList', () => ({
|
||||
ids: '3428008364',
|
||||
getModDescription() {
|
||||
console.log("Load IDs", this.ids);
|
||||
console.log(camelCasse("Load IDs"));
|
||||
|
||||
let steamUrl = "https://steamcommunity.com/sharedfiles/filedetails/?id=";
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
if (this.readyState === 4 && this.status === 200) {
|
||||
//document.getElementById("demo").innerHTML = this.responseText;
|
||||
const $ = cheerio.load(this.responseText);
|
||||
//const $ = cheerio.load(this.responseText);
|
||||
|
||||
//console.log($('title'));
|
||||
console.log(this.responseText);
|
||||
10
src/style.scss
Normal file
10
src/style.scss
Normal file
@ -0,0 +1,10 @@
|
||||
$text: orange;
|
||||
$bg: grey;
|
||||
|
||||
body {
|
||||
color: $text;
|
||||
}
|
||||
|
||||
#workshopIdList {
|
||||
background-color: $bg;
|
||||
}
|
||||
45
webpack.config.js
Normal file
45
webpack.config.js
Normal file
@ -0,0 +1,45 @@
|
||||
const CspHtmlWebpackPlugin = require("csp-html-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
entry: './src/index.js',
|
||||
output: {
|
||||
filename: 'steam.js',
|
||||
path: __dirname + '/public'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use:[
|
||||
'style-loader',
|
||||
'css-loader',
|
||||
'sass-loader'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new CspHtmlWebpackPlugin({
|
||||
'default-src': "'self' 'unsafe-eval' 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; connect-src 'self' ws://localhost:8080",
|
||||
'style-src': "'self' 'unsafe-eval' 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; connect-src 'self' ws://localhost:8080"
|
||||
})
|
||||
],
|
||||
devServer: {
|
||||
port: 9000,
|
||||
hot: true,
|
||||
historyApiFallback: true,
|
||||
static: {
|
||||
directory: __dirname + '/public',
|
||||
publicPath: '/'
|
||||
},
|
||||
|
||||
},
|
||||
resolve: {
|
||||
fallback: {
|
||||
"timers": require.resolve("timers-browserify"),
|
||||
"buffer": require.resolve("buffer/"),
|
||||
"stream": require.resolve("stream-browserify"),
|
||||
"util": require.resolve("util/")
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user