Skip to content

Commit

Permalink
fix: Update some scripts and docs.
Browse files Browse the repository at this point in the history
* Update the `fedx-scripts.js` script to point to the correct formatter
location.
* Update readme and comments.
  • Loading branch information
feanil committed Dec 15, 2023
1 parent d6868bc commit 6b1211f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -62,7 +62,7 @@ package.json:
...
},
"devDependencies": {
"@edx/frontend-build": "1.0.0"
"@openedx/frontend-build": "1.0.0"
}
}

Expand All @@ -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 */
Expand Down Expand Up @@ -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.
Expand All @@ -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' },
],
};
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion bin/fedx-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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*',
Expand Down
4 changes: 2 additions & 2 deletions config/getLocalAliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
*/
Expand Down

0 comments on commit 6b1211f

Please sign in to comment.