Skip to content

Commit

Permalink
Merge branch 'feature/typescript'
Browse files Browse the repository at this point in the history
  • Loading branch information
JayBox325 committed Jan 3, 2021
2 parents cdde86d + 81ed207 commit 8efcf5a
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 14 deletions.
4 changes: 2 additions & 2 deletions _gulp/path.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const paths = {
},

js: {
app: `./${config.srcRoot}/scripts/app.js`,
watch: `${config.srcRoot}/scripts/**/*.js`,
app: `./${config.srcRoot}/scripts/app.ts`,
watch: `${config.srcRoot}/scripts/**/*.ts`,
dest: `${assets}/scripts`
},

Expand Down
9 changes: 9 additions & 0 deletions _gulp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"noImplicitAny": true,
"module": "es6",
"target": "es5",
"jsx": "react",
"allowJs": true
}
}
7 changes: 5 additions & 2 deletions _gulp/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ const config = {
app: paths.js.app,
},
output: {
path: path.resolve(__dirname, 'app'),
path: path.resolve(__dirname, 'app.ts'),
filename: 'bundle.js',
},
module: {
rules: [
{
test: /\.(js)$/,
test: /\.(tsx)$/,
exclude: /(node_modules)/,
use: [
{
Expand All @@ -35,6 +35,9 @@ const config = {
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js"]
},
plugins: [
// new BundleAnalyzerPlugin() // Enable this for a JS audit
]
Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions _src/scripts/app.js

This file was deleted.

6 changes: 6 additions & 0 deletions _src/scripts/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Loaded once on initial page load
import defaultJS from './default/_index'
import moduleJS from './modules/_index'

defaultJS()
moduleJS()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import setFocus from '../_tools/keyboard-trap.js'
import setFocus from '../_tools/keyboard-trap'

/*
Menu. Not much more to say.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8efcf5a

Please sign in to comment.