Skip to content

Commit

Permalink
Merge pull request #1882 from niktek/fix/csa-rc-packages
Browse files Browse the repository at this point in the history
Fix/csa rc packages
  • Loading branch information
niktek committed Aug 16, 2023
2 parents e9b1f01 + 55f5112 commit feebf2d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/many-falcons-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-skeleton-app": patch
---

Fixed @rc pinning
15 changes: 5 additions & 10 deletions packages/create-skeleton-app/src/creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export class SkeletonOptions {
['postcss', 'latest'],
['autoprefixer', 'latest'],
['tailwindcss', 'latest'],
['@skeletonlabs/skeleton', 'latest'],
['@skeletonlabs/skeleton', '2.0.0-rc.1'],
['@skeletonlabs/tw-plugin', '0.0.1-rc.3'],
['vite-plugin-tailwind-purgecss', 'latest'],
]);

// props below are private to the Skeleton team
Expand Down Expand Up @@ -113,15 +115,8 @@ async function modifyPackageJson(opts) {
let pkgJson = JSON.parse(readFileSync(pkgPath));

// add required packages
for (const pkg of [
'postcss',
'autoprefixer',
'tailwindcss',
'@skeletonlabs/skeleton',
'@skeletonlabs/tw-plugin',
'vite-plugin-tailwind-purgecss',
]) {
setNestedValue(pkgJson, ['devDependencies', pkg], 'latest');
for (const [pkg, version] of opts.devDependencies) {
setNestedValue(pkgJson, ['devDependencies', pkg], version);
}

// Extra packages and scripts for a monorepo install
Expand Down
8 changes: 4 additions & 4 deletions packages/create-skeleton-app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import mri from 'mri';
import { bold, cyan, gray, grey, red } from 'kleur/colors';
import { intro, text, select, multiselect, spinner } from '@clack/prompts';
import { dist, getHelpText, goodbye, whichPMRuns, checkIfDirSafeToInstall } from './utils.js';
import path, { resolve, join } from 'path';
import { resolve, join, relative, dirname, basename } from 'path';
import semver from 'semver';
import fg from 'fast-glob';

Expand Down Expand Up @@ -71,7 +71,7 @@ async function main() {
}
let finalInstructions = bold(cyan(`\nDone! You can now:\n\n`));
if (startPath != opts.path) {
finalInstructions += bold(cyan(`cd ${path.relative(startPath, opts.path)}\n`));
finalInstructions += bold(cyan(`cd ${relative(startPath, opts.path)}\n`));
}
finalInstructions += bold(cyan(runString));
finalInstructions += grey(`Need some help or found an issue? Visit us on Discord https://discord.gg/EXqV7W8MtY`);
Expand Down Expand Up @@ -155,7 +155,7 @@ Problems? Open an issue on ${cyan('https://github.com/skeletonlabs/skeleton/issu
goodbye(opts.path);
}
// name to set in package.json
opts.name = opts.path;
opts.name = basename(opts.path);

// Skeleton Template Selection
// We have to ask for the template first as it may dictate things like required packages and typechecking
Expand Down Expand Up @@ -203,7 +203,7 @@ Problems? Open an issue on ${cyan('https://github.com/skeletonlabs/skeleton/issu
Object.assign(opts, val);
});
}
opts.skeletontemplatedir = path.dirname(opts.skeletontemplate);
opts.skeletontemplatedir = dirname(opts.skeletontemplate);

// If it's a premium template, wording needs to be change to indicate that there is a theme already built in
// Skeleton Theme Selection
Expand Down

0 comments on commit feebf2d

Please sign in to comment.