diff --git a/.all-contributorsrc b/.all-contributorsrc index d06869246a7..352fe9fb08f 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -317,6 +317,15 @@ "bug" ] }, + { + "login": "rax-public", + "name": "Rax Team", + "avatar_url": "https://avatars3.githubusercontent.com/u/59947214?v=4", + "profile": "https://github.com/rax-public", + "contributions": [ + "code" + ] + }, { "login": "tomkuehl", "name": "Tom Kühl", diff --git a/packages/common/src/components/SandboxCard/fixtures.ts b/packages/common/src/components/SandboxCard/fixtures.ts index 4e0f85b737b..39be9485612 100644 --- a/packages/common/src/components/SandboxCard/fixtures.ts +++ b/packages/common/src/components/SandboxCard/fixtures.ts @@ -129,6 +129,7 @@ export const templates: TemplateType[] = [ 'create-react-app', 'vue-cli', 'preact-cli', + 'rax', 'svelte', 'create-react-app-typescript', 'angular-cli', diff --git a/packages/common/src/templates/helpers/is-server.ts b/packages/common/src/templates/helpers/is-server.ts index 2ea5d58c68e..a619e304dec 100644 --- a/packages/common/src/templates/helpers/is-server.ts +++ b/packages/common/src/templates/helpers/is-server.ts @@ -13,6 +13,7 @@ const SERVER_TEMPLATE_NAMES = [ 'node', 'nuxt', 'quasar-framework', + 'rax', 'sapper', 'styleguidist', 'unibit', diff --git a/packages/common/src/templates/icons.ts b/packages/common/src/templates/icons.ts index 5cdda8b0366..f84635771c9 100644 --- a/packages/common/src/templates/icons.ts +++ b/packages/common/src/templates/icons.ts @@ -6,6 +6,7 @@ import { ReasonIcon, EmberIcon, PreactIcon, + // RaxIcon, VueIcon, SvelteIcon, DojoIcon, @@ -33,6 +34,7 @@ import { ember, vue, preact, + rax, reactTs, svelte, angular, @@ -68,6 +70,9 @@ export default function getIcon(theme: TemplateType) { return VueIcon; case preact.name: return PreactIcon; + case rax.name: + // return RaxIcon; + return ReactIcon; case reactTs.name: return ReactIcon; case svelte.name: diff --git a/packages/common/src/templates/iconsDark.ts b/packages/common/src/templates/iconsDark.ts index 39b488e5209..e434630fda5 100644 --- a/packages/common/src/templates/iconsDark.ts +++ b/packages/common/src/templates/iconsDark.ts @@ -6,6 +6,7 @@ import { ReasonIconDark, EmberIconDark, PreactIconDark, + // RaxIconDark, VueIconDark, SvelteIconDark, DojoIconDark, @@ -33,6 +34,7 @@ import { ember, vue, preact, + rax, reactTs, svelte, angular, @@ -68,6 +70,9 @@ export default function getIcon(theme: TemplateType) { return VueIconDark; case preact.name: return PreactIconDark; + case rax.name: + // return RaxIconDark; + return ReactIconDark; case reactTs.name: return ReactIconDark; case svelte.name: diff --git a/packages/common/src/templates/iconsLight.ts b/packages/common/src/templates/iconsLight.ts index 58d795919c8..ed2bba016fc 100644 --- a/packages/common/src/templates/iconsLight.ts +++ b/packages/common/src/templates/iconsLight.ts @@ -6,6 +6,7 @@ import { ReasonIconLight, EmberIconLight, PreactIconLight, + // RaxIconLight, VueIconLight, SvelteIconLight, DojoIconLight, @@ -33,6 +34,7 @@ import { ember, vue, preact, + rax, reactTs, svelte, angular, @@ -68,6 +70,9 @@ export default function getIcon(theme: TemplateType) { return VueIconLight; case preact.name: return PreactIconLight; + case rax.name: + // return RaxIconLight; + return ReactIconLight; case reactTs.name: return ReactIconLight; case svelte.name: diff --git a/packages/common/src/templates/index.ts b/packages/common/src/templates/index.ts index 32ff0c52f28..f4a93471bbd 100644 --- a/packages/common/src/templates/index.ts +++ b/packages/common/src/templates/index.ts @@ -2,6 +2,15 @@ import adonis from './adonis'; import angular from './angular'; import apollo from './apollo-server'; import babel from './babel'; +import parcel from './parcel'; +import preact from './preact'; +import rax from './rax'; +import reason from './reason'; +import react from './react'; +import reactTs from './react-ts'; +import svelte from './svelte'; +import vue from './vue'; +import ember from './ember'; import custom from './custom'; import cxjs from './cxjs'; import dojo from './dojo'; @@ -43,6 +52,7 @@ export { dojo, parcel, preact, + rax, react, reactTs, reason, @@ -65,6 +75,7 @@ export type TemplateType = | 'create-react-app' | 'vue-cli' | 'preact-cli' + | 'rax' | 'svelte' | 'create-react-app-typescript' | 'angular-cli' @@ -101,6 +112,8 @@ export default function getDefinition(theme?: TemplateType | null) { return vue; case preact.name: return preact; + case rax.name: + return rax; case reactTs.name: return reactTs; case svelte.name: diff --git a/packages/common/src/templates/rax.ts b/packages/common/src/templates/rax.ts new file mode 100644 index 00000000000..8bb885926eb --- /dev/null +++ b/packages/common/src/templates/rax.ts @@ -0,0 +1,21 @@ +import Template from './template'; +import { decorateSelector } from '../utils/decorate-selector'; + +export class RaxTemplate extends Template { + // The file to open by the editor + getDefaultOpenedFiles() { + return ['/src/app.js']; + } +} +export default new RaxTemplate( + 'rax', + 'Rax', + 'https://rax.js.org/', + 'github/raxjs/rax-codesandbox-template', + decorateSelector(() => '#FFB006'), + { + showOnHomePage: true, + distDir: 'build', + mainFile: [] + } +);