chore: rename project type from bonfire to jsProject (#46823)
* change bonfire in index.js * change bonfire in build.js * change bonfire in challenge-types.js * change bonfire in test-challenges.js * add jsProject to constants.jspull/46850/head
parent
237f11be8b
commit
f61b227665
|
@ -160,7 +160,7 @@ export const challengeDataSelector = state => {
|
|||
let challengeData = { challengeType };
|
||||
if (
|
||||
challengeType === challengeTypes.js ||
|
||||
challengeType === challengeTypes.bonfire
|
||||
challengeType === challengeTypes.jsProject
|
||||
) {
|
||||
challengeData = {
|
||||
...challengeData,
|
||||
|
|
|
@ -66,7 +66,7 @@ function checkFilesErrors(challengeFiles) {
|
|||
|
||||
const buildFunctions = {
|
||||
[challengeTypes.js]: buildJSChallenge,
|
||||
[challengeTypes.bonfire]: buildJSChallenge,
|
||||
[challengeTypes.jsProject]: buildJSChallenge,
|
||||
[challengeTypes.html]: buildDOMChallenge,
|
||||
[challengeTypes.modern]: buildDOMChallenge,
|
||||
[challengeTypes.backend]: buildBackendChallenge,
|
||||
|
@ -237,7 +237,7 @@ export function challengeHasPreview({ challengeType }) {
|
|||
export function isJavaScriptChallenge({ challengeType }) {
|
||||
return (
|
||||
challengeType === challengeTypes.js ||
|
||||
challengeType === challengeTypes.bonfire
|
||||
challengeType === challengeTypes.jsProject
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ const backend = 2;
|
|||
const zipline = 3;
|
||||
const frontEndProject = 3;
|
||||
const backEndProject = 4;
|
||||
const bonfire = 5;
|
||||
const jsProject = 5;
|
||||
const modern = 6;
|
||||
const step = 7;
|
||||
const quiz = 8;
|
||||
|
@ -30,7 +30,7 @@ exports.challengeTypes = {
|
|||
frontEndProject,
|
||||
backEndProject,
|
||||
pythonProject,
|
||||
bonfire,
|
||||
jsProject,
|
||||
modern,
|
||||
step,
|
||||
quiz,
|
||||
|
@ -57,13 +57,13 @@ exports.isProject = challengeType => {
|
|||
exports.pathsMap = {
|
||||
[html]: 'html',
|
||||
[js]: 'js',
|
||||
[bonfire]: 'js'
|
||||
[jsProject]: 'js'
|
||||
};
|
||||
// determine the component to view for each challenge
|
||||
exports.viewTypes = {
|
||||
[html]: 'classic',
|
||||
[js]: 'classic',
|
||||
[bonfire]: 'classic',
|
||||
[jsProject]: 'classic',
|
||||
[frontEndProject]: 'frontend',
|
||||
[backEndProject]: 'backend',
|
||||
[pythonProject]: 'frontend',
|
||||
|
@ -81,7 +81,7 @@ exports.viewTypes = {
|
|||
exports.submitTypes = {
|
||||
[html]: 'tests',
|
||||
[js]: 'tests',
|
||||
[bonfire]: 'tests',
|
||||
[jsProject]: 'tests',
|
||||
// requires just a single url
|
||||
// like codepen.com/my-project
|
||||
[frontEndProject]: 'project.frontEnd',
|
||||
|
|
|
@ -60,6 +60,7 @@ let blocklist = [
|
|||
'completed-bonfire',
|
||||
'completed-challenge',
|
||||
'completed-field-guide',
|
||||
'completed-jsProject',
|
||||
'completed-zipline-or-basejump',
|
||||
'copyright-policy',
|
||||
'copyright',
|
||||
|
@ -79,6 +80,7 @@ let blocklist = [
|
|||
'internal',
|
||||
'jobs-form',
|
||||
'jobs',
|
||||
'jsProject',
|
||||
'learn-to-code',
|
||||
'learn',
|
||||
'login',
|
||||
|
|
|
@ -435,7 +435,7 @@ ${inspect(commentMap)}
|
|||
if (
|
||||
challengeType !== challengeTypes.html &&
|
||||
challengeType !== challengeTypes.js &&
|
||||
challengeType !== challengeTypes.bonfire &&
|
||||
challengeType !== challengeTypes.jsProject &&
|
||||
challengeType !== challengeTypes.modern &&
|
||||
challengeType !== challengeTypes.backend
|
||||
) {
|
||||
|
@ -464,7 +464,7 @@ ${inspect(commentMap)}
|
|||
|
||||
const buildChallenge =
|
||||
challengeType === challengeTypes.js ||
|
||||
challengeType === challengeTypes.bonfire
|
||||
challengeType === challengeTypes.jsProject
|
||||
? buildJSChallenge
|
||||
: buildDOMChallenge;
|
||||
|
||||
|
|
Loading…
Reference in New Issue