From 6b1211fd61d53b213b963361f15ad2cc54e6939d Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Fri, 15 Dec 2023 11:59:08 -0500 Subject: [PATCH] fix: Update some scripts and docs. * Update the `fedx-scripts.js` script to point to the correct formatter location. * Update readme and comments. --- README.md | 22 +++++++++++----------- bin/fedx-scripts.js | 2 +- config/getLocalAliases.js | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index ce4bcb864..814bbcf0f 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![Build Status](https://api.travis-ci.com/edx/frontend-build.svg?branch=master)](https://travis-ci.com/edx/frontend-build) -![npm\_version](https://img.shields.io/npm/v/@edx/frontend-build.svg) +![npm\_version](https://img.shields.io/npm/v/@openedx/frontend-build.svg) [![Codecov](https://img.shields.io/codecov/c/github/edx/frontend-build)](https://codecov.io/gh/edx/frontend-build) -[![license](https://img.shields.io/npm/l/@edx/frontend-build.svg)](https://github.com/edx-unsupported/frontend-base/blob/master/LICENSE) +[![license](https://img.shields.io/npm/l/@openedx/frontend-build.svg)](https://github.com/edx-unsupported/frontend-base/blob/master/LICENSE) ## Purpose @@ -62,7 +62,7 @@ package.json: ... }, "devDependencies": { - "@edx/frontend-build": "1.0.0" + "@openedx/frontend-build": "1.0.0" } } @@ -84,14 +84,14 @@ files or supplying your own wholesale. Method 1: Extend base config (babel.config.js): - const { createConfig } = require('@edx/frontend-build'); + const { createConfig } = require('@openedx/frontend-build'); module.exports = createConfig('babel', { /* option overrides or extensions */ }); Method 2: Custom manipulations (babel.config.js): - const { getBaseConfig } = require('@edx/frontend-build'); + const { getBaseConfig } = require('@openedx/frontend-build'); const config = getBaseConfig('babel'); /* Custom config manipulations */ @@ -133,7 +133,7 @@ if you need to do this and are running into problems. The development webpack configuration allows engineers to create a \"module.config.js\" file containing local module overrides. This means that if you\'re developing a new feature in a shared library -(\@edx/frontend-platform, \@edx/paragon, etc.), you can add the local +(\@edx/frontend-platform, \@openedx/paragon, etc.), you can add the local location of that repository to your module.config.js file and the webpack build for your application will automatically pick it up and use it, rather than its node\_modules version of the file. @@ -155,10 +155,10 @@ frontend-platform: dist: The sub-directory of the source code where it puts its build artifact. Often "dist". */ localModules: [ - { moduleName: '@edx/brand', dir: '../src/brand-openedx' }, // replace with your brand checkout - { moduleName: '@edx/paragon/scss/core', dir: '../src/paragon', dist: 'scss/core' }, - { moduleName: '@edx/paragon/icons', dir: '../src/paragon', dist: 'icons' }, - { moduleName: '@edx/paragon', dir: '../src/paragon', dist: 'dist' }, + { moduleName: '@openedx/brand', dir: '../src/brand-openedx' }, // replace with your brand checkout + { moduleName: '@openedx/paragon/scss/core', dir: '../src/paragon', dist: 'scss/core' }, + { moduleName: '@openedx/paragon/icons', dir: '../src/paragon', dist: 'icons' }, + { moduleName: '@openedx/paragon', dir: '../src/paragon', dist: 'dist' }, { moduleName: '@edx/frontend-platform', dir: '../src/frontend-platform', dist: 'dist' }, ], }; @@ -232,7 +232,7 @@ project you can do the following: modules folder `mv ../frontend-build ./ && rm -rf frontend-build/node_modules` 3. Install the development version of frontend-build - `npm i --save-dev @edx/frontend-build@file:./frontend-build`. + `npm i --save-dev @openedx/frontend-build@file:./frontend-build`. ## License diff --git a/bin/fedx-scripts.js b/bin/fedx-scripts.js index 653e379f9..d3257831d 100755 --- a/bin/fedx-scripts.js +++ b/bin/fedx-scripts.js @@ -70,7 +70,7 @@ switch (commandName) { break; case 'formatjs': { const commonArgs = [ - '--format', 'node_modules/@edx/frontend-build/lib/formatter.js', + '--format', 'node_modules/@openedx/frontend-build/lib/formatter.js', '--ignore', 'src/**/*.json', '--out-file', './temp/babel-plugin-formatjs/Default.messages.json', '--', 'src/**/*.js*', diff --git a/config/getLocalAliases.js b/config/getLocalAliases.js index 3a39f1af0..faf75bfe9 100644 --- a/config/getLocalAliases.js +++ b/config/getLocalAliases.js @@ -20,8 +20,8 @@ The module.config.js file should have the form: Some working examples, as of the time of this writing: -{ moduleName: '@edx/paragon/scss', dir: '../paragon', dist: 'scss' } -{ moduleName: '@edx/paragon', dir: '../paragon', dist: 'dist' } +{ moduleName: '@openedx/paragon/scss', dir: '../paragon', dist: 'scss' } +{ moduleName: '@openedx/paragon', dir: '../paragon', dist: 'dist' } { moduleName: '@edx/frontend-platform', dir: '../frontend-platform', dist: 'dist' } */