Skip to content

Commit

Permalink
chore: Renamed package to @codemod-utils/ember
Browse files Browse the repository at this point in the history
  • Loading branch information
ijlee2 committed Aug 28, 2024
1 parent e6a397a commit 2dbe4ea
Show file tree
Hide file tree
Showing 32 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ npx @codemod-utils/cli --name <your-codemod-name>
- [`@codemod-utils/ast-template`](./packages/ast/template/README.md)
- [`@codemod-utils/blueprints`](./packages/blueprints/README.md)
- [`@codemod-utils/cli`](./packages/cli/README.md)
- [`@codemod-utils/ember-cli-string`](./packages/ember-cli-string/README.md)
- [`@codemod-utils/ember`](./packages/ember/README.md)
- [`@codemod-utils/files`](./packages/files/README.md)
- [`@codemod-utils/json`](./packages/json/README.md)
- [`@codemod-utils/tests`](./packages/tests/README.md)
Expand Down
3 changes: 0 additions & 3 deletions packages/ember-cli-string/src/index.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changelog for @codemod-utils/ember-cli-string
# Changelog for @codemod-utils/ember

## 1.1.4

Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions packages/ember-cli-string/README.md → packages/ember/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[![This project uses GitHub Actions for continuous integration.](https://github.com/ijlee2/codemod-utils/actions/workflows/ci.yml/badge.svg)](https://github.com/ijlee2/codemod-utils/actions/workflows/ci.yml)

# @codemod-utils/ember-cli-string
# @codemod-utils/ember

_Utilities for string, as used by Ember CLI_
_Utilities for Ember_


## What is it?

`@codemod-utils/ember-cli-string` provides some methods from [`ember-cli-string-utils`](https://github.com/ember-cli/ember-cli-string-utils), ones that are practical for writing Ember codemods. The code have been simplified and support ESM.
`@codemod-utils/ember` provides methods that can help write codemods for Ember projects.


## API
Expand All @@ -22,7 +22,7 @@ The methods are built with the **entity name** in mind, a string (possibly with
Returns a string in camel-case.

```ts
import { camelize } from '@codemod-utils/ember-cli-string';
import { camelize } from '@codemod-utils/ember';

const newValue = camelize('css-class-name');

Expand All @@ -35,7 +35,7 @@ const newValue = camelize('css-class-name');
Returns a string that can be used to name a JavaScript `class` (a.k.a. Pascal case).

```ts
import { classify } from '@codemod-utils/ember-cli-string';
import { classify } from '@codemod-utils/ember';

const newValue = classify('ui/button');

Expand All @@ -48,7 +48,7 @@ const newValue = classify('ui/button');
Returns a string associated with the angle bracket syntax for components.

```ts
import { doubleColonize } from '@codemod-utils/ember-cli-string';
import { doubleColonize } from '@codemod-utils/ember';

const newValue = doubleColonize('ui/button');

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@codemod-utils/ember-cli-string",
"name": "@codemod-utils/ember",
"version": "1.1.4",
"description": "Utilities for string, as used by Ember CLI",
"description": "Utilities for Ember",
"keywords": [
"codemod",
"ember-codemod"
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions packages/ember/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './entity-name/camelize.js';
export * from './entity-name/classify.js';
export * from './entity-name/double-colonize.js';
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, test } from '@codemod-utils/tests';

import { camelize } from '../../../src/index.js';

test('utils | ember-cli-string | camelize > base case', function () {
test('entity-name | camelize > base case', function () {
assert.strictEqual(camelize('innerHTML'), 'innerHTML');
assert.strictEqual(camelize('action_name'), 'actionName');
assert.strictEqual(camelize('css-class-name'), 'cssClassName');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { assert, test } from '@codemod-utils/tests';

import { camelize } from '../../../src/index.js';

test('utils | ember-cli-string | camelize > edge case (empty string)', function () {
test('entity-name | camelize > edge case (empty string)', function () {
assert.strictEqual(camelize(''), '');
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, test } from '@codemod-utils/tests';

import { camelize } from '../../../src/index.js';

test('utils | ember-cli-string | camelize > edge case (entity name)', function () {
test('entity-name | camelize > edge case (entity name)', function () {
assert.strictEqual(camelize('tracks'), 'tracks');
assert.strictEqual(camelize('navigation-menu'), 'navigationMenu');
assert.strictEqual(camelize('ui/page'), 'ui/page');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, test } from '@codemod-utils/tests';

import { camelize } from '../../../src/index.js';

test('utils | ember-cli-string | camelize > edge case (spaces)', function () {
test('entity-name | camelize > edge case (spaces)', function () {
assert.strictEqual(camelize('my favorite items'), 'myFavoriteItems');
assert.strictEqual(camelize('My favorite items'), 'myFavoriteItems');
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, test } from '@codemod-utils/tests';

import { classify } from '../../../src/index.js';

test('utils | ember-cli-string | classify > base case', function () {
test('entity-name | classify > base case', function () {
assert.strictEqual(classify('innerHTML'), 'InnerHTML');
assert.strictEqual(classify('action_name'), 'ActionName');
assert.strictEqual(classify('css-class-name'), 'CssClassName');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { assert, test } from '@codemod-utils/tests';

import { classify } from '../../../src/index.js';

test('utils | ember-cli-string | classify > edge case (empty string)', function () {
test('entity-name | classify > edge case (empty string)', function () {
assert.strictEqual(classify(''), '');
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, test } from '@codemod-utils/tests';

import { classify } from '../../../src/index.js';

test('utils | ember-cli-string | classify > edge case (entity name)', function () {
test('entity-name | classify > edge case (entity name)', function () {
assert.strictEqual(classify('tracks'), 'Tracks');
assert.strictEqual(classify('navigation-menu'), 'NavigationMenu');
assert.strictEqual(classify('ui/page'), 'UiPage');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, test } from '@codemod-utils/tests';

import { classify } from '../../../src/index.js';

test('utils | ember-cli-string | classify > edge case (periods)', function () {
test('entity-name | classify > edge case (periods)', function () {
assert.strictEqual(classify('aa.bb.cc'), 'Aa.Bb.Cc');
assert.strictEqual(classify('aa.b/b.cc'), 'Aa.BB.Cc');
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, test } from '@codemod-utils/tests';

import { classify } from '../../../src/index.js';

test('utils | ember-cli-string | classify > edge case (spaces)', function () {
test('entity-name | classify > edge case (spaces)', function () {
assert.strictEqual(classify('my favorite items'), 'MyFavoriteItems');
assert.strictEqual(classify('My favorite items'), 'MyFavoriteItems');
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, test } from '@codemod-utils/tests';

import { doubleColonize } from '../../../src/index.js';

test('utils | ember-cli-string | double-colonize > base case', function () {
test('entity-name | double-colonize > base case', function () {
assert.strictEqual(doubleColonize('innerHTML'), 'InnerHTML');
assert.strictEqual(doubleColonize('action_name'), 'ActionName');
assert.strictEqual(doubleColonize('css-class-name'), 'CssClassName');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { assert, test } from '@codemod-utils/tests';

import { doubleColonize } from '../../../src/index.js';

test('utils | ember-cli-string | double-colonize > edge case (empty string)', function () {
test('entity-name | double-colonize > edge case (empty string)', function () {
assert.strictEqual(doubleColonize(''), '');
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, test } from '@codemod-utils/tests';

import { doubleColonize } from '../../../src/index.js';

test('utils | ember-cli-string | double-colonize > edge case (entity name)', function () {
test('entity-name | double-colonize > edge case (entity name)', function () {
assert.strictEqual(doubleColonize('tracks'), 'Tracks');
assert.strictEqual(doubleColonize('navigation-menu'), 'NavigationMenu');
assert.strictEqual(doubleColonize('ui/page'), 'Ui::Page');
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ packages:
- packages/ast/template
- packages/blueprints
- packages/cli
- packages/ember-cli-string
- packages/ember
- packages/files
- packages/json
- packages/tests

0 comments on commit 2dbe4ea

Please sign in to comment.