ember-welcome-page
Version:
Welcome page for Ember CLI applications
1 lines • 4.42 kB
Source Map (JSON)
{"version":3,"file":"welcome-page.js","sources":["../../src/components/welcome-page.hbs.js","../../src/components/welcome-page.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<main id=\\\"ember-welcome-page-id-selector\\\">\\n <div class=\\\"columns\\\">\\n <div class=\\\"tomster\\\">\\n <img src=\\\"{{this.rootURL}}ember-welcome-page/images/construction.png\\\" alt=\\\"Under construction\\\">\\n </div>\\n <div class=\\\"welcome\\\">\\n <h1 id=\\\"title\\\">Congratulations, you made it!</h1>\\n\\n <p>You’ve officially spun up your Ember app. You’ve got one more decision to make: what do you want to do next? We’d suggest one of the following to help you get going:</p>\\n <ul>\\n <li><a href=\\\"{{this.urlForEmberGuides}}/getting-started/quick-start/\\\">Quick Start</a> - a quick introduction to how Ember works. Learn about defining your first route, writing a UI component and deploying your application.</li>\\n <li><a href=\\\"{{this.urlForEmberGuides}}/tutorial/\\\">Tutorial</a> - this is our more thorough, hands-on intro to Ember. Your crash course in Ember philosophy, background and some in-depth discussion of how things work (and why they work the way they do).</li>\\n </ul>\\n <p>If you run into problems, please join <a href=\\\"https://discord.gg/emberjs\\\">our community\\'s Discord server</a> or visit <a href=\\\"http://discuss.emberjs.com/\\\">our forums</a> for ideas and answers— our community is filled with friendly folks who are willing to help! We enjoy helping new Ember developers get started, and our <a href=\\\"https://emberjs.com/community/\\\">Ember Community</a> is incredibly supportive.</p>\\n </div>\\n </div>\\n <p class=\\\"postscript\\\">To remove this welcome message, remove the\\n <code>\\n <WelcomePage />\\n </code>\\n component from your\\n <code>\\n app/templates/application.hbs\\n </code>\\n file and save it...you\\'ll see this page update soon after!\\n </p>\\n</main>\\n\\n\")","import { getOwner } from '@ember/application';\n/* @ts-expect-error: Cannot find module '@ember/version' or its corresponding type declarations. */\nimport { VERSION } from '@ember/version';\nimport Component from '@glimmer/component';\nimport './welcome-page.css';\n\nfunction isLatestVersion(): boolean {\n const stableRegex = /^\\d+\\.\\d+\\.\\d+$/;\n\n return !stableRegex.test(VERSION as string);\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-empty-interface */\ninterface WelcomePageComponentSignature {}\n\nexport default class WelcomePageComponent extends Component<WelcomePageComponentSignature> {\n get rootURL(): string {\n const config = getOwner(this).factoryFor('config:environment');\n\n if (config) {\n return (config.class as unknown as { rootURL: string }).rootURL;\n }\n\n return '/';\n }\n\n get urlForEmberGuides(): string {\n if (isLatestVersion()) {\n return `https://guides.emberjs.com/release`;\n }\n\n const [majorVersion, minorVersion] = (VERSION as string).split('.');\n const emberVersion = `${majorVersion}.${minorVersion}.0`;\n\n return `https://guides.emberjs.com/v${emberVersion}`;\n }\n}\n"],"names":["precompileTemplate","isLatestVersion","stableRegex","test","VERSION","WelcomePageComponent","Component","rootURL","config","getOwner","factoryFor","class","urlForEmberGuides","majorVersion","minorVersion","split","emberVersion","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AACA,eAAeA,kBAAkB,CAAC,gwDAAgwD,CAAC;;ACKnyD,SAASC,eAAeA,GAAY;EAClC,MAAMC,WAAW,GAAG,iBAAiB,CAAA;AAErC,EAAA,OAAO,CAACA,WAAW,CAACC,IAAI,CAACC,OAAiB,CAAC,CAAA;AAC7C,CAAA;;AAEA;;AAGe,MAAMC,oBAAoB,SAASC,SAAS,CAAgC;EACzF,IAAIC,OAAOA,GAAW;IACpB,MAAMC,MAAM,GAAGC,QAAQ,CAAC,IAAI,CAAC,CAACC,UAAU,CAAC,oBAAoB,CAAC,CAAA;AAE9D,IAAA,IAAIF,MAAM,EAAE;AACV,MAAA,OAAQA,MAAM,CAACG,KAAK,CAAoCJ,OAAO,CAAA;AACjE,KAAA;AAEA,IAAA,OAAO,GAAG,CAAA;AACZ,GAAA;EAEA,IAAIK,iBAAiBA,GAAW;IAC9B,IAAIX,eAAe,EAAE,EAAE;AACrB,MAAA,OAAQ,CAAmC,kCAAA,CAAA,CAAA;AAC7C,KAAA;IAEA,MAAM,CAACY,YAAY,EAAEC,YAAY,CAAC,GAAIV,OAAO,CAAYW,KAAK,CAAC,GAAG,CAAC,CAAA;AACnE,IAAA,MAAMC,YAAY,GAAI,CAAA,EAAEH,YAAa,CAAA,CAAA,EAAGC,YAAa,CAAG,EAAA,CAAA,CAAA;IAExD,OAAQ,CAAA,4BAAA,EAA8BE,YAAa,CAAC,CAAA,CAAA;AACtD,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EArBoBb,oBAAoB,CAAA;;;;"}