Unverified Commit 61de215e authored by Connor Davis's avatar Connor Davis Committed by GitHub

Move webpack config to TypeScript (#6348)

parent 0bf5041e
......@@ -13,6 +13,8 @@
directories: ["node_modules"]
},
before_install: [
"curl -o- -L https://yarnpkg.com/install.sh | bash",
"export PATH=\"$HOME/.yarn/bin:$PATH\"",
"export DISPLAY=:99.0",
"sh -e /etc/init.d/xvfb start",
"sleep 3"
......@@ -21,5 +23,5 @@
"rm -rf node_modules/.cache"
],
before_script: [],
after_script: ["npm run coveralls"]
after_script: ["yarn run coveralls"]
}
......@@ -26,7 +26,7 @@ class Store {
let store = null
export function initializeStore (initialData) {
export function initializeStore(initialData) {
// Always make a new store if server, otherwise state is shared between requests
if (isServer) {
return new Store(isServer, initialData)
......
......@@ -8,9 +8,9 @@
"lerna": "lerna",
"dev": "lerna run build --stream --parallel",
"testonly": "jest",
"testall": "yarn check && npm run testonly -- --coverage --forceExit --runInBand --reporters=default --reporters=jest-junit",
"pretest": "npm run lint",
"test": "npm run testall || npm run testall",
"testall": "yarn check && yarn run testonly -- --coverage --forceExit --runInBand --reporters=default --reporters=jest-junit",
"pretest": "yarn run lint",
"test": "yarn run testall || yarn run testall",
"coveralls": "cat ./test/coverage/lcov.info | coveralls",
"lint": "lerna run typescript && standard && standard --parser typescript-eslint-parser --plugin typescript packages/**/*.ts",
"lint-fix": "standard --fix && standard --fix --parser typescript-eslint-parser --plugin typescript packages/**/*.ts",
......
......@@ -42,8 +42,8 @@
"devDependencies": {
"@taskr/clear": "1.1.0",
"@taskr/watch": "1.1.0",
"@types/react": "16.7.13",
"@types/react-dom": "16.0.11",
"@types/react": "16.8.4",
"@types/react-dom": "16.8.2",
"@types/react-is": "16.5.0",
"@types/send": "0.14.4",
"taskr": "1.1.0",
......
......@@ -21,7 +21,7 @@ export function createPagesMapping(pagePaths: string[], extensions: string[]): P
return pages
}
type WebpackEntrypoints = {
export type WebpackEntrypoints = {
[bundle: string]: string|string[]
}
......
......@@ -58,7 +58,7 @@ export default async function build(dir: string, conf = null): Promise<void> {
const pagePaths = await collectPages(pagesDir, config.pageExtensions)
const pages = createPagesMapping(pagePaths, config.pageExtensions)
const entrypoints = createEntrypoints(pages, config.target, buildId, config)
const configs: any = [
const configs = [
getBaseWebpackConfig(dir, {
buildId,
isServer: false,
......
......@@ -111,6 +111,7 @@
"@types/babel__generator": "7.0.1",
"@types/babel__template": "7.0.1",
"@types/babel__traverse": "7.0.3",
"@types/case-sensitive-paths-webpack-plugin": "2.1.2",
"@types/cross-spawn": "6.0.0",
"@types/etag": "1.8.0",
"@types/fresh": "0.5.0",
......@@ -119,9 +120,9 @@
"@types/mkdirp": "0.5.2",
"@types/nanoid": "1.2.0",
"@types/node-fetch": "2.1.4",
"@types/resolve": "0.0.8",
"@types/rimraf": "2.0.2",
"@types/signal-exit": "3.0.0",
"@types/webpack": "4.4.22",
"taskr": "1.1.0",
"typescript": "3.1.6"
},
......
......@@ -25,4 +25,24 @@ declare module 'arg' {
}
export = arg;
}
\ No newline at end of file
}
declare module 'autodll-webpack-plugin' {
import webpack from 'webpack'
class AutoDllPlugin implements webpack.Plugin {
constructor(settings?: {
inject?: boolean,
plugins?: webpack.Configuration["plugins"],
context?: string,
debug?: boolean,
filename?: string,
path?: string,
inherit?: boolean,
entry?: webpack.Entry,
config?: webpack.Configuration
})
apply: webpack.Plugin["apply"]
[k: string]: any
}
export = AutoDllPlugin
}
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment