forked from ahrakio/witty-webpack-declaration-files
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
3,433 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 |
---|---|---|
|
@@ -2,6 +2,7 @@ webpack.config.js | |
/.vscode | ||
/.gitignore | ||
/node_modules | ||
/example | ||
.github/ | ||
.idea/ | ||
*.iml | ||
|
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 @@ | ||
# vanilla ts-loader | ||
|
||
```shell | ||
yarn install | ||
|
||
# Run in watch mode | ||
yarn watch | ||
|
||
# Run in production mode | ||
yarn build | ||
``` | ||
|
||
To see your output simply open up the `index.html` file in your browser of choice. |
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 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
</head> | ||
<body> | ||
<div id="wrapper"></div> | ||
|
||
<script src="dist/main.js"></script> | ||
</body> | ||
</html> |
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,16 @@ | ||
{ | ||
"name": "vanilla", | ||
"main": "index.js", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"build": "webpack --mode production", | ||
"start": "webpack-dev-server --mode development --progress --color" | ||
}, | ||
"devDependencies": { | ||
"ts-loader": "^5.0.0", | ||
"typescript": "^3.0.0", | ||
"webpack": "^4.0.0", | ||
"webpack-cli": "^3.0.0", | ||
"webpack-dev-server": "^3.1.14" | ||
} | ||
} |
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,3 @@ | ||
import render = require('./render'); | ||
|
||
render(); |
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,5 @@ | ||
function render() { | ||
document.getElementById('wrapper').innerHTML = "<h1> Hello World!</h1>"; | ||
} | ||
|
||
export = render; |
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,5 @@ | ||
{ | ||
"compilerOptions": { | ||
"sourceMap": true | ||
} | ||
} |
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,22 @@ | ||
'use strict'; | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
devtool: 'inline-source-map', | ||
entry: './src/index.ts', | ||
output: { | ||
filename: 'main.js', | ||
path: path.resolve(__dirname, 'dist') | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
loader: 'ts-loader' | ||
} | ||
] | ||
}, | ||
resolve: { | ||
extensions: [ '.ts', '.tsx', '.js' ] | ||
} | ||
}; |
Oops, something went wrong.