Skip to content

Commit

Permalink
chore(renaming): 🚚 rename to adaptui
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed May 30, 2022
1 parent 95e1d60 commit ad95b04
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 92 deletions.
7 changes: 3 additions & 4 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"projectName": "renderlesskit-react",
"projectOwner": "timelessco",
"projectName": "react",
"projectOwner": "adaptui",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
"files": [ "README.md"
],
"imageSize": 100,
"commit": true,
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@renderlesskit/react",
"version": "1.0.0-2",
"name": "@adaptui/react",
"version": "1.0.0",
"description": "Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit",
"keywords": [
"renderless",
Expand All @@ -14,13 +14,13 @@
"nostyle",
"composable"
],
"homepage": "https://github.com/timelessco/renderlesskit-react#readme",
"homepage": "https://github.com/adaptui/react#readme",
"bugs": {
"url": "https://github.com/timelessco/renderlesskit-react/issues"
"url": "https://github.com/adaptui/react/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/timelessco/renderlesskit-react.git"
"url": "git+https://github.com/adaptui/react.git"
},
"license": "MIT",
"author": "Timeless <hello@timeless.co>",
Expand Down
8 changes: 0 additions & 8 deletions scripts/builds/keys.js

This file was deleted.

73 changes: 0 additions & 73 deletions scripts/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,82 +309,9 @@ function reduceKeys(acc, [moduleName, array]) {
return `${acc}export ${finalString}`;
}

/**
* Create __keys.json files
* @param {string} rootPath
*/
function makeKeys(rootPath) {
const pkg = getPackage(rootPath);

const filesByModules = getPublicFilesByModules(getSourcePath(rootPath));
const project = new Project({
tsConfigFilePath: join(rootPath, "tsconfig.json"),
addFilesFromTsConfig: false,
});
const created = [];

Object.entries(filesByModules).forEach(([modulePath, paths]) => {
const sourceFiles = project.addSourceFilesAtPaths(paths);
const keys = {};
const stateKeys = [];

sortSourceFiles(sourceFiles).forEach(sourceFile => {
sourceFile.forEachChild(node => {
if (isStateReturnDeclaration(node) || isOptionsDeclaration(node)) {
const literalNode = isOptionsDeclaration(node)
? getLiteralNode(node)
: node;
const props = literalNode ? getPropsNames(literalNode, true) : [];
if (isStateReturnDeclaration(node)) {
for (const prop of props) {
if (!stateKeys.includes(prop)) {
stateKeys.push(prop);
}
}
keys[getModuleName(node)] = props;
} else {
keys[getModuleName(node)] = [...stateKeys, ...props];
}
}
if (isInitialStateDeclaration(node)) {
const literalNode = isOptionsDeclaration(node)
? getLiteralNode(node)
: node;
const props = literalNode ? getPropsNames(literalNode, true) : [];
keys[getModuleName(node)] = props;
}
});
});

if (!Object.keys(keys).length) return;

const normalizedKeys = replaceSubsetInObject(sortStateSets(keys));
const contents = Object.entries(normalizedKeys).reduce(reduceKeys, "");
created.push(chalk.bold(chalk.green(basename(modulePath))));

writeFileSync(
join(modulePath, "__keys.ts"),
prettier.format(`// Automatically generated\n${contents}`, {
parser: "babel-ts",
}),
);
});

if (created.length) {
log(
[
"",
`Generated keys in ${chalk.bold(pkg.name)}:`,
`${created.join(", ")}`,
].join("\n"),
);
}
}

module.exports = {
getPackage,
hasTSConfig,
makeKeys,
getProps,
getEscapedName,
getModuleName,
Expand Down
4 changes: 2 additions & 2 deletions src/toast/stories/ToastReactSpring.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ContentType,
getRandomContent,
getRandomType,
Toast as RenderlesskitToast,
Toast as AdaptUIToast,
ToastBar,
ToastProvider,
TriggerButton,
Expand Down Expand Up @@ -117,7 +117,7 @@ export function ToastTriggers() {

const SpringAnimationWrapper: React.FC<
React.PropsWithChildren<{
toast: RenderlesskitToast;
toast: AdaptUIToast;
}>
> = props => {
const {
Expand Down

1 comment on commit ad95b04

@vercel
Copy link

@vercel vercel bot commented on ad95b04 May 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react – ./

react-timelessco.vercel.app
react-blush-nine.vercel.app
react-git-main-timelessco.vercel.app

Please sign in to comment.