From 135b229265b8369f506351ff81901c430fa00c6d Mon Sep 17 00:00:00 2001 From: Misode Date: Sat, 23 May 2020 21:14:34 +0200 Subject: [PATCH] Initial commit --- .gitignore | 3 +++ LICENSE | 21 +++++++++++++++++++++ README.md | 1 + package.json | 21 +++++++++++++++++++++ public/index.html | 12 ++++++++++++ src/app/app.ts | 1 + tsconfig.json | 12 ++++++++++++ webpack.config.js | 15 +++++++++++++++ 8 files changed, 86 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 package.json create mode 100644 public/index.html create mode 100644 src/app/app.ts create mode 100644 tsconfig.json create mode 100644 webpack.config.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..56844664 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +/public/build +package-lock.json diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..6ae42ec2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Misode + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 00000000..7d5fe7ad --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Generators diff --git a/package.json b/package.json new file mode 100644 index 00000000..63063fbe --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "generators", + "version": "1.0.0", + "private": true, + "description": "", + "main": "index.js", + "scripts": { + "build": "webpack -p", + "start": "webpack-dev-server -d --content-base ./public" + }, + "keywords": [], + "author": "Misode", + "license": "MIT", + "dependencies": { + "ts-loader": "^7.0.4", + "typescript": "^3.9.3", + "webpack": "^4.43.0", + "webpack-cli": "^3.3.11", + "webpack-dev-server": "^3.11.0" + } +} diff --git a/public/index.html b/public/index.html new file mode 100644 index 00000000..8a1b943c --- /dev/null +++ b/public/index.html @@ -0,0 +1,12 @@ + + + + + + Document + + +
+ + + diff --git a/src/app/app.ts b/src/app/app.ts new file mode 100644 index 00000000..8a640224 --- /dev/null +++ b/src/app/app.ts @@ -0,0 +1 @@ +document!.getElementById('root')!.textContent = 'Hello world!'; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..ea849705 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "esnext", + "strict": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true + }, + "include": [ + "src" + ] +} diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 00000000..cac1473b --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,15 @@ +module.exports = { + entry: './src/app/app.ts', + output: { + path: __dirname + '/public', + filename: 'build/bundle.js' + }, + resolve: { + extensions: ['.ts', '.js'] + }, + module: { + rules: [ + { test: /\.ts$/, loader: 'ts-loader' } + ] + } +}