use reactstrap Add banner and header atoms pull all user data out of JSX Transform component to class Add stub for editable content Add height animation to editable content progress with editing Break out components to individual files. Make most editable. Add ability to change tag of EditableContent Add avatar fix some prop type issues Add an async button Small update to avatar Add height animation to editable content pull edited data up to useraccount component callback Updating oneOf prop type to provide arrays. Fixing missing key attributes on repeated tags. use reactstrap Add state wrapper container to UserAccount component. Move crossfade transition of in-context editable elements to a discrete component Some reusable components. Form row related stuff and an Alert box. All backed by reactstrap. Add passthroughs for button save states Pointing edx-bootstrap at 2.0 branch Also adding font-awesome icons via the preferred method, and updating port to 1995. Fixing font-awesome icons and getting bootstrap imported correctly. Update edx bootstrap There was a problem with a missing org prefix Move headings to a common component. Add full name fix missing key and conflict of value and defalutValue props Remove extraneous div in TransitionReplace Fix some wonkiness with the education component Add classname prop to TransitionReplace Add some more consistent margins Update to layout for some editable content Update markup to remove repeat renders Add empty state for bio Refactoring profile form state out of the user account “fetch” state from frontend-auth Using redux-saga to manage action side-effects (async calls, secondary actions, and delays). redux-saga is a very flexible alternate side-effect model for redux (as opposed to redux-thunk). Used it to good effect in the past, and it helps separate concerns between action creators and side effect management. It also helps decouple react components from async actions by having redux-saga register as an observer of the redux action stream. Add empty states for all fields except social links and my certificates Close fields after save Remove the delay after successfully saving Update banner image. Update edit controls layout Updated edx bootstrap to have focus ring on btn-link buttons Add event handler props to TransitionReplace. Handle focus when edit fields are swapped in and out Update empty content icon and width Hide visibility if a field has no value Add delays back in Large reworking of components here. Social links still has a bug. Only twitter will save. Renaming profileActions -> profile and tweaking editable state stuff. Adding tests for profile actions - pulled over from frontend-auth. Removing profile API helpers, fixing a few bugs in saving the user profile. Make Social Links a full on component again. Can only save one field at a time. Remove an old version of edx-bootstrap Renaming UserAccount components to UserProfile.
141 lines
5.3 KiB
JavaScript
Executable File
141 lines
5.3 KiB
JavaScript
Executable File
// This is the dev Webpack config. All settings here should prefer a fast build
|
|
// time at the expense of creating larger, unoptimized bundles.
|
|
const Merge = require('webpack-merge');
|
|
const path = require('path');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const webpack = require('webpack');
|
|
|
|
const commonConfig = require('./webpack.common.config.js');
|
|
|
|
module.exports = Merge.smart(commonConfig, {
|
|
mode: 'development',
|
|
entry: [
|
|
// enable react's custom hot dev client so we get errors reported in the browser
|
|
require.resolve('react-dev-utils/webpackHotDevClient'),
|
|
path.resolve(__dirname, '../src/segment.js'),
|
|
path.resolve(__dirname, '../src/index.jsx'),
|
|
],
|
|
module: {
|
|
// Specify file-by-file rules to Webpack. Some file-types need a particular kind of loader.
|
|
rules: [
|
|
// The babel-loader transforms newer ES2015+ syntax to older ES5 for older browsers.
|
|
// Babel is configured with the .babelrc file at the root of the project.
|
|
{
|
|
test: /\.(js|jsx)$/,
|
|
include: [
|
|
path.resolve(__dirname, '../src'),
|
|
],
|
|
loader: 'babel-loader',
|
|
options: {
|
|
// Caches result of loader to the filesystem. Future builds will attempt to read from the
|
|
// cache to avoid needing to run the expensive recompilation process on each run.
|
|
cacheDirectory: true,
|
|
},
|
|
},
|
|
// We are not extracting CSS from the javascript bundles in development because extracting
|
|
// prevents hot-reloading from working, it increases build time, and we don't care about
|
|
// flash-of-unstyled-content issues in development.
|
|
{
|
|
test: /(.scss|.css)$/,
|
|
use: [
|
|
'style-loader', // creates style nodes from JS strings
|
|
{
|
|
loader: 'css-loader', // translates CSS into CommonJS
|
|
options: {
|
|
sourceMap: true,
|
|
},
|
|
},
|
|
{
|
|
loader: 'sass-loader', // compiles Sass to CSS
|
|
options: {
|
|
sourceMap: true,
|
|
includePaths: [
|
|
path.join(__dirname, '../node_modules'),
|
|
path.join(__dirname, '../src'),
|
|
],
|
|
},
|
|
},
|
|
],
|
|
},
|
|
// Webpack, by default, uses the url-loader for images and fonts that are required/included by
|
|
// files it processes, which just base64 encodes them and inlines them in the javascript
|
|
// bundles. This makes the javascript bundles ginormous and defeats caching so we will use the
|
|
// file-loader instead to copy the files directly to the output directory.
|
|
{
|
|
test: /\.(woff2?|ttf|svg|eot)(\?v=\d+\.\d+\.\d+)?$/,
|
|
loader: 'file-loader',
|
|
},
|
|
{
|
|
test: /\.(jpe?g|png|gif|ico)(\?v=\d+\.\d+\.\d+)?$/,
|
|
use: [
|
|
'file-loader',
|
|
{
|
|
loader: 'image-webpack-loader',
|
|
options: {
|
|
optimizationlevel: 7,
|
|
mozjpeg: {
|
|
progressive: true,
|
|
},
|
|
gifsicle: {
|
|
interlaced: false,
|
|
},
|
|
pngquant: {
|
|
quality: '65-90',
|
|
speed: 4,
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
// Specify additional processing or side-effects done on the Webpack output bundles as a whole.
|
|
plugins: [
|
|
// Generates an HTML file in the output directory.
|
|
new HtmlWebpackPlugin({
|
|
inject: true, // Appends script tags linking to the webpack bundles at the end of the body
|
|
template: path.resolve(__dirname, '../public/index.html'),
|
|
}),
|
|
new webpack.EnvironmentPlugin({
|
|
NODE_ENV: 'development',
|
|
BASE_URL: 'localhost:1995',
|
|
LMS_BASE_URL: 'http://localhost:18000',
|
|
LOGIN_URL: 'http://localhost:18000/login',
|
|
LOGOUT_URL: 'http://localhost:18000/login',
|
|
CSRF_TOKEN_API_PATH: '/csrf/api/v1/token',
|
|
REFRESH_ACCESS_TOKEN_ENDPOINT: 'http://localhost:18000/login_refresh',
|
|
SEGMENT_KEY: null,
|
|
ACCESS_TOKEN_COOKIE_NAME: 'edx-jwt-cookie-header-payload',
|
|
CSRF_COOKIE_NAME: 'csrftoken',
|
|
SITE_NAME: 'edX',
|
|
MARKETING_SITE_BASE_URL: 'http://localhost:18000',
|
|
SUPPORT_URL: 'http://localhost:18000/support',
|
|
CONTACT_URL: 'http://localhost:18000/contact',
|
|
OPEN_SOURCE_URL: 'http://localhost:18000/openedx',
|
|
TERMS_OF_SERVICE_URL: 'http://localhost:18000/terms-of-service',
|
|
PRIVACY_POLICY_URL: 'http://localhost:18000/privacy-policy',
|
|
FACEBOOK_URL: 'https://www.facebook.com',
|
|
TWITTER_URL: 'https://twitter.com',
|
|
YOU_TUBE_URL: 'https://www.youtube.com',
|
|
LINKED_IN_URL: 'https://www.linkedin.com',
|
|
GOOGLE_PLUS_URL: 'https://plus.google.com',
|
|
REDDIT_URL: 'https://www.reddit.com',
|
|
APPLE_APP_STORE_URL: 'https://www.apple.com/ios/app-store/',
|
|
GOOGLE_PLAY_URL: 'https://play.google.com/store',
|
|
}),
|
|
// when the --hot option is not passed in as part of the command
|
|
// the HotModuleReplacementPlugin has to be specified in the Webpack configuration
|
|
// https://webpack.js.org/configuration/dev-server/#devserver-hot
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
],
|
|
// This configures webpack-dev-server which serves bundles from memory and provides live
|
|
// reloading.
|
|
devServer: {
|
|
host: '0.0.0.0',
|
|
port: 1995,
|
|
historyApiFallback: true,
|
|
hot: true,
|
|
inline: true,
|
|
},
|
|
});
|