Skip to content

Commit

Permalink
Added initial configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mczeplowski committed Jul 29, 2019
1 parent 7fe94f6 commit 58f63ec
Show file tree
Hide file tree
Showing 11 changed files with 6,723 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"presets": [
"@babel/preset-react",
["@babel/preset-env", {
"targets": {
"browsers": [">1%"]
}
}]
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-runtime",
],
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea/
node_modules/
dist/
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
6,619 changes: 6,619 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "gif-search-webapp",
"version": "1.0.0",
"description": "React webapp that using gif-search-api",
"main": "index.js",
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-transform-runtime": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"axios": "^0.19.0",
"clean-webpack-plugin": "^3.0.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"styled-components": "^4.3.2",
"webpack": "^4.38.0",
"webpack-cli": "^3.3.6",
"webpack-dev-server": "^3.7.2"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"babel-loader": "^8.0.6",
"html-webpack-plugin": "^4.0.0-beta.8"
},
"scripts": {
"dev": "webpack-dev-server --mode development",
"build": "webpack --mode production"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mczeplowski/gif-search-webapp.git"
},
"author": "Mateusz Czepłowski",
"license": "ISC"
}
7 changes: 7 additions & 0 deletions src/components/AppComponent.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

const AppComponent = () => {
return <h1>test</h1>;
};

export default AppComponent;
Empty file.
Empty file.
10 changes: 10 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<div id="app"></div>
</body>
</html>
5 changes: 5 additions & 0 deletions src/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react';
import { render } from 'react-dom';
import App from './components/AppComponent';

render(<App />, document.getElementById('app'));
25 changes: 25 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');

module.exports = {
entry: './src/index.jsx',
resolve: {
extensions: ['.js', '.jsx', '.json'],
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: ['babel-loader'],
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: './src/index.html',
}),
new CleanWebpackPlugin(),
],
};

0 comments on commit 58f63ec

Please sign in to comment.