diff --git a/.all-contributorsrc b/.all-contributorsrc index a1f6f86bb73..ce8989a67f5 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..8dbc6c94097 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,8 @@ export default function getIcon(theme: TemplateType) { return VueIcon; case preact.name: return PreactIcon; + // case rax.name: + // return RaxIcon; case reactTs.name: return ReactIcon; case svelte.name: diff --git a/packages/common/src/templates/index.ts b/packages/common/src/templates/index.ts index e6cbb01f346..c3892bc6caa 100644 --- a/packages/common/src/templates/index.ts +++ b/packages/common/src/templates/index.ts @@ -3,6 +3,7 @@ import angular from './angular'; 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'; @@ -43,6 +44,7 @@ export { dojo, parcel, preact, + rax, react, reactTs, reason, @@ -65,6 +67,7 @@ export type TemplateType = | 'create-react-app' | 'vue-cli' | 'preact-cli' + | 'rax' | 'svelte' | 'create-react-app-typescript' | 'angular-cli' @@ -101,6 +104,8 @@ export default function getDefinition(theme?: TemplateType) { 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: [] + } +);