Skip to content

Commit f500883

Browse files
Alexander MatyushentsevAlexander Matyushentsev
Alexander Matyushentsev
authored and
Alexander Matyushentsev
committed
Initial commit
0 parents  commit f500883

File tree

10 files changed

+4157
-0
lines changed

10 files changed

+4157
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.jshintrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"esversion": 6
3+
}

package.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "argo-ui",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"author": "Alexander Matyushentsev <[email protected]>",
6+
"license": "MIT",
7+
"scripts": {
8+
"build": "webpack --config ./src/app/webpack.config.js",
9+
"start": "webpack-dev-server --config ./src/app/webpack.config.js"
10+
},
11+
"dependencies": {
12+
"@types/react": "^16.0.34",
13+
"@types/react-dom": "^16.0.3",
14+
"react": "^16.2.0",
15+
"react-dom": "^16.2.0"
16+
},
17+
"devDependencies": {
18+
"awesome-typescript-loader": "^3.4.1",
19+
"html-webpack-plugin": "^2.30.1",
20+
"source-map-loader": "^0.2.3",
21+
"tslint": "^5.9.1",
22+
"tslint-react": "^3.4.0",
23+
"typescript": "^2.6.2",
24+
"webpack": "^3.10.0",
25+
"webpack-dev-server": "^2.11.1"
26+
}
27+
}

src/app/components/app.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import * as React from 'react';
2+
3+
export const App = () => <h1>Hello world! </h1>;

src/app/index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>Argo UI</title>
7+
</head>
8+
9+
<body>
10+
<div id="app"></div>
11+
</body>
12+
13+
</html>

src/app/index.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import * as React from 'react';
2+
import * as ReactDOM from 'react-dom';
3+
4+
import { App } from './components/app';
5+
6+
ReactDOM.render(
7+
<App />,
8+
document.getElementById('app'),
9+
);

src/app/tsconfig.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"outDir": "./dist/",
4+
"sourceMap": true,
5+
"noImplicitAny": true,
6+
"module": "commonjs",
7+
"target": "es5",
8+
"jsx": "react"
9+
},
10+
"include": [
11+
"src/**/*"
12+
]
13+
}

src/app/webpack.config.js

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
'use strict;';
2+
3+
const HtmlWebpackPlugin = require('html-webpack-plugin');
4+
const webpack = require('webpack');
5+
6+
const config = {
7+
entry: './src/app/index.tsx',
8+
output: {
9+
filename: 'bundle.js',
10+
path: __dirname + '/../../dist/app'
11+
},
12+
13+
devtool: 'source-map',
14+
15+
resolve: {
16+
extensions: ['.ts', '.tsx', '.js', '.json']
17+
},
18+
19+
module: {
20+
rules: [
21+
{ test: /\.tsx?$/, loader: 'awesome-typescript-loader?configFileName=./src/app/tsconfig.json' },
22+
{ enforce: 'pre', test: /\.js$/, loader: 'source-map-loader' }
23+
]
24+
},
25+
plugins: [
26+
new HtmlWebpackPlugin({
27+
template: 'src/app/index.html'
28+
})
29+
]
30+
};
31+
32+
if (process.env.NODE_ENV === 'production') {
33+
config.plugins.push(
34+
new webpack.optimize.UglifyJsPlugin()
35+
);
36+
}
37+
38+
module.exports = config;

tslint.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": [
3+
"tslint:recommended", "tslint-react"
4+
],
5+
"jsRules": {},
6+
"rules": {
7+
"quotemark": [true, "single"],
8+
"no-var-requires": false
9+
},
10+
"rulesDirectory": []
11+
}

0 commit comments

Comments
 (0)