thinkful-ui
Advanced tools
Comparing version 0.0.4 to 0.1.0-alpha
{ | ||
"name": "thinkful-ui", | ||
"version": "0.0.4", | ||
"version": "0.1.0-alpha", | ||
"description": "Shared navigation and UI resources for Thinkful.", | ||
@@ -38,3 +38,2 @@ "main": "src/index.es6", | ||
"less-loader": "^2.2.0", | ||
"node-libs-browser": "^0.5.0", | ||
"node-notifier": "^4.2.1", | ||
@@ -41,0 +40,0 @@ "react-hot-loader": "^1.2.7", |
@@ -5,3 +5,4 @@ 'use strict'; | ||
// options | ||
__dirname: __dirname | ||
__dirname: __dirname, | ||
entry: ['./src/index.es6'] | ||
}); |
@@ -9,4 +9,17 @@ 'use strict'; | ||
module.exports = function (options) { | ||
options = options || {}; | ||
options = _.defaults({}, options, { | ||
__dirname: __dirname, | ||
displayName: 'TUI', | ||
entry: ['./client/index.jsx'], | ||
hotloadPort: process.env.HOTLOAD_PORT || 8888 | ||
}); | ||
options.output = _.defaults({}, options.output, { | ||
publicPath: '/static/', | ||
filename: 'client.js' | ||
}); | ||
options.output.path = | ||
path.join(options.__dirname, options.output.publicPath + '/build/') | ||
var HOTLOAD = process.env.NODE_ENV === 'development'; | ||
@@ -23,3 +36,2 @@ | ||
test: /\.less$/, | ||
exclude: /\.useable\.less$/, | ||
loader: | ||
@@ -31,5 +43,10 @@ ExtractTextPlugin.extract( | ||
var webpackConfig = { | ||
// Hotload Specific Config | ||
displayName: options.displayName, | ||
hotloadPort: options.hotloadPort, | ||
// Standard Webpack Config | ||
cache: true, | ||
devtool: 'source-map', | ||
entry: ['./client/index.jsx'], | ||
entry: options.entry, | ||
module: { | ||
@@ -41,5 +58,5 @@ loaders: [ | ||
output: { | ||
path: path.join(options.__dirname, '/static/build/'), | ||
publicPath: '/static/', | ||
filename: 'client.js' }, | ||
path: path.join(options.__dirname, options.output.publicPath + '/build/'), | ||
publicPath: options.output.publicPath, | ||
filename: options.output.filename }, | ||
plugins: [ | ||
@@ -51,3 +68,3 @@ // Adds support for 'require(*.less)' from '.jsx' files | ||
extensions: ['', '.js', '.jsx', '.es', '.es6'], | ||
alias: {app: path.join(options.__dirname, "client")} | ||
alias: {app: path.join(options.__dirname, 'client')} | ||
}, | ||
@@ -60,8 +77,9 @@ target: 'web' | ||
webpackConfig.entry = [ | ||
'webpack-dev-server/client?http://localhost:8888', | ||
'webpack-dev-server/client?http://localhost:' + webpackConfig.hotloadPort, | ||
'webpack/hot/dev-server', | ||
'./client/index.jsx' | ||
]; | ||
].concat(webpackConfig.entry); | ||
webpackConfig.output.publicPath = 'http://localhost:8888/static/'; | ||
webpackConfig.output.publicPath = 'http://localhost:' + | ||
webpackConfig.hotloadPort + | ||
webpackConfig.output.publicPath; | ||
loaders.es6.loaders = ['react-hot', 'babel?stage=0&optional=runtime']; | ||
@@ -68,0 +86,0 @@ loaders.less.loader = 'style!css!autoprefixer!less'; |
@@ -9,4 +9,4 @@ 'use strict'; | ||
module.exports = function (webpackConfig) { | ||
var NAME = process.env.HAS_SKELETON_ENV || "peacock"; | ||
var PORT = process.env.HOTLOAD_PORT || 8888; // lucky 8's | ||
var NAME = webpackConfig.displayName; | ||
var PORT = webpackConfig.hotloadPort; | ||
var HOST = "http://localhost:" + PORT; | ||
@@ -24,6 +24,6 @@ | ||
notifier.notify({ | ||
title: error.module.rawRequest.replace('.', process.env.APP_NAME), | ||
title: webpackConfig.displayName + ' ' + error.module.rawRequest, | ||
message: error.error.message.split(': ').join('\n') | ||
}); | ||
} catch (e) { console.log(e.message); } | ||
}) | ||
} catch (e) { console.log(e.message) } | ||
}); | ||
@@ -30,0 +30,0 @@ }); |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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 2 instances in 1 package
2867142
15
1163
2
0