@rangular-framework/cli 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/src/cli.js +18 -0
- package/package.json +4 -2
- package/postinstall.js +16 -0
package/dist/cli/src/cli.js
CHANGED
|
@@ -306,6 +306,22 @@ function fileDepOf(fromDir, toDir) {
|
|
|
306
306
|
* device-verified from this environment, and the app README
|
|
307
307
|
* says so.
|
|
308
308
|
*/
|
|
309
|
+
/** The maintainer note: printed at the end of every init, in the
|
|
310
|
+
* same words the CLI package's postinstall script prints after an
|
|
311
|
+
* install. npm hides install script output on current versions, so
|
|
312
|
+
* init is where most developers actually see it. The wording is
|
|
313
|
+
* pinned by tests/publish.test.ts; change both places together. */
|
|
314
|
+
function printMaintainerNote() {
|
|
315
|
+
console.log(`
|
|
316
|
+
You are all set. Rangular is ready.
|
|
317
|
+
|
|
318
|
+
New versions, new lessons and fixes are announced here first:
|
|
319
|
+
X (twitter): @bigyan_chap
|
|
320
|
+
GitHub: github.com/bigyanchap
|
|
321
|
+
LinkedIn: https://www.linkedin.com/in/bigyanchap/
|
|
322
|
+
|
|
323
|
+
Built and maintained by Bigyan Chapagain. Issues and ideas are welcome.`);
|
|
324
|
+
}
|
|
309
325
|
function initApp(dirArg) {
|
|
310
326
|
const repoRoot = rgRepoRoot();
|
|
311
327
|
const checkout = isCheckoutRoot(repoRoot);
|
|
@@ -634,6 +650,7 @@ not run in the environment that wrote this scaffold; your first
|
|
|
634
650
|
console.log(`Note: a bare name places the app under the Rangular repo's apps folder (${appDir}), not the current directory.`);
|
|
635
651
|
}
|
|
636
652
|
console.log(`Run it: cd ${appDir} && npm install && npx expo start`);
|
|
653
|
+
printMaintainerNote();
|
|
637
654
|
}
|
|
638
655
|
/** `rangular init <dir>`: scaffold a starter project (Stage 5). */
|
|
639
656
|
function initProject(dirArg) {
|
|
@@ -740,6 +757,7 @@ loose text, small tap targets) with the fix for each.
|
|
|
740
757
|
fs.writeFileSync(path.join(dir, '.gitignore'), 'node_modules\ndist\n');
|
|
741
758
|
console.log(`Created a starter Rangular project in ${dirArg}`);
|
|
742
759
|
console.log(`Build it: node dist/packages/cli/src/cli.js build ${dirArg}/src/app.component.ts --out ${dirArg}/src/app.component.tsx`);
|
|
760
|
+
printMaintainerNote();
|
|
743
761
|
}
|
|
744
762
|
/** `rangular watch`: compile now, then recompile on every change (Stage 5). */
|
|
745
763
|
function startWatch(target, out, routesSpecifier) {
|
package/package.json
CHANGED
|
@@ -7,16 +7,18 @@
|
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"main": "dist/cli/src/cli.js",
|
|
9
9
|
"name": "@rangular-framework/cli",
|
|
10
|
-
"version": "1.0.
|
|
10
|
+
"version": "1.0.3",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"typescript": "^5.9.0",
|
|
13
13
|
"rxjs": "^7.8.2"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
|
-
"dist"
|
|
16
|
+
"dist",
|
|
17
|
+
"postinstall.js"
|
|
17
18
|
],
|
|
18
19
|
"scripts": {
|
|
19
20
|
"build": "tsc -p tsconfig.publish.json",
|
|
21
|
+
"postinstall": "node postinstall.js",
|
|
20
22
|
"prepack": "npm run build"
|
|
21
23
|
},
|
|
22
24
|
"publishConfig": {
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// The install note: printed once, right after the CLI is installed.
|
|
2
|
+
// It only prints. It reads nothing, writes nothing, and a failure
|
|
3
|
+
// here must never fail the install itself.
|
|
4
|
+
try {
|
|
5
|
+
console.log(`
|
|
6
|
+
You are all set. Rangular is ready.
|
|
7
|
+
|
|
8
|
+
New versions, new lessons and fixes are announced here first:
|
|
9
|
+
X (twitter): @bigyan_chap
|
|
10
|
+
GitHub: github.com/bigyanchap
|
|
11
|
+
LinkedIn: https://www.linkedin.com/in/bigyanchap/
|
|
12
|
+
|
|
13
|
+
Built and maintained by Bigyan Chapagain. Issues and ideas are welcome.`);
|
|
14
|
+
} catch {
|
|
15
|
+
// Silent by design: the note is a courtesy, not a step.
|
|
16
|
+
}
|