boilerplate no modules
This commit is contained in:
parent
2090c08cb5
commit
70b6ff02a1
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/env", {
|
||||
useBuiltIns: "usage",
|
||||
corejs: 3,
|
||||
}
|
||||
],
|
||||
"@babel/typescript",
|
||||
"@babel/react",
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/proposal-class-properties",
|
||||
"@babel/proposal-object-rest-spread",
|
||||
]
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
module.exports = {
|
||||
'env': {
|
||||
'browser': true,
|
||||
'es2021': true,
|
||||
'node': true,
|
||||
},
|
||||
'extends': [
|
||||
'plugin:react/recommended',
|
||||
'google',
|
||||
],
|
||||
'parser': '@typescript-eslint/parser',
|
||||
'parserOptions': {
|
||||
'ecmaFeatures': {
|
||||
'jsx': true,
|
||||
},
|
||||
'ecmaVersion': 12,
|
||||
'sourceType': 'module',
|
||||
},
|
||||
'plugins': [
|
||||
'react',
|
||||
'@typescript-eslint',
|
||||
],
|
||||
'settings': {
|
||||
'react': {
|
||||
'version': 'detect',
|
||||
},
|
||||
},
|
||||
'rules': {
|
||||
'indent': ['error', "tab"],
|
||||
'no-tabs': ['error', {'allowIndentationTabs': true}],
|
||||
'max-len': ['error', {'tabWidth': 4}],
|
||||
},
|
||||
};
|
||||
|
|
@ -1,4 +1,14 @@
|
|||
# ---> Node
|
||||
# vim
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# build and dev deprecated
|
||||
build
|
||||
dev
|
||||
# new build dir
|
||||
dist
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
@ -85,7 +95,7 @@ dist
|
|||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# Comment in the public line in if your project uses Gatsby and *not* Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
|
@ -103,7 +113,3 @@ dist
|
|||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"declarationDir": "../dist/types"
|
||||
},
|
||||
"include": [
|
||||
"../src/client/**/*"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"declarationDir": "../dist/types"
|
||||
},
|
||||
"include": [
|
||||
"../src/server/**/*"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
const path = require('path');
|
||||
const nodeExternals = require('webpack-node-externals');
|
||||
const EsLint = require('eslint-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: path.resolve(__dirname, '../src/client/main.tsx'),
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, '../dist/client'),
|
||||
},
|
||||
target: 'web',
|
||||
resolve: {
|
||||
extensions: ['.ts', '.tsx', '.js', '.json']
|
||||
},
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.tsx?$/,
|
||||
loader: 'babel-loader',
|
||||
include: path.join(__dirname, '../src/client'),
|
||||
}],
|
||||
},
|
||||
plugins: [
|
||||
new EsLint({
|
||||
extensions: ['.ts', '.tsx'],
|
||||
context: path.join(__dirname, '../src/client'),
|
||||
}),
|
||||
],
|
||||
};
|
|
@ -0,0 +1,9 @@
|
|||
const path = require('path');
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.client.common.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
devtool: 'eval-cheap-module-source-map',
|
||||
mode: 'development',
|
||||
watch: true
|
||||
});
|
|
@ -0,0 +1,14 @@
|
|||
const path = require('path');
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.client.common.js');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [new TerserPlugin({
|
||||
parallel: true
|
||||
})]
|
||||
}
|
||||
});
|
|
@ -0,0 +1,29 @@
|
|||
const path = require('path');
|
||||
const nodeExternals = require('webpack-node-externals');
|
||||
const EsLint = require('eslint-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: path.resolve(__dirname, '../src/server/main.ts'),
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, '../dist/server'),
|
||||
},
|
||||
target: 'node',
|
||||
externals: [nodeExternals()],
|
||||
resolve: {
|
||||
extensions: ['.ts', '.tsx', '.js', '.json']
|
||||
},
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.tsx?$/,
|
||||
loader: 'babel-loader',
|
||||
include: path.join(__dirname, '../src/server'),
|
||||
}],
|
||||
},
|
||||
plugins: [
|
||||
new EsLint({
|
||||
extensions: ['.ts', '.tsx'],
|
||||
context: path.join(__dirname, '../src/server'),
|
||||
}),
|
||||
],
|
||||
};
|
|
@ -0,0 +1,9 @@
|
|||
const path = require('path');
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.server.common.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
devtool: 'eval-cheap-module-source-map',
|
||||
mode: 'development',
|
||||
watch: true
|
||||
});
|
|
@ -0,0 +1,14 @@
|
|||
const path = require('path');
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.server.common.js');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [new TerserPlugin({
|
||||
parallel: true
|
||||
})]
|
||||
}
|
||||
});
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "weblgl",
|
||||
"version": "1.0.0",
|
||||
"description": "A simple WebGL app to demonstrate my skills",
|
||||
"scripts": {
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.gaetanbrochard.dev/gbrochar/weblgl.git"
|
||||
},
|
||||
"author": "gbrochar",
|
||||
"license": "AGPL-3.0-only"
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"esModuleInterop": true,
|
||||
"noUnusedLocals": true,
|
||||
"noImplicitAny": true,
|
||||
"declaration": true,
|
||||
"jsx" : "preserve",
|
||||
"module": "commonjs",
|
||||
"strict": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"config",
|
||||
"views",
|
||||
"dist"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue