Skip to content

Commit 9885d1a

Browse files
refactor: move browser-script output into client (freeCodeCamp#51422)
1 parent 569ace0 commit 9885d1a

File tree

8 files changed

+19
-17
lines changed

8 files changed

+19
-17
lines changed

.gitignore

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,6 @@ jspm_packages/
158158

159159
### Generated config files ###
160160
config/env.json
161-
config/client/sass-compile.json
162-
config/client/frame-runner.json
163-
config/client/test-evaluator.json
164-
config/client/python-runner.json
165161
config/curriculum.json
166162
config/i18n.js
167163
config/misc.js
@@ -216,18 +212,11 @@ tags
216212
*.out
217213
*.gz
218214
curriculum/curricula.json
219-
client/static/js/frame-runner.js
220-
client/static/js/frame-runner.js.map
221215

222216
### Additional Folders ###
223217
api-server/lib/*
224218
curriculum/dist
225219
curriculum/build
226-
client/static/_redirects
227-
client/static/mobile
228-
client/static/curriculum-data
229-
client/i18n/locales/**/trending.json
230-
client/src/components/Donation/types.js
231220

232221
### UI Components ###
233222
tools/ui-components/dist

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
**/public
33
client/static
44
client/**/trending.json
5+
client/config/browser-scripts/*.json
56
**/*fixtures*
67
curriculum/challenges/_meta/*/*
78
curriculum/challenges/**/*

client/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,12 @@ yarn-error.log
99

1010
/static/js
1111
./static/_redirects
12+
static/curriculum-data
13+
14+
# Generated config
15+
config/browser-scripts/*.json
16+
i18n/locales/**/trending.json
17+
18+
# TODO: Remove once you've figured out why it's generated.
19+
# JS that probably should not be generated
20+
src/components/Donation/types.js
File renamed without changes.

client/src/templates/Challenges/rechallenge/transformers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
stubTrue
1212
} from 'lodash-es';
1313

14-
import sassData from '../../../../../config/client/sass-compile.json';
14+
import sassData from '../../../../../client/config/browser-scripts/sass-compile.json';
1515
import {
1616
transformContents,
1717
transformHeadTailAndContents,

client/src/templates/Challenges/utils/build.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { challengeTypes } from '../../../../../config/challenge-types';
2-
import frameRunnerData from '../../../../../config/client/frame-runner.json';
3-
import testEvaluatorData from '../../../../../config/client/test-evaluator.json';
4-
import pythonRunnerData from '../../../../../config/client/python-runner.json';
2+
import frameRunnerData from '../../../../../client/config/browser-scripts/frame-runner.json';
3+
import testEvaluatorData from '../../../../../client/config/browser-scripts/test-evaluator.json';
4+
import pythonRunnerData from '../../../../../client/config/browser-scripts/python-runner.json';
55

66
import {
77
ChallengeFile as PropTypesChallengeFile,

curriculum/test/test-challenges.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const {
3434
const { challengeTypes } = require('../../config/challenge-types');
3535
// the config files are created during the build, but not before linting
3636
const testEvaluator =
37-
require('../../config/client/test-evaluator.json').filename;
37+
require('../../client/config/browser-scripts/test-evaluator.json').filename;
3838

3939
const { getLines } = require('../../utils/get-lines');
4040

tools/client-plugins/browser-scripts/webpack.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ const webpack = require('webpack');
66
module.exports = (env = {}) => {
77
const __DEV__ = env.production !== true;
88
const staticPath = path.join(__dirname, '../../../client/static/js');
9-
const configPath = path.join(__dirname, '../../../config/client');
9+
const configPath = path.join(
10+
__dirname,
11+
'../../../client/config/browser-scripts/'
12+
);
1013
return {
1114
cache: __DEV__ ? { type: 'filesystem' } : false,
1215
mode: __DEV__ ? 'development' : 'production',

0 commit comments

Comments
 (0)