-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created examples, updated read me, fixed configuration bug
- Loading branch information
Andrew Dabrowski
authored and
Andrew Dabrowski
committed
Oct 16, 2017
1 parent
519e49a
commit b679300
Showing
13 changed files
with
153 additions
and
31 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 |
---|---|---|
|
@@ -15,4 +15,7 @@ coverage | |
|
||
# Tests | ||
jest.config.json | ||
tests | ||
tests | ||
|
||
# TypeScript | ||
tsconfig.json |
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 |
---|---|---|
@@ -1,2 +1,17 @@ | ||
# webpack-ts-build | ||
Webpack Build | ||
|
||
[![Build Status](https://travis-ci.org/afdabro/webpack-ts-build.svg?branch=master)](https://travis-ci.org/afdabro/webpack-ts-build) | ||
|
||
[![Coverage Status](https://coveralls.io/repos/github/afdabro/webpack-ts-build/badge.svg?branch=master)](https://coveralls.io/github/afdabro/webpack-ts-build?branch=master) | ||
|
||
## Purpose | ||
Simplify the configuration and building of Typescript, Webpack, React, etc. etc. | ||
|
||
## FAQ | ||
|
||
### Where can I find a simple example of how to use the build package? | ||
The [Examples](https://github.com/afdabro/webpack-ts-build/tree/master/examples) page covers how to configure a default webpack, setup a build, and use the development server. | ||
|
||
### Why is the code coverage so low? | ||
Well, a majority of the code is configuration-driven which does not lend itself well to unit tests. |
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 @@ | ||
'use strict'; | ||
const config = require('./webpack.example'); | ||
const buildProd = require('../index').buildProd; | ||
|
||
buildProd(config); |
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 @@ | ||
'use strict'; | ||
const config = require('./webpack.example'); | ||
const devServer = require('../index').devServer; | ||
|
||
devServer(config, './bin'); |
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,6 @@ | ||
import * as React from "react"; | ||
import * as ReactDOM from "react-dom"; | ||
|
||
ReactDOM.render( | ||
<div>Hello React</div>, | ||
document.getElementById("root")); |
Binary file not shown.
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,10 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
</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,26 @@ | ||
'use strict'; | ||
const defaultWebpack = require('../index').defaultWebpack; | ||
|
||
/* | ||
Paths | ||
*/ | ||
const path = require('path'); | ||
const buildPath = path.join(__dirname, './bin'); | ||
const sourcePath = path.join(__dirname, './src'); | ||
const domainHost = ''; | ||
|
||
module.exports = (isDev) => { | ||
const appPlugins = []; | ||
|
||
const options = { | ||
'isDev': isDev, | ||
'faviconPath': 'assets/favicon.ico', | ||
'domainHost': domainHost, | ||
'sourcePath': sourcePath, | ||
'appLoader': './appLoader', | ||
'buildPath': buildPath, | ||
'appPlugins': appPlugins, | ||
}; | ||
|
||
return defaultWebpack(options); | ||
}; |
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
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
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
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,26 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": "source", | ||
"alwaysStrict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"outDir": "./bin/", | ||
"sourceMap": true, | ||
"allowSyntheticDefaultImports": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"noImplicitAny": false, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noUnusedParameters": true, | ||
"noUnusedLocals": true, | ||
"module": "commonjs", | ||
"target": "es5", | ||
"lib": ["es6", "dom"], | ||
"jsx": "react", | ||
"allowJs": true | ||
}, | ||
"exclude": [ | ||
"node_modules", | ||
"bin" | ||
] | ||
} |
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