kyt-starter-universal
Advanced tools
Comparing version 1.0.0-alpha.16 to 1.0.0-alpha.66732ccc
{ | ||
"name": "kyt-starter-universal", | ||
"version": "1.0.0-alpha.16", | ||
"version": "1.0.0-alpha.66732ccc", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "repository": { |
{ | ||
"icon-kytLogo_large-252x252.svg": "http://localhost:3001/icon-kytLogo_large-252x252-466d0df90a1887c34d04caa92ed278c6.svg", | ||
"main.js": "http://localhost:3001/main-49d16649dc71af341021.js", | ||
"manifest.js": "http://localhost:3001/manifest.js", | ||
"vendor.js": "http://localhost:3001/vendor-21eb3c2e3ecd66085799.js" | ||
"home.js": "/home-eb3f4611fb686522817a.js", | ||
"home.js.map": "/home-bc9d8faad02ccb7513c5.js.map", | ||
"icon-kytLogo_large-252x252.svg": "/icon-kytLogo_large-252x252-466d0df90a1887c34d04caa92ed278c6.svg", | ||
"main.css": "/main-cbd6d2c055eee169d7f3e3bcc1cbe40c.css", | ||
"main.css.map": "/main-cbd6d2c055eee169d7f3e3bcc1cbe40c.css.map", | ||
"main.js": "/main-d5f706bf96f2166795c5.js", | ||
"main.js.map": "/main-4abc23548ffc95160a95.js.map", | ||
"manifest.js": "/manifest-d74ae4f8cebd4592b80e.js", | ||
"manifest.js.map": "/manifest-c5f4ff50f6129f97f17f.js.map", | ||
"tools.js": "/tools-35f41b4302e7010bcdda.js", | ||
"tools.js.map": "/tools-e93e9a1a62c9d1651ee2.js.map", | ||
"vendor.js": "/vendor-edc6c4ffbbcfc2f72b6d.js", | ||
"vendor.js.map": "/vendor-6498cee50f17b6bb6b38.js.map" | ||
} |
@@ -18,2 +18,3 @@ // All webpack configurations are merged into this | ||
const fileExtensions = require('./fileExtensions'); | ||
const os = require('os'); | ||
@@ -64,3 +65,2 @@ let clientAssets; | ||
writeToDisk: options.type === 'client', | ||
merge: 'customize', | ||
done: manifest => { | ||
@@ -78,15 +78,8 @@ // This plugin's `merge` doesn't work as expected. The "done" callback | ||
}, | ||
customize: filePair => { | ||
customize: (key, value) => { | ||
const prependPublicPath = asset => `${options.publicPath || ''}${asset}`; | ||
const removePublicDir = asset => asset.replace(/(.*)?public\//, ''); | ||
let { key, value } = filePair; | ||
if (key.toLowerCase().endsWith('.map')) { | ||
return false; | ||
} | ||
// Server asset files have "../public" prepended to them | ||
// (see file-loader `outputPath`). We need to remove that. | ||
if (options.type === 'server') { | ||
@@ -135,3 +128,6 @@ if (value.startsWith('../public')) { | ||
// this is a loader-specific option and can't be put in a babel preset | ||
cacheDirectory: false, | ||
cacheDirectory: | ||
options.environment === 'development' | ||
? path.join(os.tmpdir(), 'babel-loader') | ||
: false, | ||
}, | ||
@@ -138,0 +134,0 @@ // add react hot loader babel plugin for development here--users |
@@ -32,4 +32,2 @@ // Development webpack config for client code | ||
mode: 'development', | ||
devtool: 'inline-source-map', | ||
@@ -49,24 +47,2 @@ | ||
optimization: { | ||
runtimeChunk: { | ||
name: 'manifest', | ||
}, | ||
splitChunks: { | ||
chunks: 'all', | ||
cacheGroups: { | ||
commons: { | ||
test: /[\\/]node_modules[\\/]/, | ||
name: 'vendor', | ||
chunks: 'all', | ||
}, | ||
main: { | ||
chunks: 'all', | ||
minChunks: 2, | ||
reuseExistingChunk: true, | ||
enforce: true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
devServer: { | ||
@@ -94,4 +70,10 @@ publicPath: options.publicPath, | ||
plugins: [new webpack.NoEmitOnErrorsPlugin(), new webpack.HotModuleReplacementPlugin()], | ||
plugins: [ | ||
new webpack.NoEmitOnErrorsPlugin(), | ||
new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }), | ||
new webpack.HotModuleReplacementPlugin(), | ||
], | ||
}; | ||
}; |
@@ -23,4 +23,2 @@ // Development webpack config for server code | ||
mode: 'development', | ||
node: { | ||
@@ -62,3 +60,3 @@ __dirname: false, | ||
new webpack.NoEmitOnErrorsPlugin(), | ||
new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 2 }), | ||
new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }), | ||
new webpack.BannerPlugin({ | ||
@@ -65,0 +63,0 @@ banner: 'require("source-map-support").install();', |
// Production webpack config for client code | ||
const webpack = require('webpack'); | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | ||
const clone = require('lodash.clonedeep'); | ||
const postcssLoader = require('../utils/getPostcssLoader'); | ||
const { clientSrcPath, assetsBuildPath, publicSrcPath } = require('kyt-utils/paths')(); | ||
const HashOutput = require('webpack-plugin-hash-output'); | ||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); | ||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | ||
const cssStyleLoaders = [ | ||
{ | ||
loader: 'css-loader', | ||
options: { | ||
modules: true, | ||
localIdentName: '[name]-[local]--[hash:base64:5]', | ||
}, | ||
}, | ||
postcssLoader, | ||
]; | ||
module.exports = options => ({ | ||
target: 'web', | ||
mode: 'production', | ||
devtool: 'source-map', | ||
@@ -30,78 +38,19 @@ | ||
optimization: { | ||
runtimeChunk: { | ||
name: 'manifest', | ||
}, | ||
splitChunks: { | ||
chunks: 'all', | ||
minSize: 30000, | ||
minChunks: 1, | ||
maxAsyncRequests: 5, | ||
maxInitialRequests: 3, | ||
name: true, | ||
cacheGroups: { | ||
commons: { | ||
test: /[\\/]node_modules[\\/]/, | ||
name: 'vendor', | ||
chunks: 'all', | ||
}, | ||
main: { | ||
chunks: 'all', | ||
minChunks: 2, | ||
reuseExistingChunk: true, | ||
enforce: true, | ||
}, | ||
}, | ||
}, | ||
minimize: true, | ||
minimizer: [ | ||
// new webpack.optimize.UglifyJsPlugin({ | ||
// compress: { | ||
// screw_ie8: true, | ||
// warnings: false, | ||
// }, | ||
// output: { | ||
// comments: false, | ||
// }, | ||
// sourceMap: true, | ||
// }), | ||
new UglifyJsPlugin({ | ||
cache: true, | ||
parallel: true, | ||
uglifyOptions: { | ||
compress: true, | ||
ecma: 6, | ||
// mangle: true | ||
}, | ||
sourceMap: true, | ||
}), | ||
], | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(scss|css)$/, | ||
use: [ | ||
MiniCssExtractPlugin.loader, | ||
{ | ||
loader: 'css-loader', | ||
options: { | ||
modules: true, | ||
localIdentName: '[name]-[local]--[hash:base64:5]', | ||
}, | ||
}, | ||
postcssLoader, | ||
{ | ||
loader: 'sass-loader', | ||
options: { | ||
sourceMap: true, | ||
}, | ||
}, | ||
], | ||
test: /\.css$/, | ||
loader: ExtractTextPlugin.extract({ | ||
fallback: 'style-loader', | ||
use: cssStyleLoaders, | ||
}), | ||
exclude: [publicSrcPath], | ||
}, | ||
{ | ||
test: /\.(png|jpg|gif)$/, | ||
use: ['file-loader'], | ||
test: /\.scss$/, | ||
loader: ExtractTextPlugin.extract({ | ||
fallback: 'style-loader', | ||
use: clone(cssStyleLoaders).concat('sass-loader'), | ||
}), | ||
exclude: [publicSrcPath], | ||
}, | ||
@@ -112,9 +61,7 @@ ], | ||
plugins: [ | ||
new MiniCssExtractPlugin({ | ||
filename: '[name].[contenthash].css', | ||
chunkFilename: '[id].[contenthash].css', | ||
new ExtractTextPlugin({ | ||
filename: '[name]-[contenthash].css', | ||
allChunks: true, | ||
}), | ||
new OptimizeCSSAssetsPlugin({}), | ||
new webpack.LoaderOptionsPlugin({ | ||
@@ -125,5 +72,27 @@ minimize: true, | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { | ||
screw_ie8: true, | ||
warnings: false, | ||
}, | ||
output: { | ||
comments: false, | ||
}, | ||
sourceMap: true, | ||
}), | ||
// Modules should get deterministic ids so that they don't change between builds | ||
new webpack.HashedModuleIdsPlugin(), | ||
// Extract all 3rd party modules into a separate chunk | ||
// Only include vendor modules as needed, | ||
// https://github.com/webpack/webpack/issues/2372#issuecomment-213149173 | ||
new webpack.optimize.CommonsChunkPlugin({ | ||
name: 'vendor', | ||
minChunks: ({ resource }) => /node_modules/.test(resource), | ||
}), | ||
// Generate a 'manifest' chunk to be inlined | ||
new webpack.optimize.CommonsChunkPlugin({ name: 'manifest' }), | ||
// Merge bundles that would otherwise be negligibly small | ||
@@ -130,0 +99,0 @@ new webpack.optimize.AggressiveMergingPlugin(), |
@@ -23,4 +23,2 @@ // Production webpack config for server code | ||
mode: 'production', | ||
node: { | ||
@@ -27,0 +25,0 @@ __dirname: false, |
{ | ||
"name": "kyt-utils", | ||
"version": "0.1.1", | ||
"version": "0.2.0-alpha.66732ccc", | ||
"description": "A shared kyt utility library.", | ||
@@ -5,0 +5,0 @@ "author": "NYTimes", |
{ | ||
"name": "stylelint-config-kyt", | ||
"version": "1.0.0-alpha.15", | ||
"version": "1.0.0-alpha.66732ccc", | ||
"main": "stylelintrc.json", | ||
@@ -12,4 +12,4 @@ "description": "StyleLint configuration for kyt projects.", | ||
"peerDependencies": { | ||
"stylelint": "^9.1.3", | ||
"stylelint-config-standard": "18.2.0" | ||
"stylelint": "8.2.0", | ||
"stylelint-config-standard": "17.0.0" | ||
}, | ||
@@ -16,0 +16,0 @@ "keywords": [ |
{ | ||
"name": "kyt", | ||
"version": "1.0.0-alpha.16", | ||
"version": "1.0.0-alpha.66732ccc", | ||
"description": "kyt is a toolkit that encapsulates and manages the configuration for web apps.", | ||
@@ -14,67 +14,67 @@ "author": "NYTimes", | ||
"engines": { | ||
"node": ">=8.0.0" | ||
"node": ">=6.1.0" | ||
}, | ||
"dependencies": { | ||
"autoprefixer": "8.2.0", | ||
"babel-cli": "6.26.0", | ||
"babel-core": "6.26.0", | ||
"babel-eslint": "^8.2.2", | ||
"babel-loader": "7.1.4", | ||
"autoprefixer": "7.1.1", | ||
"babel-cli": "6.18.0", | ||
"babel-core": "6.18.0", | ||
"babel-eslint": "8.0.1", | ||
"babel-jest": "20.0.3", | ||
"babel-loader": "7.1.1", | ||
"babel-preset-kyt-core": "0.3.0", | ||
"chokidar": "2.0.3", | ||
"commander": "2.15.1", | ||
"connect-history-api-fallback": "1.5.0", | ||
"chokidar": "1.7.0", | ||
"commander": "2.9.0", | ||
"connect-history-api-fallback": "1.3.0", | ||
"cors": "2.8.4", | ||
"css-loader": "0.28.11", | ||
"detect-port": "1.2.2", | ||
"eslint": "^4.19.1", | ||
"eslint-config-airbnb": "^16.1.0", | ||
"eslint-config-prettier": "2.9.0", | ||
"eslint-plugin-import": "2.9.0", | ||
"css-loader": "0.28.2", | ||
"detect-port": "1.0.1", | ||
"eslint": "4.9.0", | ||
"eslint-config-airbnb": "16.1.0", | ||
"eslint-config-kyt": "1.0.0-alpha.66732ccc", | ||
"eslint-config-prettier": "2.6.0", | ||
"eslint-plugin-import": "2.8.0", | ||
"eslint-plugin-json": "1.2.0", | ||
"eslint-plugin-jsx-a11y": "6.0.3", | ||
"eslint-plugin-prettier": "2.6.0", | ||
"eslint-plugin-react": "7.7.0", | ||
"express": "4.16.3", | ||
"file-loader": "1.1.11", | ||
"filesize": "3.6.1", | ||
"glob": "7.1.2", | ||
"gzip-size": "4.1.0", | ||
"eslint-plugin-jsx-a11y": "6.0.2", | ||
"eslint-plugin-prettier": "2.3.1", | ||
"eslint-plugin-react": "7.4.0", | ||
"express": "4.15.3", | ||
"extract-text-webpack-plugin": "3.0.0", | ||
"file-loader": "0.10.1", | ||
"filesize": "3.3.0", | ||
"glob": "7.1.0", | ||
"gzip-size": "3.0.0", | ||
"identity-obj-proxy": "3.0.0", | ||
"inquirer": "5.2.0", | ||
"install": "0.11.0", | ||
"jest": "22.4.3", | ||
"jsdom": "11.6.2", | ||
"kyt-utils": "0.1.1", | ||
"inquirer": "1.2.1", | ||
"install": "0.8.1", | ||
"jest": "20.0.4", | ||
"jsdom": "11.1.0", | ||
"kyt-utils": "0.2.0-alpha.66732ccc", | ||
"lodash.clonedeep": "4.5.0", | ||
"lodash.merge": "4.6.1", | ||
"lodash.merge": "4.6.0", | ||
"lodash.once": "4.1.1", | ||
"mini-css-extract-plugin": "^0.4.0", | ||
"node-sass": "4.8.3", | ||
"nodemon": "1.17.2", | ||
"optimize-css-assets-webpack-plugin": "4.0.0", | ||
"postcss-loader": "2.1.3", | ||
"prettier": "1.11.1", | ||
"prettier-eslint-cli": "4.7.1", | ||
"node-sass": "4.5.3", | ||
"nodemon": "1.10.2", | ||
"postcss-loader": "2.0.5", | ||
"prettier": "1.7.4", | ||
"prettier-eslint-cli": "4.4.0", | ||
"ps-tree": "1.1.0", | ||
"react-hot-loader": "4.0.1", | ||
"sass-loader": "6.0.7", | ||
"shelljs": "0.8.1", | ||
"source-map-support": "0.5.4", | ||
"strip-ansi": "4.0.0", | ||
"style-loader": "0.20.3", | ||
"stylelint": "^9.1.3", | ||
"stylelint-config-kyt": "1.0.0-alpha.15", | ||
"stylelint-config-standard": "18.2.0", | ||
"react-hot-loader": "3.0.0-beta.6", | ||
"sass-loader": "6.0.6", | ||
"shelljs": "0.7.8", | ||
"source-map-support": "0.4.11", | ||
"strip-ansi": "3.0.1", | ||
"style-loader": "0.18.1", | ||
"stylelint": "8.2.0", | ||
"stylelint-config-kyt": "1.0.0-alpha.66732ccc", | ||
"stylelint-config-standard": "17.0.0", | ||
"temp": "0.8.3", | ||
"uglifyjs-webpack-plugin": "^1.2.4", | ||
"url-loader": "1.0.1", | ||
"webpack": "4.5.0", | ||
"webpack-assets-manifest": "3.0.1", | ||
"webpack-dev-middleware": "3.1.2", | ||
"webpack-dev-server": "3.1.3", | ||
"webpack-hot-middleware": "2.22.0", | ||
"webpack-merge": "4.1.2", | ||
"url-loader": "0.5.8", | ||
"webpack": "3.1.0", | ||
"webpack-assets-manifest": "0.7.0", | ||
"webpack-dev-middleware": "1.11.0", | ||
"webpack-dev-server": "2.5.1", | ||
"webpack-hot-middleware": "2.18.2", | ||
"webpack-merge": "4.1.0", | ||
"webpack-node-externals": "1.6.0", | ||
"webpack-plugin-hash-output": "^2.0.0" | ||
"webpack-plugin-hash-output": "^1.3.0" | ||
}, | ||
@@ -81,0 +81,0 @@ "keywords": [ |
@@ -12,3 +12,3 @@ const detect = require('detect-port'); | ||
if (Number(port) === Number(unusedPort)) { | ||
if (port === unusedPort) { | ||
callback(); | ||
@@ -15,0 +15,0 @@ } else { |
@@ -20,4 +20,4 @@ { | ||
"babel-preset-kyt-react": "0.3.0", | ||
"compression": "1.7.2", | ||
"express": "4.16.3", | ||
"compression": "1.6.2", | ||
"express": "4.15.3", | ||
"react": "15.3.0", | ||
@@ -28,8 +28,8 @@ "react-dom": "15.3.0", | ||
"devDependencies": { | ||
"enzyme": "2.9.1", | ||
"kyt": "1.0.0-alpha.16", | ||
"enzyme": "2.4.1", | ||
"kyt": "1.0.0-alpha.66732ccc", | ||
"react-addons-test-utils": "15.3.0", | ||
"react-hot-loader": "3.0.0-beta.6" | ||
}, | ||
"version": "1.0.0-alpha.16" | ||
"version": "1.0.0-alpha.66732ccc" | ||
} |
@@ -10,3 +10,3 @@ import 'babel-polyfill'; | ||
import match from 'react-router/lib/match'; | ||
import template from './template'; // eslint-disable-line import/no-restricted-paths | ||
import template from './template'; | ||
import routes from '../routes'; | ||
@@ -13,0 +13,0 @@ |
@@ -19,7 +19,5 @@ /* eslint-disable prefer-template, max-len */ | ||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css"> | ||
${ | ||
vo.mainCSSBundle | ||
? '<link rel="stylesheet" type="text/css" href="' + vo.mainCSSBundle + '">' | ||
: '' | ||
} | ||
${vo.mainCSSBundle | ||
? '<link rel="stylesheet" type="text/css" href="' + vo.mainCSSBundle + '">' | ||
: ''} | ||
@@ -26,0 +24,0 @@ <title>Universal React Starter Kyt</title> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
2
1
5137584
95
26158
97