diff --git a/examples/plugin/.gitignore b/examples/plugin/.gitignore new file mode 100644 index 000000000..1521c8b76 --- /dev/null +++ b/examples/plugin/.gitignore @@ -0,0 +1 @@ +dist diff --git a/examples/plugin/docker-compose.yml b/examples/plugin/docker-compose.yml new file mode 100644 index 000000000..8dd846acb --- /dev/null +++ b/examples/plugin/docker-compose.yml @@ -0,0 +1,31 @@ +version: '3' +services: + wordpress: + cap_add: + - SYS_ADMIN + devices: + - /dev/fuse + image: visiblevc/wordpress:latest + ports: + - 8080:80 + - 443:443 + volumes: + - ./:/app/wp-content/plugins/wpackio-plugin # Plugin development + environment: + DB_HOST: db # must match db service name below + DB_NAME: wordpress + DB_PASS: root # must match below + PLUGINS: >- + academic-bloggers-toolkit, + co-authors-plus, + [WP-API]https://github.com/WP-API/WP-API/archive/master.zip, + URL_REPLACE: localhost:8080 + WP_DEBUG: 'true' + db: + image: mysql:5.7 # or mariadb:10 + volumes: + - data:/var/lib/mysql + environment: + MYSQL_ROOT_PASSWORD: root +volumes: + data: {} diff --git a/examples/plugin/inc/Enqueue.php b/examples/plugin/inc/Enqueue.php new file mode 100644 index 000000000..96759e4e7 --- /dev/null +++ b/examples/plugin/inc/Enqueue.php @@ -0,0 +1,176 @@ +outputPath = $outputPath; + $this->version = $version; + if ( ! in_array( $type, [ 'plugin', 'theme' ] ) ) { + throw new \LogicException( 'You can only enter "plugin" or "theme" as type.' ); + } + $this->type = $type; + $this->pluginPath = $pluginPath; + + // Set the root path and URL + $filepath = \trailingslashit( \get_template_directory() ) . $this->outputPath . '/'; + $url = \trailingslashit( \get_template_directory_uri() ) . $this->outputPath . '/'; + if ( 'plugin' === $this->type ) { + $filepath = \trailingslashit( dirname( $this->pluginPath ) ) . $this->outputPath . '/'; + $url = \trailingslashit( \plugins_url( $this->outputPath, $this->pluginPath) ); + } + $this->rootPath = $filepath; + $this->rootUrl = $url; + } + + /** + * Enqueue all the assets for an entrypoint inside a source. + * + * @param string $dir The name of the source directory. + * @param string $entryPoint Which entrypoint would you like to enqueue. + * @param array $config Additional configuration. + * @return void + */ + public function enqueue( $dir, $entryPoint, $config ) { + $config = wp_parse_args( $config, [ + 'js' => true, + 'css' => true, + 'js_dep' => [], + 'css_dep' => [], + 'identifier' => false, + 'in_footer' => true, + 'media' => 'all', + ] ); + // Get the manifest + $manifest = $this->getManifest( $dir ); + // Get the entrypoint + if ( ! isset( $manifest['wpackioEp'][ $entryPoint ] ) ) { + throw new \LogicException( 'No entry point found in the manifest' ); + } + $enqueue = $manifest['wpackioEp'][ $entryPoint ]; + + // Set the identifier + $identifier = $config['identifier']; + if ( false === $identifier ) { + $identifier = 'wpackIo' . ucfirst( $dir ) . ucfirst( $entryPoint ); + } + + // Enqueue all js + $js_handles = []; + if ( $config['js'] && isset( $enqueue['js'] ) && count( (array) $enqueue['js'] ) ) { + foreach ( $enqueue['js'] as $index => $js ) { + $handle = $identifier . '_' . $index; + wp_enqueue_script( $handle, $this->getUrl( $js ), $config['js_dep'], $this->version, $config['in_footer']); + wp_localize_script( $handle, $identifier, [ + 'publicPath' => $this->getUrl( $dir . '/' ), + ] ); + $js_handles[] = $handle; + } + } + + // Enqueue all CSS + $css_handles = []; + if ( $config['css'] && isset( $enqueue['css'] ) && count( (array) $enqueue['css'] ) ) { + foreach ( $enqueue['css'] as $index => $css ) { + $handle = $identifier . '_' . $index . '_css'; + wp_enqueue_style( $handle, $this->getUrl( $css ), $config['css_dep'], $this->version, $config['media'] ); + $css_handles[] = $handle; + } + } + } + + /** + * Get Url of an asset. + * + * @param string $asset Asset as recovered from manifest.json + * @return string Complete URL. + */ + protected function getUrl( $asset ) { + return $this->rootUrl . $asset; + } + + /** + * Get manifest from cache or from file. + * + * @param string $dir The Source directory. + * @return array wpackio compatible manifest item. + */ + protected function getManifest( $dir ) { + // If already present in the cache, then return it + if ( isset( self::$manifestCache[ $this->outputPath ][ $dir ] ) ) { + return self::$manifestCache[ $this->outputPath ][ $dir ]; + } + // It is not, so get the json file + $filepath = $this->rootPath . $dir . '/manifest.json'; + + // Check if it exists + if ( ! file_exists( $filepath ) ) { + throw new \LogicException( sprintf( 'Manifest %s does not exist.', $filepath ) ); + } + $manifest = json_decode( file_get_contents( $filepath ), true ); + if ( $manifest === null || ! isset( $manifest['wpackioEp'] ) ) { + throw new \LogicException( sprintf( 'Invalid manifest file at %s. Either it is not valid JSON or wpackioEp does not exist.', $filepath ) ); + } + if ( ! isset( self::$manifestCache[ $this->outputPath ] ) ) { + self::$manifestCache[ $this->outputPath ] = []; + } + self::$manifestCache[ $this->outputPath ][ $dir ] = $manifest; + return self::$manifestCache[ $this->outputPath ][ $dir ]; + } +} diff --git a/examples/plugin/package.json b/examples/plugin/package.json index a0ce15267..8cae7bb67 100644 --- a/examples/plugin/package.json +++ b/examples/plugin/package.json @@ -7,7 +7,9 @@ "license": "MIT", "private": true, "devDependencies": { - "@wpackio/scripts": "0.0.1" + "@wpackio/scripts": "0.0.1", + "autoprefixer": "^9.1.5", + "node-sass": "^4.9.3" }, "scripts": { "exstart": "wpackio-scripts start", diff --git a/examples/plugin/postcss.config.js b/examples/plugin/postcss.config.js new file mode 100644 index 000000000..ace898cc0 --- /dev/null +++ b/examples/plugin/postcss.config.js @@ -0,0 +1,7 @@ +module.exports = { + plugins: { + autoprefixer: { + browsers: '> 0.25%, not dead', + }, + }, +}; diff --git a/examples/plugin/src/app/image.png b/examples/plugin/src/app/image.png new file mode 100755 index 000000000..140c0b9c5 Binary files /dev/null and b/examples/plugin/src/app/image.png differ diff --git a/examples/plugin/src/app/index.css b/examples/plugin/src/app/index.css new file mode 100644 index 000000000..141dc3ffc --- /dev/null +++ b/examples/plugin/src/app/index.css @@ -0,0 +1,7 @@ +body { + background-color: black !important; +} + +.site-title a { + color: cyan !important; +} diff --git a/examples/plugin/src/app/index.js b/examples/plugin/src/app/index.js new file mode 100644 index 000000000..c3a01d42f --- /dev/null +++ b/examples/plugin/src/app/index.js @@ -0,0 +1,24 @@ +import './publicPathIndex'; +import './index.css'; +import imgURL from './image.png'; +import logger from './modules/logger'; + +console.log(typeof process.env.NODE_ENV); +console.log(typeof process.env.BABEL_ENV); +console.log(process.env.BABEL_ENV); +console.log('Hello World', imgURL); +console.log('Hello World', imgURL); +console.log('Hello World', imgURL); + +console.log('I am through stuff'); +console.log('I am too'); + +logger(); + +if (module.hot) { + module.hot.accept('./modules/logger.js', () => { + /* eslint-disable global-require */ + const newLogger = require('./modules/logger').default; + newLogger(); + }); +} diff --git a/examples/plugin/src/app/mobile.js b/examples/plugin/src/app/mobile.js new file mode 100644 index 000000000..13b996e02 --- /dev/null +++ b/examples/plugin/src/app/mobile.js @@ -0,0 +1 @@ +console.log('Hello Mobile'); diff --git a/examples/plugin/src/app/modules/logger.js b/examples/plugin/src/app/modules/logger.js new file mode 100644 index 000000000..bcb968e5a --- /dev/null +++ b/examples/plugin/src/app/modules/logger.js @@ -0,0 +1,6 @@ +export default function logger() { + console.log('Huh'); + console.log('Huh'); + console.log('Huh'); + console.log('Hot Reloaded'); +} diff --git a/examples/plugin/src/app/publicPathIndex.js b/examples/plugin/src/app/publicPathIndex.js new file mode 100644 index 000000000..03ec7b9f9 --- /dev/null +++ b/examples/plugin/src/app/publicPathIndex.js @@ -0,0 +1,7 @@ +/* eslint-disable camelcase, no-underscore-dangle, no-undef */ +if (process.env.NODE_ENV === 'production') { + // We set dynamic publicPath only for production + // In development, it is always handled by the internals + // As in the webpack config. + __webpack_public_path__ = window.wpackIoAppMain.publicPath; +} diff --git a/examples/plugin/wpackio-plugin.php b/examples/plugin/wpackio-plugin.php new file mode 100644 index 000000000..60e593d5d --- /dev/null +++ b/examples/plugin/wpackio-plugin.php @@ -0,0 +1,29 @@ +enqueue( 'app', 'main', [] ); +} diff --git a/examples/plugin/wpackio.project.js b/examples/plugin/wpackio.project.js new file mode 100644 index 000000000..f650cabbd --- /dev/null +++ b/examples/plugin/wpackio.project.js @@ -0,0 +1,54 @@ +module.exports = { + // Project Identity + type: 'plugin', // Plugin or theme + slug: 'wpackio-plugin', // Plugin or Theme slug, basically the directory name under `wp-content/` + // Used to generate banners on top of compiled stuff + bannerConfig: { + name: 'WordPress WebPack Bundler', + author: 'Swashata Ghosh', + license: 'GPL-3.0', + link: 'https://wpack.io', + version: '1.0.0', + copyrightText: + 'This software is released under the GPL-3.0 License\nhttps://opensource.org/licenses/GPL-3.0', + credit: true, + }, + // Files we need to compile, and where to put + files: [ + // If this has length === 1, then single compiler + { + name: 'app', + entry: { + main: ['./src/app/index.js'], + mobile: ['./src/app/mobile.js'], + }, + filename: '[name].js', + // Extra webpack config to be passed directly + webpackConfig: undefined, + }, + // If has more length, then multi-compiler + ], + // Output path relative to the context directory + // We need relative path here, else, we can not map to publicPath + outputPath: 'dist', + // Project specific config + // Needs react? + hasReact: true, + // Needs sass? + hasSass: true, + // Externals + externals: { + jquery: 'jQuery', + }, + // Webpack Aliases + alias: undefined, + // Show overlay on development + errorOverlay: true, + // Auto optimization by webpack + // Split all common chunks with default config + // + // Won't hurt because we use PHP to automate loading + optimizeSplitChunks: true, + // Usually PHP and other files to watch and reload when changed + watch: 'inc/**/*.php', +}; diff --git a/examples/plugin/wpackio.server.js b/examples/plugin/wpackio.server.js new file mode 100644 index 000000000..ff0755730 --- /dev/null +++ b/examples/plugin/wpackio.server.js @@ -0,0 +1,33 @@ +module.exports = { + // Your LAN IP or host where you would want the live server + // Override this if you know your correct external IP (LAN) + // Otherwise, the system will always use localhost and will not + // work for external IP. + // This will also create some issues with file watching because for + // some reason, service-worker doesn't work on localhost? + // https://github.com/BrowserSync/browser-sync/issues/1295 + // So it is recommended to change this to your LAN IP. + // If you intend to access it from your LAN (probably do?) + host: '192.168.1.144', + // Your WordPress development server address + proxy: 'http://localhost:8080', + // PORT on your localhost where you would want live server to hook + port: 3000, + // UI passed directly to browsersync + ui: { + port: 3001, + weinre: { + port: 8888, + }, + }, + // Whether to show the "BrowserSync Connected" + notify: false, + // Open the local URL, set to false to disable + open: 'external', + // BrowserSync ghostMode, set to false to completely disable + ghostMode: { + clicks: true, + scroll: true, + forms: true, + }, +}; diff --git a/packages/scripts/__tests__/config/WebpackConfigHelper.spec.ts b/packages/scripts/__tests__/config/WebpackConfigHelper.spec.ts index 5ef343025..9bc1ca6dd 100644 --- a/packages/scripts/__tests__/config/WebpackConfigHelper.spec.ts +++ b/packages/scripts/__tests__/config/WebpackConfigHelper.spec.ts @@ -124,7 +124,7 @@ describe('CreateWebPackConfig', () => { true ); const devOutput = devCwc.getOutput(); - expect(devOutput.publicPath).toMatch(/^\/\/(.*)\/config1$/); + expect(devOutput.publicPath).toMatch(/^\/\/(.*)\/config1\/$/); }); test('respects type for constructing publicPath on dev server', () => { const devCwc = new WebpackConfigHelper( @@ -135,7 +135,7 @@ describe('CreateWebPackConfig', () => { ); const devOutput = devCwc.getOutput(); expect(devOutput.publicPath).toMatch( - /^\/\/(.*)\/wp-content\/plugins\/(.*)\/config1$/ + /^\/\/(.*)\/wp-content\/plugins\/(.*)\/config1\/$/ ); }); }); diff --git a/packages/scripts/__tests__/config/__snapshots__/WebpackConfigHelper.spec.ts.snap b/packages/scripts/__tests__/config/__snapshots__/WebpackConfigHelper.spec.ts.snap index c89978305..d4c0de09b 100644 --- a/packages/scripts/__tests__/config/__snapshots__/WebpackConfigHelper.spec.ts.snap +++ b/packages/scripts/__tests__/config/__snapshots__/WebpackConfigHelper.spec.ts.snap @@ -5,6 +5,7 @@ Object { "context": "/foo/bar", "devtool": "source-map", "mode": "production", + "name": "config1", "target": "web", "watch": false, } @@ -15,6 +16,7 @@ Object { "context": "/foo/bar", "devtool": "inline-source-map", "mode": "development", + "name": "config1", "target": "web", "watch": true, } @@ -116,8 +118,8 @@ exports[`CreateWebPackConfig getPlugins has proper plugins for build mode 1`] = Array [ DefinePlugin { "definitions": Object { - "process.env.BABEL_ENV": "production", - "process.env.NODE_ENV": "production", + "process.env.BABEL_ENV": "\\"production\\"", + "process.env.NODE_ENV": "\\"production\\"", }, }, CleanWebpackPlugin { @@ -137,6 +139,7 @@ Array [ "filename": "[name].css", }, }, + Object {}, BannerPlugin { "banner": [Function], "options": Object { @@ -168,8 +171,8 @@ exports[`CreateWebPackConfig getPlugins has proper plugins for dev mode 1`] = ` Array [ DefinePlugin { "definitions": Object { - "process.env.BABEL_ENV": "development", - "process.env.NODE_ENV": "development", + "process.env.BABEL_ENV": "\\"development\\"", + "process.env.NODE_ENV": "\\"development\\"", }, }, CleanWebpackPlugin { @@ -189,6 +192,7 @@ Array [ "filename": "[name].css", }, }, + Object {}, HotModuleReplacementPlugin { "fullBuildTimeout": 200, "multiStep": undefined, diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 69690662e..3ec710d78 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -26,6 +26,7 @@ "@types/node": "^10.11.3", "@types/signale": "^1.2.0", "@types/webpack": "^4.4.13", + "@types/webpack-assets-manifest": "^3.0.0", "@types/webpack-dev-middleware": "^2.0.2", "@types/webpack-hot-middleware": "^2.16.4", "@wpackio/babel-preset-base": "0.0.1", @@ -35,6 +36,7 @@ "clean-webpack-plugin": "^0.1.19", "commander": "^2.18.0", "css-loader": "^1.0.0", + "file-loader": "^2.0.0", "mini-css-extract-plugin": "^0.4.3", "optimize-css-assets-webpack-plugin": "^5.0.1", "postcss-loader": "^3.0.0", @@ -44,6 +46,7 @@ "style-loader": "^0.23.0", "uglifyjs-webpack-plugin": "^2.0.1", "webpack": "^4.20.2", + "webpack-assets-manifest": "^3.1.0", "webpack-dev-middleware": "^3.4.0", "webpack-hot-middleware": "^2.24.0", "webpack-merge": "^4.1.4" diff --git a/packages/scripts/src/config/CreateWebpackConfig.ts b/packages/scripts/src/config/CreateWebpackConfig.ts index 24c317350..e608866c0 100644 --- a/packages/scripts/src/config/CreateWebpackConfig.ts +++ b/packages/scripts/src/config/CreateWebpackConfig.ts @@ -9,6 +9,11 @@ import { import { ServerConfig, serverConfigDefault } from './server.config.default'; import { WebpackConfigHelper } from './WebpackConfigHelper'; +export interface WpackConfig { + config: webpack.Configuration; + hmrPublicPath: string; +} + /** * Create the final webpack config through this class. */ @@ -54,7 +59,7 @@ export class CreateWebpackConfig { * If `projectConfig.files` has length === 1, then it would be a single compiler * otherwise, it would be for multi compiler. */ - public getConfig(): webpack.Configuration | webpack.Configuration[] { + public getConfig(): WpackConfig | WpackConfig[] { // Now it can be a single compiler, or multicompiler // In any case, figure it out, create the compiler options // and return the stuff. @@ -63,7 +68,7 @@ export class CreateWebpackConfig { // Then return an array of config. if (this.projectConfig.files.length > 1) { // Return an array of configuration - const config: webpack.Configuration[] = []; + const config: WpackConfig[] = []; this.projectConfig.files.forEach((file: FileConfig) => { config.push(this.getSingleCompilerConfig(file)); }); @@ -80,7 +85,7 @@ export class CreateWebpackConfig { * * @param file Single file object. */ - private getSingleCompilerConfig(file: FileConfig): webpack.Configuration { + private getSingleCompilerConfig(file: FileConfig): WpackConfig { const { type, slug, @@ -128,6 +133,9 @@ export class CreateWebpackConfig { config = webpackMerge(config, file.webpackConfig); } - return config; + // Get our hmr public path + const hmrPublicPath = helper.getHmrPath(); + + return { config, hmrPublicPath }; } } diff --git a/packages/scripts/src/config/WebpackConfigHelper.ts b/packages/scripts/src/config/WebpackConfigHelper.ts index ace97ce75..708f6f121 100644 --- a/packages/scripts/src/config/WebpackConfigHelper.ts +++ b/packages/scripts/src/config/WebpackConfigHelper.ts @@ -4,6 +4,7 @@ import miniCssExtractPlugin from 'mini-css-extract-plugin'; import path from 'path'; import slugify from 'slugify'; import webpack from 'webpack'; +import WebpackAssetsManifest from 'webpack-assets-manifest'; import { BannerConfig, FileConfig, @@ -34,6 +35,7 @@ interface CommonWebpackConfig { target: webpack.Configuration['target']; watch: webpack.Configuration['watch']; mode: webpack.Configuration['mode']; + name: webpack.Configuration['name']; } /** @@ -55,6 +57,8 @@ export class WebpackConfigHelper { */ private env: 'development' | 'production'; + private hmrPublicPath: string; + /** * Create an instance of GetEntryAndOutput class. */ @@ -75,11 +79,25 @@ export class WebpackConfigHelper { } // Create the outputPath, because we would be needing that - const { outputPath } = this.config; + const { outputPath, slug, type } = this.config; + const contentDir: string = `${type}s`; // and file const { name } = this.file; this.outputInnerDir = slugify(name, { lower: true }); this.outputPath = path.join(this.cwd, outputPath, this.outputInnerDir); + this.hmrPublicPath = `/wp-content/${contentDir}/${slug}/${outputPath}/${ + this.outputInnerDir + }/`; + } + + /** + * Get Hot Module Reload Path, which takes into consideration + * the dynamicPublicPath. + */ + public getHmrPath(): string { + const { name } = this.file; + + return `${this.hmrPublicPath}__wpackio_${name}`; } /** @@ -122,9 +140,9 @@ export class WebpackConfigHelper { // Here we need // 1. dynamicPublicPath - Because we intend to use __webpack_public_path__ // 2. overlay and overlayStypes - To enable overlay on errors, we don't need warnings here - // 3. path - The output path, I am not sure if we need this, so let's skip + // 3. path - The output path, We need to make sure both server and client has the same value. // 4. name - Because it could be multicompiler - const webpackHotClient: string = `webpack-hot-middleware/client?name=${name}&dynamicPublicPath=true&overlay=true&reload=true&overlayStyles=${encodeURIComponent( + const webpackHotClient: string = `webpack-hot-middleware/client?path=__wpackio_${name}&name=${name}&dynamicPublicPath=true&overlay=true&reload=true&overlayStyles=${encodeURIComponent( JSON.stringify(overlayStyles) )}`; // Now add to each of the entries @@ -144,7 +162,7 @@ export class WebpackConfigHelper { public getOutput(): webpack.Output { // Now use the config to create a output // Destucture stuff we need from config - const { type, slug, host, port, outputPath } = this.config; + const { host, port } = this.config; // and file const { filename } = this.file; // Assuming it is production @@ -164,14 +182,16 @@ export class WebpackConfigHelper { }; // Add the publicPath if it is in devMode if (this.isDev) { - const contentDir: string = `${type}s`; // We are proxying stuff here. So I guess, we can safely assume // That URL of the proxied server starts from root? // Maybe we can have a `prefix` in Config, but let's not do that // right now. - output.publicPath = `//${host || - 'localhost'}:${port}/wp-content/${contentDir}/${slug}/${outputPath}/${ - this.outputInnerDir + // tslint:disable: no-http-string + // Here we are hard-coding protocol http + // Maybe we can get an option from user for SSL? + // But this is needed for hot middleware + output.publicPath = `//${host || 'localhost'}:${port}${ + this.hmrPublicPath }`; } @@ -186,8 +206,8 @@ export class WebpackConfigHelper { const plugins: webpack.Plugin[] = [ // Define env new webpack.DefinePlugin({ - 'process.env.NODE_ENV': this.env, - 'process.env.BABEL_ENV': this.env, + 'process.env.NODE_ENV': JSON.stringify(this.env), + 'process.env.BABEL_ENV': JSON.stringify(this.env), }), // Clean dist directory new cleanWebpackPlugin([this.outputPath], { root: this.cwd }), @@ -195,6 +215,14 @@ export class WebpackConfigHelper { new miniCssExtractPlugin({ filename: '[name].css', }), + // Create Manifest for PHP Consumption + new WebpackAssetsManifest({ + writeToDisk: true, + output: `${this.outputPath}/manifest.json`, + publicPath: `${this.outputInnerDir}/`, // We dont put ${this.config.outputPath}/ here because, PHP will pick it up anyway. + entrypoints: true, + entrypointsKey: 'wpackioEp', + }), ]; // Add development specific plugins if (this.isDev) { @@ -370,6 +398,7 @@ ${bannerConfig.credit ? creditNote : ''} target: 'web', watch: this.isDev, mode: this.env, + name: this.file.name, }; } } diff --git a/packages/scripts/src/scripts/Server.ts b/packages/scripts/src/scripts/Server.ts index d1a9cfa84..8fea9edf3 100644 --- a/packages/scripts/src/scripts/Server.ts +++ b/packages/scripts/src/scripts/Server.ts @@ -3,7 +3,10 @@ import webpack from 'webpack'; import webpackDevMiddleware from 'webpack-dev-middleware'; import webpackHotMiddleware from 'webpack-hot-middleware'; -import { CreateWebpackConfig } from '../config/CreateWebpackConfig'; +import { + CreateWebpackConfig, + WpackConfig, +} from '../config/CreateWebpackConfig'; import { ProjectConfig } from '../config/project.config.default'; import { ServerConfig } from '../config/server.config.default'; @@ -68,35 +71,43 @@ export class Server { // Create webpack compiler // Put them together if (Array.isArray(webpackConfig)) { - webpackConfig.forEach((config: webpack.Configuration) => { + webpackConfig.forEach((wpackConfig: WpackConfig) => { + const { config, hmrPublicPath } = wpackConfig; const compiler = webpack(config); // We can not have dashboard plugin for webpack multi // compiler right now. // compiler.apply(new DashboardPlugin()); const devMiddleware = webpackDevMiddleware(compiler, { stats: { colors: true }, + logLevel: 'warn', publicPath: config.output && config.output.publicPath ? config.output.publicPath : '', }); - const hotMiddleware = webpackHotMiddleware(compiler); + const output = config.output as webpack.Output; + const hotMiddleware = webpackHotMiddleware(compiler, { + path: hmrPublicPath, + }); // Push them middlewares.push(devMiddleware); devMiddlewares.push(devMiddleware); middlewares.push(hotMiddleware); }); } else { - const compiler = webpack(webpackConfig); - // compiler.apply(new DashboardPlugin()); + const { config, hmrPublicPath } = webpackConfig; + const compiler = webpack(config); const devMiddleware = webpackDevMiddleware(compiler, { stats: { colors: true }, publicPath: - webpackConfig.output && webpackConfig.output.publicPath - ? webpackConfig.output.publicPath + config.output && config.output.publicPath + ? config.output.publicPath : '', }); - const hotMiddleware = webpackHotMiddleware(compiler); + + const hotMiddleware = webpackHotMiddleware(compiler, { + path: hmrPublicPath, + }); // Push them middlewares.push(devMiddleware); devMiddlewares.push(devMiddleware); @@ -107,7 +118,7 @@ export class Server { bs.init({ // We need to silent browserSync, otherwise might conflict with // webpack-dashboard - logLevel: 'silent', + logLevel: 'warn', port: this.serverConfig.port, ui: this.serverConfig.ui, proxy: { @@ -125,11 +136,9 @@ export class Server { if (this.projectConfig.watch) { bs.watch(this.projectConfig.watch).on('change', bs.reload); } - // Watch for our own manifest file - bs.watch(`${this.projectConfig.outputPath}/manifest.json`).on( - 'change', - bs.reload - ); + // We don't need to watch for manifest, because if user is changing + // Config, then she does need to restart. It won't be picked up + // automatically by node. // Mark server is running this.isServing = true; diff --git a/tslint.json b/tslint.json index 1cf63b3d2..f492cc400 100644 --- a/tslint.json +++ b/tslint.json @@ -28,7 +28,8 @@ "no-var-requires": false, "mocha-no-side-effect-code": false, "no-require-imports": false, - "no-suspicious-comment": false + "no-suspicious-comment": false, + "max-func-body-length": false }, "linterOptions": { "exclude": ["lib/**/*", "**/node_modules/**"] diff --git a/yarn.lock b/yarn.lock index f9d5ef63e..6c0a5f5c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1146,16 +1146,6 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@most/multicast@^1.2.5": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@most/multicast/-/multicast-1.3.0.tgz#e01574840df634478ac3fabd164c6e830fb3b966" - dependencies: - "@most/prelude" "^1.4.0" - -"@most/prelude@^1.4.0": - version "1.7.2" - resolved "https://registry.yarnpkg.com/@most/prelude/-/prelude-1.7.2.tgz#be4ed406518d4c8c220e45c39fa7251365425b73" - "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -1260,6 +1250,13 @@ dependencies: source-map "^0.6.1" +"@types/webpack-assets-manifest@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/webpack-assets-manifest/-/webpack-assets-manifest-3.0.0.tgz#bb2da3fb7ee0f6f76e6840a39cada486336ba29e" + dependencies: + "@types/tapable" "*" + "@types/webpack" "*" + "@types/webpack-dev-middleware@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@types/webpack-dev-middleware/-/webpack-dev-middleware-2.0.2.tgz#33934f15de582f1a6c21ea21c42f69282e328c76" @@ -1508,7 +1505,7 @@ ajv-keywords@^3.0.0, ajv-keywords@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" -ajv@^5.3.0: +ajv@^5.1.0, ajv@^5.3.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" dependencies: @@ -1539,6 +1536,10 @@ alphanum-sort@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + ansi-colors@^3.0.0: version "3.0.6" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.0.6.tgz#a0b9e00e8c1cc6685b1c3130dbeb9abed03ca6a4" @@ -1740,6 +1741,10 @@ async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" +async-foreach@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" + async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" @@ -1777,7 +1782,7 @@ aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" -aws4@^1.8.0: +aws4@^1.6.0, aws4@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" @@ -2019,10 +2024,6 @@ binary-extensions@^1.0.0: version "1.12.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14" -blessed@^0.1.81: - version "0.1.81" - resolved "https://registry.yarnpkg.com/blessed/-/blessed-0.1.81.tgz#f962d687ec2c369570ae71af843256e6d0ca1129" - blob@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" @@ -2408,7 +2409,7 @@ chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.3.2, chalk@^2.4.0, chalk@^2.4.1: +chalk@^2.0, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.3.2, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: @@ -2633,13 +2634,13 @@ combined-stream@1.0.6: dependencies: delayed-stream "~1.0.0" -combined-stream@~1.0.6: +combined-stream@~1.0.5, combined-stream@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" dependencies: delayed-stream "~1.0.0" -commander@^2.11.0, commander@^2.12.1, commander@^2.15.1, commander@^2.18.0, commander@^2.2.0, commander@^2.8.1: +commander@^2.11.0, commander@^2.12.1, commander@^2.18.0, commander@^2.2.0, commander@^2.8.1: version "2.18.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" @@ -2893,6 +2894,13 @@ cross-env@^5.2.0: cross-spawn "^6.0.5" is-windows "^1.0.0" +cross-spawn@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -3917,7 +3925,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@^3.0.0, extend@~3.0.2: +extend@^3.0.0, extend@~3.0.1, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" @@ -4014,6 +4022,13 @@ file-entry-cache@^2.0.0: flat-cache "^1.2.1" object-assign "^4.0.1" +file-loader@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-2.0.0.tgz#39749c82f020b9e85901dcff98e8004e6401cfde" + dependencies: + loader-utils "^1.0.2" + schema-utils "^1.0.0" + filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" @@ -4025,10 +4040,6 @@ fileset@^2.0.2: glob "^7.0.3" minimatch "^3.0.3" -filesize@^3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" - fill-range@^2.1.0: version "2.2.4" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" @@ -4168,7 +4179,7 @@ forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" -form-data@~2.3.2: +form-data@~2.3.1, form-data@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" dependencies: @@ -4176,10 +4187,6 @@ form-data@~2.3.2: combined-stream "1.0.6" mime-types "^2.1.12" -fp-ts@^1.0.0, fp-ts@^1.0.1: - version "1.9.0" - resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.9.0.tgz#52acf85692025b34285ff4014f39af72d1107e0b" - fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -4277,6 +4284,12 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +gaze@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" + dependencies: + globule "^1.0.0" + genfun@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/genfun/-/genfun-4.0.1.tgz#ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1" @@ -4389,7 +4402,7 @@ glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" dependencies: @@ -4459,6 +4472,14 @@ globby@^8.0.0, globby@^8.0.1: pify "^3.0.0" slash "^1.0.0" +globule@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d" + dependencies: + glob "~7.1.1" + lodash "~4.17.10" + minimatch "~3.0.2" + graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -4467,7 +4488,7 @@ growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" -handlebars@^4.0.11, handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.0.5: +handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.0.5: version "4.0.12" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5" dependencies: @@ -4481,6 +4502,13 @@ har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" +har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + har-validator@~5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29" @@ -4748,6 +4776,10 @@ imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" +in-publish@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" + indent-string@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" @@ -4816,16 +4848,6 @@ inquirer@^6.0.0, inquirer@^6.1.0, inquirer@^6.2.0: strip-ansi "^4.0.0" through "^2.3.6" -inspectpack@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/inspectpack/-/inspectpack-3.0.2.tgz#a2b17a1c09c236cc8d453388b814972d2ae8e349" - dependencies: - chalk "^2.4.0" - io-ts "^1.0.5" - io-ts-reporters "^0.0.20" - pify "^3.0.0" - yargs "^11.0.0" - interpret@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" @@ -4844,19 +4866,6 @@ invert-kv@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" -io-ts-reporters@^0.0.20: - version "0.0.20" - resolved "https://registry.yarnpkg.com/io-ts-reporters/-/io-ts-reporters-0.0.20.tgz#2b8cbb6a2bc4562dae6917a3a413fa2c9851a644" - dependencies: - fp-ts "^1.0.1" - io-ts "^1.0.2" - -io-ts@^1.0.2, io-ts@^1.0.5: - version "1.3.0" - resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.3.0.tgz#72a5e7dbbb650b9c26030bac0c22d9b18c321f54" - dependencies: - fp-ts "^1.0.0" - ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" @@ -5558,6 +5567,10 @@ jest@^23.6.0: import-local "^1.0.0" jest-cli "^23.6.0" +js-base64@^2.1.8: + version "2.4.9" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.9.tgz#748911fb04f48a60c4771b375cac45a80df11c03" + js-levenshtein@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.3.tgz#3ef627df48ec8cf24bacf05c0f184ff30ef413c5" @@ -5862,7 +5875,7 @@ lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" -lodash.assign@^4.0.3, lodash.assign@^4.0.6: +lodash.assign@^4.0.3, lodash.assign@^4.0.6, lodash.assign@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" @@ -5870,14 +5883,22 @@ lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" +lodash.clonedeep@^4.3.2: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" -lodash.get@^4.4.2: +lodash.get@^4.0, lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" +lodash.has@^4.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/lodash.has/-/lodash.has-4.5.2.tgz#d19f4dc1095058cccbe2b0cdf4ee0fe4aa37c862" + lodash.isfinite@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz#fb89b65a9a80281833f0b7478b3a5104f898ebb3" @@ -5886,6 +5907,10 @@ lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" +lodash.mergewith@^4.6.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" + lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -5911,7 +5936,7 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1: +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@~4.17.10: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" @@ -6043,7 +6068,7 @@ memory-fs@^0.4.0, memory-fs@~0.4.1: errno "^0.1.3" readable-stream "^2.0.1" -meow@^3.3.0: +meow@^3.3.0, meow@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" dependencies: @@ -6167,7 +6192,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -6249,7 +6274,7 @@ mixin-object@^2.0.1: for-in "^0.1.3" is-extendable "^0.1.1" -mkdirp@0.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp@0.x, "mkdirp@>=0.5 0", mkdirp@^0.5, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -6259,14 +6284,6 @@ modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" -most@^1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/most/-/most-1.7.3.tgz#406c31a66d73aa16957816fdf96965e27df84f1a" - dependencies: - "@most/multicast" "^1.2.5" - "@most/prelude" "^1.4.0" - symbol-observable "^1.0.2" - move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" @@ -6299,6 +6316,10 @@ mute-stream@0.0.7, mute-stream@~0.0.4: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" +nan@^2.10.0: + version "2.11.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" + nan@^2.9.2: version "2.11.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.0.tgz#574e360e4d954ab16966ec102c0c049fd961a099" @@ -6454,6 +6475,30 @@ node-releases@^1.0.0-alpha.11: dependencies: semver "^5.3.0" +node-sass@^4.9.3: + version "4.9.3" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.9.3.tgz#f407cf3d66f78308bb1e346b24fa428703196224" + dependencies: + async-foreach "^0.1.3" + chalk "^1.1.1" + cross-spawn "^3.0.0" + gaze "^1.0.0" + get-stdin "^4.0.1" + glob "^7.0.3" + in-publish "^2.0.0" + lodash.assign "^4.2.0" + lodash.clonedeep "^4.3.2" + lodash.mergewith "^4.6.0" + meow "^3.7.0" + mkdirp "^0.5.1" + nan "^2.10.0" + node-gyp "^3.8.0" + npmlog "^4.0.0" + request "2.87.0" + sass-graph "^2.2.4" + stdout-stream "^1.4.0" + "true-case-path" "^1.0.2" + "nopt@2 || 3": version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" @@ -6547,7 +6592,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.2, npmlog@^4.1.2: +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2, npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" dependencies: @@ -6574,6 +6619,10 @@ nwsapi@^2.0.7: version "2.0.9" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.9.tgz#77ac0cdfdcad52b6a1151a84e73254edc33ed016" +oauth-sign@~0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" @@ -7574,7 +7623,7 @@ qs@6.2.3: version "6.2.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.3.tgz#1cfcb25c10a9b2b483053ff39f5dfc9233908cfe" -qs@~6.5.2: +qs@~6.5.1, qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" @@ -7881,6 +7930,31 @@ request-promise-native@^1.0.5: stealthy-require "^1.1.0" tough-cookie ">=2.3.3" +request@2.87.0: + version "2.87.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + request@^2.87.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" @@ -8066,6 +8140,15 @@ sane@^2.0.0: optionalDependencies: fsevents "^1.2.3" +sass-graph@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" + dependencies: + glob "^7.0.0" + lodash "^4.0.0" + scss-tokenizer "^0.2.3" + yargs "^7.0.0" + sass-loader@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-7.1.0.tgz#16fd5138cb8b424bf8a759528a1972d72aad069d" @@ -8096,6 +8179,13 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" +scss-tokenizer@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" + dependencies: + js-base64 "^2.1.8" + source-map "^0.4.2" + "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5, semver@^5.5.0, semver@^5.5.1: version "5.5.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" @@ -8320,7 +8410,7 @@ socket.io-client@2.0.4: socket.io-parser "~3.1.1" to-array "0.1.4" -socket.io-client@2.1.1, socket.io-client@^2.1.1: +socket.io-client@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.1.1.tgz#dcb38103436ab4578ddb026638ae2f21b623671f" dependencies: @@ -8356,7 +8446,7 @@ socket.io-parser@~3.2.0: debug "~3.1.0" isarray "2.0.1" -socket.io@2.1.1, socket.io@^2.1.1: +socket.io@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.1.1.tgz#a069c5feabee3e6b214a75b40ce0652e1cfb9980" dependencies: @@ -8418,6 +8508,12 @@ source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" +source-map@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -8524,6 +8620,12 @@ statuses@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" +stdout-stream@^1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.1.tgz#5ac174cdd5cd726104aa0c0b2bd83815d8d535de" + dependencies: + readable-stream "^2.0.1" + stealthy-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" @@ -8697,10 +8799,6 @@ swap-case@^1.1.0: lower-case "^1.1.1" upper-case "^1.1.1" -symbol-observable@^1.0.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" - symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" @@ -8867,6 +8965,12 @@ tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@~2.4.3: psl "^1.1.24" punycode "^1.4.1" +tough-cookie@~2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" + dependencies: + punycode "^1.4.1" + tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" @@ -8889,6 +8993,12 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" +"true-case-path@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.3.tgz#f813b5a8c86b40da59606722b144e3225799f47d" + dependencies: + glob "^7.1.2" + ts-jest@^23.10.3: version "23.10.3" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-23.10.3.tgz#f42de669888dfd2795b1491016b1813230d553fa" @@ -9177,7 +9287,7 @@ utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" -uuid@^3.0.1, uuid@^3.3.2: +uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" @@ -9255,19 +9365,17 @@ webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" -webpack-dashboard@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/webpack-dashboard/-/webpack-dashboard-2.0.0.tgz#70db22e7bb5b12b4a7fde82de87ce01eed8d921c" +webpack-assets-manifest@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/webpack-assets-manifest/-/webpack-assets-manifest-3.1.0.tgz#5c540606e061a39e314042059c854a38bc696911" dependencies: - blessed "^0.1.81" - commander "^2.15.1" - cross-spawn "^6.0.5" - filesize "^3.6.1" - handlebars "^4.0.11" - inspectpack "^3.0.1" - most "^1.7.3" - socket.io "^2.1.1" - socket.io-client "^2.1.1" + chalk "^2.0" + lodash.get "^4.0" + lodash.has "^4.0" + mkdirp "^0.5" + schema-utils "^1.0.0" + tapable "^1.0.0" + webpack-sources "^1.0.0" webpack-dev-middleware@^3.4.0: version "3.4.0" @@ -9300,7 +9408,7 @@ webpack-merge@^4.1.4: dependencies: lodash "^4.17.5" -webpack-sources@^1.1.0, webpack-sources@^1.3.0: +webpack-sources@^1.0.0, webpack-sources@^1.1.0, webpack-sources@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85" dependencies: @@ -9508,6 +9616,12 @@ yargs-parser@^4.1.0, yargs-parser@^4.2.0: dependencies: camelcase "^3.0.0" +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + dependencies: + camelcase "^3.0.0" + yargs-parser@^9.0.2: version "9.0.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" @@ -9604,6 +9718,24 @@ yargs@^4.8.1: y18n "^3.2.1" yargs-parser "^2.4.1" +yargs@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"