Skip to content

Commit

Permalink
chore(path): change example path from example to examples
Browse files Browse the repository at this point in the history
- change to examples because it contains many examples
  • Loading branch information
imjuni committed Jun 2, 2024
1 parent 5c94e77 commit 8e17e2b
Show file tree
Hide file tree
Showing 154 changed files with 89 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
es6: true,
node: true,
},
ignorePatterns: ['__test__/*', '__tests__/*', 'example/*', 'coverage/*', 'dist/*'],
ignorePatterns: ['__test__/*', '__tests__/*', 'examples/*', 'coverage/*', 'dist/*'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.eslint.json',
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ The mode in which the `barrel` file is to be generated. There is a create mode t
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
| ![bundle mode](static/img/bundle-mode.png) | ![create mode](static/img/create-mode.png) | ![module mode](static/img/module-mode.png) |

Check out the `.ctirc` in [example/type10](https://github.com/imjuni/ctix/blob/master/example/type10/.ctirc) to see how to utilize the `module` mode.
Check out the `.ctirc` in [examples/type10](https://github.com/imjuni/ctix/blob/master/examples/type10/.ctirc) to see how to utilize the `module` mode.

### How can I exclude unwanted files?

Expand Down
2 changes: 1 addition & 1 deletion doc/IN_DEPTH_FONT.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ In this case, the TypeScript Compiler API reads the `DeclareTftModule.d.ts` file
export * from './WildcardDeclaration';
```

You can see an example at [example/type09](https://github.com/imjuni/ctix/tree/master/example/type09)
You can see an example at [examples/type09](https://github.com/imjuni/ctix/tree/master/examples/type09)
6 changes: 3 additions & 3 deletions doc/IN_DEPTH_GEN_STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Configuration for entire project.
"options": [
{
"mode": "bundle",
"project": "example/type10/tsconfig.json",
"project": "examples/type10/tsconfig.json",
"exportFilename": "index.ts",
"useSemicolon": true,
"useBanner": false,
Expand All @@ -53,8 +53,8 @@ Configuration for entire project.
"include": ["**/*.ts"],
"exclude": [],
"skipEmptyDir": true,
"startFrom": "/Users/imjuni/project/github/ctix/ctix/example/type10",
"output": "example/type10",
"startFrom": "[...your path]/examples/type10",
"output": "examples/type10",
"removeBackup": false,
"forceYes": false
}
Expand Down
2 changes: 1 addition & 1 deletion doc/IN_DEPTH_VUE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ ctix does not yet automatically generate `index.ts` files for Vue.js component f
export * from './components/index';
```

You can see an example at [example/type10](https://github.com/imjuni/ctix/tree/master/example/type10)
You can see an example at [examples/type10](https://github.com/imjuni/ctix/tree/master/examples/type10)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@
"pretty": true
},
"include": ["*.ts"],
"exclude": ["example/**", "dist/**", "**/erdia_eg", "**/.configs/**", "**/docs/**/*"]
"exclude": ["examples/**", "dist/**", "**/erdia_eg", "**/.configs/**", "**/docs/**/*"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@
"pretty": true
},
"include": ["src/**/*.ts"],
"exclude": ["example/**", "dist/**", "**/erdia_eg", "**/.configs/**", "**/docs/**/*"]
"exclude": ["examples/**", "dist/**", "**/erdia_eg", "**/.configs/**", "**/docs/**/*"]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions example/type10/.ctirc → examples/type10/.ctirc
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"options": [
{
"mode": "module",
"project": "example/type10/tsconfig.json",
"project": "examples/type10/tsconfig.json",
"exportFilename": "index.ts",
"directive": "/// <reference path=\"../types/vue.d.ts\" />",
"output": "example/type10/components",
"output": "examples/type10/components",
"overwrite": true,
"backup": false,
"include": ["components/**/*.vue"]
},
{
"mode": "bundle",
"project": "example/type10/tsconfig.json",
"project": "examples/type10/tsconfig.json",
"exportFilename": "index.ts",
"useSemicolon": true,
"useBanner": false,
Expand All @@ -29,8 +29,8 @@
"include": ["**/*.ts"],
"exclude": [],
"skipEmptyDir": true,
"startFrom": "/Users/imjuni/project/github/ctix/ctix/example/type10",
"output": "example/type10",
"startFrom": "./examples/type10",
"output": "examples/type10",
"removeBackup": false,
"forceYes": false
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/comments/__tests__/inline.comment.parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ vitest.mock('comment-parser', async (importOriginal) => {
};
});

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
2 changes: 1 addition & 1 deletion src/comments/__tests__/inline.excluded.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
2 changes: 1 addition & 1 deletion src/comments/__tests__/inline.generation.style.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vitest.mock('comment-parser', async (importOriginal) => {
};
});

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
2 changes: 1 addition & 1 deletion src/comments/__tests__/node.comments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { randomUUID } from 'crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it, vitest } from 'vitest';

const tsconfigDirPath = posixJoin(process.cwd(), 'example');
const tsconfigDirPath = posixJoin(process.cwd(), 'examples');
const tsconfigFilePath = posixJoin(tsconfigDirPath, 'tsconfig.example.json');
const context = {
tsconfig: tsconfigFilePath,
Expand Down
2 changes: 1 addition & 1 deletion src/compilers/__tests__/export.assignement.map.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { randomUUID } from 'crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigDirPath = posixJoin(process.cwd(), 'example');
const tsconfigDirPath = posixJoin(process.cwd(), 'examples');
const tsconfigFilePath = posixJoin(tsconfigDirPath, 'tsconfig.example.json');
const context = {
tsconfig: tsconfigFilePath,
Expand Down
2 changes: 1 addition & 1 deletion src/compilers/__tests__/export.kind.exception.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { beforeAll, describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context: {
tsconfig: string;
project: tsm.Project;
Expand Down
2 changes: 1 addition & 1 deletion src/compilers/__tests__/export.statement.summary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
2 changes: 1 addition & 1 deletion src/compilers/__tests__/export.statements.class.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
2 changes: 1 addition & 1 deletion src/compilers/__tests__/export.statements.enum.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
2 changes: 1 addition & 1 deletion src/compilers/__tests__/export.statements.function.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
2 changes: 1 addition & 1 deletion src/compilers/__tests__/export.statements.literal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
2 changes: 1 addition & 1 deletion src/compilers/__tests__/export.statements.module.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { beforeAll, describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context: {
tsconfig: string;
project: tsm.Project;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { beforeAll, describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context: {
tsconfig: string;
project: tsm.Project;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
2 changes: 1 addition & 1 deletion src/compilers/__tests__/export.statements.variable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
2 changes: 1 addition & 1 deletion src/compilers/__tests__/is.declaration.file.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
2 changes: 1 addition & 1 deletion src/compilers/__tests__/symbol.table.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { randomUUID } from 'node:crypto';
import * as tsm from 'ts-morph';
import { describe, expect, it } from 'vitest';

const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const context = {
tsconfig: tsconfigPath,
project: new tsm.Project({
Expand Down
10 changes: 5 additions & 5 deletions src/compilers/__tests__/tsconfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@ import { describe, expect, it } from 'vitest';

describe('getTypeScriptConfig', () => {
it('reading pass', () => {
const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.example.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.example.json');
const config = getTypeScriptConfig(tsconfigPath);
console.log(config);
console.log(config.raw);
});

it('reading pass', () => {
const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.empty.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.empty.json');
const config = getTypeScriptConfig(tsconfigPath);
console.log(config.raw);
});
});

describe('getFileScope', () => {
it('empty scope', () => {
const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.empty.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.empty.json');
const config = getTypeScriptConfig(tsconfigPath);
const scopes = getFileScope(config.raw);

expect(scopes).toMatchObject({ include: [], exclude: [] });
});

it('file scope', () => {
const tsconfigPath = posixJoin(process.cwd(), 'example', 'tsconfig.for.test.json');
const tsconfigPath = posixJoin(process.cwd(), 'examples', 'tsconfig.for.test.json');
const config = getTypeScriptConfig(tsconfigPath);
const scopes = getFileScope(config.raw);

expect(scopes).toMatchObject({
include: ['src/**/*.ts'],
exclude: ['example/**', 'dist/**', '**/erdia_eg', '**/.configs/**', '**/docs/**/*'],
exclude: ['examples/**', 'dist/**', '**/erdia_eg', '**/.configs/**', '**/docs/**/*'],
});
});
});
32 changes: 16 additions & 16 deletions src/configs/__tests__/tsconfig.comparer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ describe('getTsconfigComparer', () => {
const r01 = [
'tsconfig.eslint.json',
'tsconfig.dts.json',
'example/tsconfig.empty.json',
'example/type03/tsconfig.json',
'examples/tsconfig.empty.json',
'examples/type03/tsconfig.json',
'tsconfig.prod.json',
'example/tsconfig.example.json',
'examples/tsconfig.example.json',
'tsconfig.json',
'example/tsconfig.for.test.json',
'examples/tsconfig.for.test.json',
].sort(comparer);

expect(r01).toEqual([
'tsconfig.json',
'tsconfig.dts.json',
'tsconfig.eslint.json',
'tsconfig.prod.json',
'example/tsconfig.empty.json',
'example/tsconfig.example.json',
'example/tsconfig.for.test.json',
'example/type03/tsconfig.json',
'examples/tsconfig.empty.json',
'examples/tsconfig.example.json',
'examples/tsconfig.for.test.json',
'examples/type03/tsconfig.json',
]);
});

Expand All @@ -33,22 +33,22 @@ describe('getTsconfigComparer', () => {
'tsconfig.json',
'tsconfig.eslint.json',
'tsconfig.dts.json',
'example/tsconfig.empty.json',
'example/type03/tsconfig.json',
'examples/tsconfig.empty.json',
'examples/type03/tsconfig.json',
'tsconfig.prod.json',
'example/tsconfig.example.json',
'example/tsconfig.for.test.json',
'examples/tsconfig.example.json',
'examples/tsconfig.for.test.json',
].sort(comparer);

expect(r01).toEqual([
'tsconfig.json',
'tsconfig.dts.json',
'tsconfig.eslint.json',
'tsconfig.prod.json',
'example/tsconfig.empty.json',
'example/tsconfig.example.json',
'example/tsconfig.for.test.json',
'example/type03/tsconfig.json',
'examples/tsconfig.empty.json',
'examples/tsconfig.example.json',
'examples/tsconfig.for.test.json',
'examples/type03/tsconfig.json',
]);
});
});
Loading

0 comments on commit 8e17e2b

Please sign in to comment.