-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initializing the project with strip-down instance of ReCodEx webapp.
- Loading branch information
1 parent
c37900b
commit 05f92a2
Showing
235 changed files
with
27,984 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
], | ||
"plugins": [ | ||
["formatjs", { | ||
"ast": true | ||
}], | ||
"transform-object-assign", | ||
"transform-flow-strip-types", | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-transform-runtime", | ||
["prismjs", { | ||
"languages": [ | ||
"csharp", | ||
"css", | ||
"go", | ||
"groovy", | ||
"java", | ||
"javascript", | ||
"kotlin", | ||
"markdown", | ||
"pascal", | ||
"php", | ||
"python", | ||
"rust", | ||
"scala", | ||
"typescript", | ||
"bash", | ||
"cpp", | ||
"haskell", | ||
"cshtml", | ||
"arduino", | ||
"prolog", | ||
"bash", | ||
"sql", | ||
"bison" | ||
], | ||
"theme": "default", | ||
"css": true | ||
}] | ||
], | ||
"env": { | ||
"production": { | ||
"plugins": [ | ||
"@babel/plugin-transform-react-inline-elements" | ||
] | ||
} | ||
} | ||
} |
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,11 @@ | ||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
max_line_length = 0 | ||
trim_trailing_whitespace = false |
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,13 @@ | ||
NODE_ENV=production | ||
# WEBPACK_DEV_SERVER_PORT=8081 # might be usefull for dev environment, if port 8081 is necessary for something | ||
|
||
# LOGGER_MIDDLEWARE is active only if NODE_ENV=development | ||
|
||
# verbose debug action logging | ||
LOGGER_MIDDLEWARE_VERBOSE=false | ||
|
||
# log complete dump of exceptions | ||
LOGGER_MIDDLEWARE_EXCEPTIONS=true | ||
|
||
# manual specification of footer version | ||
# VERSION=1.0.0 |
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,7 @@ | ||
[ignore] | ||
|
||
[include] | ||
|
||
[libs] | ||
|
||
[options] |
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 @@ | ||
*.js text eol=lf |
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,24 @@ | ||
## Issue Description | ||
|
||
<!-- Write down your issue or question. --> | ||
|
||
## Environment | ||
|
||
<!-- Please provide your Operating System and your web browser with appropriate versions. --> | ||
|
||
## Steps to Reproduce | ||
|
||
1. | ||
2. | ||
|
||
## Expected Behaviour | ||
|
||
<!-- What was the expected behaviour. --> | ||
|
||
## Actual Results | ||
|
||
<!-- | ||
What did actually happen. | ||
Please give us examples and ideally support it with screenshots or error messages from our notification system or from browser console. | ||
Browser console can be usually displayed by hitting F12, if not please follow your browser instructions. | ||
--> |
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,34 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
node-version: ['20'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install -g yarn | ||
- run: corepack enable | ||
- run: yarn install | ||
- run: yarn test | ||
|
||
lint: | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
node-version: ['20'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install -g yarn | ||
- run: corepack enable | ||
- run: yarn install | ||
- run: yarn lint |
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,25 @@ | ||
node_modules | ||
node_modules/.bin/* | ||
.DS_Store | ||
public/bundle.js | ||
public/bundle.js.map | ||
public/ | ||
bin/*.jpg | ||
bin/*.css | ||
bin/server.mjs | ||
bin/server.mjs.map | ||
tmp | ||
build | ||
npm-debug.log | ||
.env | ||
.vscode | ||
prod/ | ||
package-lock.json | ||
|
||
/run_server.bat | ||
/run_manage_translations.bat | ||
/etc/env.json | ||
/bin/server.mjs.LICENSE.txt | ||
/yarn-error.log | ||
/.yarn/cache | ||
/.yarn/install-state.gz |
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 @@ | ||
{ | ||
"parser": "babel", | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"jsxSingleQuote": false, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": true, | ||
"arrowParens": "avoid", | ||
"requirePragma": false, | ||
"insertPragma": false, | ||
"proseWrap": "preserve", | ||
"endOfLine": "auto" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,7 @@ | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs | ||
spec: "@yarnpkg/plugin-interactive-tools" | ||
|
||
yarnPath: .yarn/releases/yarn-3.2.2.cjs |
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,77 @@ | ||
import Express from 'express'; | ||
import webpack from 'webpack'; | ||
import WebpackDevServer from 'webpack-dev-server'; | ||
import path from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
import config from '../config/webpack.config-dev.js'; | ||
import colors from 'colors'; | ||
import fs from 'fs'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file | ||
const __dirname = path.dirname(__filename); // get the name of the directory | ||
|
||
const WEBPACK_DEV_SERVER_PORT = process.env.WEBPACK_DEV_SERVER_PORT || 8081; | ||
const fileConfig = fs.readFileSync('etc/env.json', 'utf8'); | ||
const parsedConfig = JSON.parse(fileConfig); | ||
const PORT = parsedConfig.PORT; | ||
const SKIN = parsedConfig.SKIN; | ||
const urlPrefix = parsedConfig.URL_PATH_PREFIX || ''; | ||
|
||
const app = new Express(); | ||
app.set('view engine', 'ejs'); | ||
app.use(urlPrefix, Express.static(path.join(__dirname, '../public'))); | ||
|
||
app.get('*', (req, res) => { | ||
res.render('index', { | ||
html: '', | ||
head: { | ||
htmlAttributes: 'lang="cs"', | ||
title: '<title>ReCodEx</title>', | ||
meta: '', | ||
link: '', | ||
}, | ||
reduxState: undefined, | ||
skin: SKIN, | ||
style: `http://localhost:${WEBPACK_DEV_SERVER_PORT}/style.css`, | ||
bundle: `http://localhost:${WEBPACK_DEV_SERVER_PORT}/bundle.js`, | ||
config: fileConfig, | ||
urlPrefix, | ||
}); | ||
}); | ||
|
||
const server = new WebpackDevServer( | ||
{ | ||
static: { | ||
directory: path.join(__dirname, '..', 'public'), | ||
}, | ||
hot: true, | ||
host: 'localhost', | ||
port: WEBPACK_DEV_SERVER_PORT, | ||
devMiddleware: { | ||
stats: { colors: true }, | ||
publicPath: '/', | ||
}, | ||
}, | ||
webpack(config) | ||
); | ||
|
||
(async () => { | ||
await server.start(); | ||
console.log( | ||
`${colors.yellow('WebpackDevServer')} is running on ${colors.underline( | ||
`http://localhost:${WEBPACK_DEV_SERVER_PORT}` | ||
)}` | ||
); | ||
})(); | ||
/* | ||
server.listen(WEBPACK_DEV_SERVER_PORT, 'localhost', () => { | ||
console.log( | ||
`${colors.yellow('WebpackDevServer')} is running on ${colors.underline( | ||
`http://localhost:${WEBPACK_DEV_SERVER_PORT}` | ||
)}` | ||
); | ||
}); | ||
*/ | ||
app.listen(PORT, () => { | ||
console.log(`${colors.green('WebApp')} is running on ${colors.underline(`http://localhost:${PORT}`)}`); | ||
}); |
Oops, something went wrong.