Skip to content

Commit 9c04d10

Browse files
authored
refactor: rename cli (#7)
* refactor: rename package * refactor: rename package * refactor: rename package * refactor: rename package in script * chore: added changeset
1 parent dbc633a commit 9c04d10

11 files changed

+32
-28
lines changed

.changeset/strong-wolves-impress.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@elasticpath/mason-cli": patch
3+
---
4+
5+
Renamed to mason-cli

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"release": "turbo run build && changeset publish",
1717
"test": "turbo run test",
1818
"test:watch": "turbo run test:watch",
19-
"examples": "turbo run build --filter=@field123/epcc-schematics-cli... && yarn run scaffold:local:simple",
20-
"scaffold:local:simple": "mkdir -p examples && cd ./examples && rimraf ./* && node ../packages/epcc-schematics-cli/dist/bin/schematics.js ../packages/d2c-schematics/dist:ep-new --dry-run=false --skip-install=true --skip-git=true --interactive=false --epcc-client-id=abc123 --epcc-client-secret=def456 --epcc-endpoint-url=api.moltin.com basic"
19+
"examples": "turbo run build --filter=@elasticpath/mason-cli... && yarn run scaffold:local:simple",
20+
"scaffold:local:simple": "mkdir -p examples && cd ./examples && rimraf ./* && node ../packages/mason-cli/dist/bin/mason.js ../packages/d2c-schematics/dist:ep-new --dry-run=false --skip-install=true --skip-git=true --interactive=false --epcc-client-id=abc123 --epcc-client-secret=def456 --epcc-endpoint-url=api.moltin.com basic"
2121
},
2222
"devDependencies": {
2323
"@changesets/cli": "^2.24.1",

packages/epcc-schematics-cli/CHANGELOG.md renamed to packages/mason-cli/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @field123/epcc-schematics-cli
1+
# @elasticpath/mason-cli
22

33
## 0.4.0
44

File renamed without changes.

packages/epcc-schematics-cli/package.json renamed to packages/mason-cli/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
{
2-
"name": "@field123/epcc-schematics-cli",
2+
"name": "@elasticpath/mason-cli",
33
"version": "0.4.0",
44
"description": "Elastic Path Commerce Cloud Schematics - CLI",
55
"repository": {
66
"type": "git",
7-
"directory": "packages/epcc-schematics-cli"
7+
"directory": "packages/mason-cli"
88
},
99
"bin": {
10-
"epcc-schematics": "./bin/schematics.js"
10+
"mason-cli": "./bin/mason.js"
1111
},
1212
"scripts": {
1313
"build": "rimraf ./dist/ && tsup",
1414
"dev": "tsup --watch",
15-
"dev-old": "ncc build ./schematics.ts -w -o dist/",
16-
"build-old": "rimraf ./dist/ && ncc build ./schematics.ts -o ./dist/ --minify --no-cache --no-source-map-register",
15+
"dev-old": "ncc build ./mason.ts -w -o dist/",
16+
"build-old": "rimraf ./dist/ && ncc build ./mason.ts -o ./dist/ --minify --no-cache --no-source-map-register",
1717
"lint": "TIMING=1 eslint src/**/*.ts* --fix",
1818
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
1919
"test": "jest",
2020
"test:watch": "jest --watch"
2121
},
22-
"schematics": "./collection.json",
2322
"dependencies": {
2423
"@angular-devkit/core": "^14.1.0",
2524
"@angular-devkit/schematics": "^14.1.0",

packages/epcc-schematics-cli/src/schematics.ts renamed to packages/mason-cli/src/mason.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import yargsParser, { camelCase, decamelize } from "yargs-parser"
2424
* and show usage.
2525
*
2626
* In the case where a collection name isn't part of the argument, the default is to use the
27-
* schematics package (@field123/epcc-schematics-cli) as the collection.
27+
* schematics package (@elasticpath/mason-cli) as the collection.
2828
*
2929
* This logic is entirely up to the tooling.
3030
*
@@ -170,7 +170,7 @@ export async function main({
170170
console.log("process.cwd(): ", process.cwd())
171171
console.log("__dirname: ", __dirname)
172172

173-
const temp = require.resolve("@field123/epcc-schematics-cli/package.json")
173+
const temp = require.resolve("@elasticpath/mason-cli/package.json")
174174
console.log("temp: ", temp)
175175

176176
/** Create the workflow scoped to the working directory that will be executed with this run. */

packages/epcc-schematics-cli/tsup.config.ts renamed to packages/mason-cli/tsup.config.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ export default defineConfig(({ env }) => {
55
return {
66
outExtension({ format }) {
77
return {
8-
js: `.js`,
8+
js: `.js`
99
}
1010
},
1111
entry: {
12-
"bin/schematics": "src/schematics.ts",
12+
"bin/mason": "src/mason.ts"
1313
},
1414
format: ["cjs"],
1515
dts: {
1616
entry: {
17-
"bin/schematics": "src/schematics.ts",
18-
},
17+
"bin/mason": "src/mason.ts"
18+
}
1919
},
2020
clean: false,
2121
sourcemap: false,
@@ -27,48 +27,48 @@ export default defineConfig(({ env }) => {
2727
assets: [
2828
{
2929
from: ["./collection.json"],
30-
to: ["./dist/collection.json"],
30+
to: ["./dist/collection.json"]
3131
},
3232
{
3333
from: ["./package.json"],
34-
to: ["./dist/package.json"],
34+
to: ["./dist/package.json"]
3535
},
3636
{
3737
from: ["./README.md"],
38-
to: ["./dist/README.md"],
38+
to: ["./dist/README.md"]
3939
},
4040
{
4141
from: ["./src/blank/**/*"],
4242
to: ["./dist/blank"],
43-
keepStructure: true,
43+
keepStructure: true
4444
},
4545
{
4646
from: ["./src/schematic/**/*"],
4747
to: ["./dist/schematic"],
48-
keepStructure: true,
48+
keepStructure: true
4949
},
5050
{
5151
from: ["./src/d2c/**/*"],
5252
to: ["./dist/d2c"],
53-
keepStructure: true,
53+
keepStructure: true
5454
},
5555
{
5656
from: ["./src/application/**/*"],
5757
to: ["./dist/application"],
58-
keepStructure: true,
58+
keepStructure: true
5959
},
6060
{
6161
from: ["./src/workspace/**/*"],
6262
to: ["./dist/workspace"],
63-
keepStructure: true,
63+
keepStructure: true
6464
},
6565
{
6666
from: ["./src/utility/**/*"],
6767
to: ["./dist/utility"],
68-
keepStructure: true,
69-
},
70-
],
71-
}),
72-
],
68+
keepStructure: true
69+
}
70+
]
71+
})
72+
]
7373
}
7474
})

0 commit comments

Comments
 (0)