@lucaismyname/create-l1-stack 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +9 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucaismyname/create-l1-stack",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/index.js CHANGED
@@ -11,7 +11,6 @@ import { execa } from 'execa'
11
11
  import * as tar from 'tar'
12
12
 
13
13
  const TEMPLATE_PKG_TS = '@lucaismyname/l1-template-ts'
14
- const TEMPLATE_PKG_JS = '@lucaismyname/l1-template-js'
15
14
  const TEMPLATE_PATH_PREFIX = 'package/template/'
16
15
 
17
16
  const THEME_PRESETS = {
@@ -452,12 +451,12 @@ async function applyLayout(targetDir, language, layoutKey, containerPresetKey) {
452
451
  "import TopNav from './components/TopNav'\nimport { ErrorBoundary } from './components/ErrorBoundary'\n"
453
452
  )
454
453
  }
455
- // if (!next.includes("./pages/NotFound")) {
456
- // next = next.replace(
457
- // /import Integrations from '\.\/pages\/Integrations'\n/,
458
- // "import Integrations from './pages/Integrations'\nimport NotFound from './pages/NotFound'\n"
459
- // )
460
- // }
454
+ if (!next.includes("./pages/NotFound")) {
455
+ next = next.replace(
456
+ /import QuickStart from '\.\/pages\/QuickStart'\n/,
457
+ "import QuickStart from './pages/QuickStart'\nimport NotFound from './pages/NotFound'\n"
458
+ )
459
+ }
461
460
  next = next.replace(
462
461
  /<Routes>[\s\S]*?<\/Routes>/m,
463
462
  `<ErrorBoundary>\n <Routes>\n <Route path="/" element={<Home />} />\n <Route path="/quick-start" element={<QuickStart />} />\n <Route path="*" element={<NotFound />} />\n </Routes>\n </ErrorBoundary>`
@@ -609,18 +608,7 @@ async function main() {
609
608
  process.exit(1)
610
609
  }
611
610
 
612
- const language = await select({
613
- message: 'Use JavaScript or TypeScript?',
614
- options: [
615
- { value: 'ts', label: 'TypeScript' },
616
- { value: 'js', label: 'JavaScript' },
617
- ],
618
- initialValue: 'ts',
619
- })
620
- if (isCancel(language)) {
621
- cancel('Cancelled')
622
- process.exit(0)
623
- }
611
+ const language = 'ts'
624
612
 
625
613
  const primaryColor = await select({
626
614
  message: 'Primary color',
@@ -740,7 +728,7 @@ async function main() {
740
728
  const templateDir = path.resolve(
741
729
  cliDir,
742
730
  '../../../templates',
743
- language === 'ts' ? 'l1-stack-ts' : 'l1-stack-js'
731
+ 'l1-stack-ts'
744
732
  )
745
733
 
746
734
  if (!(await pathExists(templateDir))) {
@@ -756,7 +744,7 @@ async function main() {
756
744
  },
757
745
  })
758
746
  } else {
759
- const templatePackageName = language === 'ts' ? TEMPLATE_PKG_TS : TEMPLATE_PKG_JS
747
+ const templatePackageName = TEMPLATE_PKG_TS
760
748
  try {
761
749
  await downloadAndExtractTemplate(templatePackageName, targetDir)
762
750
  } catch (err) {