Skip to content

Commit 86312c3

Browse files
committed
refactor: change paragon package name for openedx
1 parent 047f414 commit 86312c3

File tree

8 files changed

+78
-215
lines changed

8 files changed

+78
-215
lines changed

config/data/paragonUtils.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const fs = require('fs');
99
* @returns {string} Paragon dependency version of the consuming application
1010
*/
1111
function getParagonVersion(dir, { isBrandOverride = false } = {}) {
12-
const npmPackageName = isBrandOverride ? '@edx/brand' : '@edx/paragon';
12+
const npmPackageName = isBrandOverride ? '@edx/brand' : '@openedx/paragon';
1313
const pathToPackageJson = `${dir}/node_modules/${npmPackageName}/package.json`;
1414
if (!fs.existsSync(pathToPackageJson)) {
1515
return undefined;
@@ -38,12 +38,12 @@ function getParagonVersion(dir, { isBrandOverride = false } = {}) {
3838
*/
3939

4040
/**
41-
* Attempts to extract the Paragon theme CSS from the locally installed `@edx/paragon` package.
41+
* Attempts to extract the Paragon theme CSS from the locally installed `@openedx/paragon` package.
4242
* @param {string} dir Path to directory containing `node_modules`.
4343
* @returns {ParagonThemeCss}
4444
*/
4545
function getParagonThemeCss(dir, { isBrandOverride = false } = {}) {
46-
const npmPackageName = isBrandOverride ? '@edx/brand' : '@edx/paragon';
46+
const npmPackageName = isBrandOverride ? '@edx/brand' : '@openedx/paragon';
4747
const pathToParagonThemeOutput = path.resolve(dir, 'node_modules', npmPackageName, 'dist', 'theme-urls.json');
4848

4949
if (!fs.existsSync(pathToParagonThemeOutput)) {
@@ -128,8 +128,8 @@ function getParagonCacheGroups(paragonThemeCss) {
128128
* @param {ParagonThemeCss} paragonThemeCss The Paragon theme CSS metadata.
129129
* @returns {Object.<string, string>} The entry points for the Paragon theme CSS. Example: ```
130130
* {
131-
* "paragon.theme.core": "/path/to/node_modules/@edx/paragon/dist/core.min.css",
132-
* "paragon.theme.variants.light": "/path/to/node_modules/@edx/paragon/dist/light.min.css"
131+
* "paragon.theme.core": "/path/to/node_modules/@openedx/paragon/dist/core.min.css",
132+
* "paragon.theme.variants.light": "/path/to/node_modules/@openedx/paragon/dist/light.min.css"
133133
* }
134134
* ```
135135
*/

config/webpack.common.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ module.exports = {
1717
/**
1818
* The entry points for the Paragon theme CSS. Example: ```
1919
* {
20-
* "paragon.theme.core": "/path/to/node_modules/@edx/paragon/dist/core.min.css",
21-
* "paragon.theme.variants.light": "/path/to/node_modules/@edx/paragon/dist/light.min.css"
20+
* "paragon.theme.core": "/path/to/node_modules/@openedx/paragon/dist/core.min.css",
21+
* "paragon.theme.variants.light": "/path/to/node_modules/@openedx/paragon/dist/light.min.css"
2222
* }
2323
*/
2424
...getParagonEntryPoints(paragonThemeCss),

config/webpack.dev.config.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const ImageMinimizerPlugin = require('image-minimizer-webpack-plugin');
44
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
55
const { merge } = require('webpack-merge');
66
const Dotenv = require('dotenv-webpack');
7-
const dotenv = require('dotenv');
87
const HtmlWebpackPlugin = require('html-webpack-plugin');
98
const path = require('path');
109
const PostCssAutoprefixerPlugin = require('autoprefixer');
@@ -17,12 +16,6 @@ const presets = require('../lib/presets');
1716
const resolvePrivateEnvConfig = require('../lib/resolvePrivateEnvConfig');
1817
const getLocalAliases = require('./getLocalAliases');
1918

20-
// Add process env vars. Currently used only for setting the
21-
// server port and the publicPath
22-
dotenv.config({
23-
path: path.resolve(process.cwd(), '.env.development'),
24-
});
25-
2619
// Allow private/local overrides of env vars from .env.development for config settings
2720
// that you'd like to persist locally during development, without the risk of checking
2821
// in temporary modifications to .env.development.
@@ -109,7 +102,7 @@ module.exports = merge(commonConfig, {
109102
test: /(.scss|.css)$/,
110103
oneOf: [
111104
{
112-
resource: /(@edx\/paragon|@edx\/brand)/,
105+
resource: /(@openedx\/paragon|@edx\/brand)/,
113106
use: [
114107
MiniCssExtractPlugin.loader,
115108
...getStyleUseConfig(),

0 commit comments

Comments
 (0)