Skip to content

Commit

Permalink
Set up conf to not use typescript
Browse files Browse the repository at this point in the history
Darren-Ivey committed Sep 17, 2018
1 parent df30310 commit 6bea451
Showing 9 changed files with 3,761 additions and 3,000 deletions.
Binary file added .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["env", "react"]
}
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import "./week12/index.tsx";
import "./week17/index";
6,726 changes: 3,731 additions & 2,995 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
"license": "MIT",
"scripts": {
"test": "jest --watchAll",
"serve": "webpack-serve",
"serve": "webpack-serve --hot",
"node": "node --experimental-modules --loader ./lib/loader.mjs node.js",
"webpack:prod": "webpack-cli --mode production",
"delete-everything-and-reset-yes-really": "git reset --hard && git clean -dfe coverage dist && npm install"
@@ -54,6 +54,10 @@
"webpack-dev-server": "^3.1.5"
},
"dependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"isomorphic-unfetch": "^2.0.0",
"react": "^16.3.1",
"react-dom": "^16.3.1",
2 changes: 1 addition & 1 deletion webpack-entry.js
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@
* This file is to allow us to import polyfill node modules, which won't work untranspiled.
* This lets webpack load those modules, and then load index.js as usual.
*/
import "./index";
import "./index.js";
6 changes: 4 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -6,9 +6,11 @@ module.exports = {
module: {
rules: [
{
test: /\.tsx?$/,
test: /\.js?$/,
exclude: /node_modules/,
use: "ts-loader",
use: {
loader: "babel-loader"
}
},
],
},
11 changes: 11 additions & 0 deletions week17/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React, { Component } from "react";

export class App extends Component {
render() {
return (
<div className="typewriter">
This
</div>
);
}
}
5 changes: 5 additions & 0 deletions week17/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
import { App } from "./App";

ReactDOM.render(<App />, document.getElementById("app"));

0 comments on commit 6bea451

Please sign in to comment.