create-axiom-app 0.0.1 → 0.1.1
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/.gitattributes +5 -0
- package/License +19 -0
- package/README.md +57 -0
- package/dist/index.cjs +6 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -0
- package/package.json +64 -6
- package/templates/.gitkeep +0 -0
- package/templates/blog/.gitkeep +0 -0
- package/templates/default/.gitkeep +0 -0
- package/templates/default/README.md.ejs +1 -0
- package/templates/default/docs/README.md.ejs +1 -0
- package/templates/minimal/.gitkeep +0 -0
- package/tsup.config.ts +13 -0
- package/vitest.config.ts +20 -0
- package/index.js +0 -3
package/.gitattributes
ADDED
package/License
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2023 Toctive.inc
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# About
|
|
2
|
+
|
|
3
|
+
Introducing **create-axiom-app CLI Tool** - Simplify Your Project Setup Process!
|
|
4
|
+
|
|
5
|
+
The create-axiom-app CLI Tool is a powerful Node.js utility designed to streamline the process of creating new axiom project by automating the setup of essential configurations. Say goodbye to repetitive manual tasks and let create-axiom-app handle the initial project scaffolding, leaving you with more time to focus on actual development.
|
|
6
|
+
|
|
7
|
+
**Features:**
|
|
8
|
+
|
|
9
|
+
- **Effortless Project Initialization:** create-axiom-app reduces the time and effort needed to set up project configurations. It sets up boilerplate code, project structure, and initial configuration files according to your preferences.
|
|
10
|
+
- **Customizable Templates:** Choose from a range of customizable templates to match your project's technology stack and requirements.
|
|
11
|
+
- **Time-Saving:** Avoid the hassle of manually creating directories, copying files, and configuring settings every time you start a new project.
|
|
12
|
+
- **Consistency:** Ensure consistent project structures and configurations across your team, improving collaboration and code maintainability.
|
|
13
|
+
|
|
14
|
+
**Example Usage:**
|
|
15
|
+
|
|
16
|
+
Let's see how easy it is to use create-axiom-app CLI Tool to create a new project named "MyAwesomeApp."
|
|
17
|
+
|
|
18
|
+
**Step 1: Installation**
|
|
19
|
+
There are many ways to install this tool. Actually, you don't even need to install it manually. Just run the next command.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm init axiom-app
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then answer some questions to choose what template you want to use.
|
|
26
|
+
|
|
27
|
+
Another way to create a project is by installing create-axiom-app globally.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm i -g create-axiom-app
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Then, navigate to the directory where you want to create your new project, then run the following command:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
create-axiom-app --name=MyAwesomeApp
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Replace "MyAwesomeApp" with the desired name for your project. create-axiom-app will now prompt you to select a template and other configuration options.
|
|
40
|
+
|
|
41
|
+
Once you've provided all the necessary information, create-axiom-app will generate the project structure and configuration files based on your choices. You'll receive a success message along with instructions on how to proceed.
|
|
42
|
+
|
|
43
|
+
**Step 3: Start Developing**
|
|
44
|
+
Navigate into your newly created project directory and install dependencies:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cd MyAwesomeApp
|
|
48
|
+
npm install
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
From here, you're all set to start developing your project using the pre-configured settings provided by create-axiom-app.
|
|
52
|
+
|
|
53
|
+
Say goodbye to repetitive setup tasks and hello to accelerated project kickstarts with create-axiom-app CLI Tool. Happy coding!
|
|
54
|
+
|
|
55
|
+
For more information and available commands, check out the [create-axiom-app GitHub repository](https://github.com/toctive-com/create-axiom-app).
|
|
56
|
+
|
|
57
|
+
Give it a try and experience the convenience and efficiency of automating your project setup process!
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var F=Object.create;var p=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var B=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of j(e))!C.call(t,s)&&s!==n&&p(t,s,{get:()=>e[s],enumerable:!(o=v(e,s))||o.enumerable});return t};var r=(t,e,n)=>(n=t!=null?F(A(t)):{},B(e||!t||!t.__esModule?p(n,"default",{value:t,enumerable:!0}):n,t));var f=r(require("ejs"),1),l=require("fs"),u=r(require("inquirer"),1),a=r(require("path"),1),g=require("path"),d=require("url"),h=r(require("yargs"),1),m=r(require("cli-progress"),1),c=r(require("@colors/colors"),1),y=r(require("figlet"),1),$={},D=(0,d.fileURLToPath)($.url),R=a.default.dirname(D);async function M(){await x();let t=await I(),e=await L(t.template.toLowerCase());await b(e,t),W(t)}function W(t){console.log(`
|
|
3
|
+
`),console.log(c.default.bgGreen(" Success "),"\u2705 All done!"),console.log(`Please run the next commands to start your app:
|
|
4
|
+
- ${c.default.green(`cd ${t.name}`)}
|
|
5
|
+
- ${c.default.green("npm install")}
|
|
6
|
+
- ${c.default.green("npm run dev")}`)}async function b(t,e){let n=new m.default.SingleBar({},m.default.Presets.shades_classic);n.start(t.length,0);for(let o of t)await _(o,e),n.increment();n.stop()}async function x(){return new Promise((t,e)=>{let n=["Jacky","NScript","Puffy","Small","Standard","Star Wars","3-D","3D-ASCII","3D Diagonal","Isometric1","Roman","Speed","Univers","Whimsy","Big Money-ne","Big","Chiseled","Merlin1","Slant","Sweet","ANSI Regular","ANSI Shadow","Alligator","Bolger","Broadway","Caligraphy","Colossal"],o=n[Math.floor(Math.random()*n.length)];(0,y.default)("Axiom",{width:80,font:o},(s,i)=>{if(s){e(s);return}console.log(i),t(!0)})})}async function I(){let e=[{type:"input",name:"name",message:"What is your name?",default:(await(0,h.default)(process.argv).option("name",{alias:"n",describe:"User name"}).help().argv).name??"axiom-project"},{type:"list",name:"template",message:"Select the template you want to use:",choices:["Default","Blog","Minimal"]}];return u.default.prompt(e)}async function _(t,e){let n=S(e.template.toLowerCase()),o=await f.default.renderFile((0,g.resolve)(n,t),e,null),s=t.split(".").slice(0,-1).join("."),i=a.default.join(process.cwd(),s);(0,l.mkdirSync)(i.split(a.default.sep).slice(0,-1).join(a.default.sep),{recursive:!0}),(0,l.writeFileSync)(i,o)}async function L(t){let e=S(t);return(await w(e)).map(o=>o.split(e).filter(Boolean).at(0).replace(a.default.sep,"")).filter(T)}async function w(t){let e=await l.promises.readdir(t),n=[];for(let o of e){let s=a.default.join(t,o),i=await l.promises.stat(s);if(i.isDirectory()){let P=await w(s);n=n.concat(P)}else i.isFile()&&n.push(s)}return n}function T(t){return t.endsWith(".ejs")}function S(t){return(0,g.resolve)(R,"..","templates",t)}M();
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import u from"ejs";import{promises as l,mkdirSync as d,writeFileSync as h}from"fs";import y from"inquirer";import r from"path";import{resolve as m}from"path";import{fileURLToPath as w}from"url";import S from"yargs";import c from"cli-progress";import a from"@colors/colors";import P from"figlet";var F=w(import.meta.url),v=r.dirname(F);async function j(){await B();let t=await D(),e=await M(t.template.toLowerCase());await C(e,t),A(t)}function A(t){console.log(`
|
|
3
|
+
`),console.log(a.bgGreen(" Success "),"\u2705 All done!"),console.log(`Please run the next commands to start your app:
|
|
4
|
+
- ${a.green(`cd ${t.name}`)}
|
|
5
|
+
- ${a.green("npm install")}
|
|
6
|
+
- ${a.green("npm run dev")}`)}async function C(t,e){let n=new c.SingleBar({},c.Presets.shades_classic);n.start(t.length,0);for(let s of t)await R(s,e),n.increment();n.stop()}async function B(){return new Promise((t,e)=>{let n=["Jacky","NScript","Puffy","Small","Standard","Star Wars","3-D","3D-ASCII","3D Diagonal","Isometric1","Roman","Speed","Univers","Whimsy","Big Money-ne","Big","Chiseled","Merlin1","Slant","Sweet","ANSI Regular","ANSI Shadow","Alligator","Bolger","Broadway","Caligraphy","Colossal"],s=n[Math.floor(Math.random()*n.length)];P("Axiom",{width:80,font:s},(o,i)=>{if(o){e(o);return}console.log(i),t(!0)})})}async function D(){let e=[{type:"input",name:"name",message:"What is your name?",default:(await S(process.argv).option("name",{alias:"n",describe:"User name"}).help().argv).name??"axiom-project"},{type:"list",name:"template",message:"Select the template you want to use:",choices:["Default","Blog","Minimal"]}];return y.prompt(e)}async function R(t,e){let n=p(e.template.toLowerCase()),s=await u.renderFile(m(n,t),e,null),o=t.split(".").slice(0,-1).join("."),i=r.join(process.cwd(),o);d(i.split(r.sep).slice(0,-1).join(r.sep),{recursive:!0}),h(i,s)}async function M(t){let e=p(t);return(await g(e)).map(s=>s.split(e).filter(Boolean).at(0).replace(r.sep,"")).filter(W)}async function g(t){let e=await l.readdir(t),n=[];for(let s of e){let o=r.join(t,s),i=await l.stat(o);if(i.isDirectory()){let f=await g(o);n=n.concat(f)}else i.isFile()&&n.push(o)}return n}function W(t){return t.endsWith(".ejs")}function p(t){return m(v,"..","templates",t)}j();
|
package/package.json
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-axiom-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "create a new axiom project",
|
|
5
5
|
"private": false,
|
|
6
6
|
"bin": {
|
|
7
|
-
"create-axiom-app": "index.js"
|
|
7
|
+
"create-axiom-app": "dist/index.js"
|
|
8
8
|
},
|
|
9
|
-
"main": "index.js",
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"module": "dist/index.mjs",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"type": "module",
|
|
10
13
|
"scripts": {
|
|
11
|
-
"
|
|
14
|
+
"dev": "nodemon ./src/index.ts",
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"test:watch": "vitest",
|
|
17
|
+
"test:coverage": "vitest run --coverage",
|
|
18
|
+
"build": "tsup --config ./tsup.config.ts",
|
|
19
|
+
"build:watch": "tsup --config ./tsup.config.ts --watch",
|
|
20
|
+
"lint": "tsup ./src",
|
|
21
|
+
"prettier": "prettier . --check --ignore-path .prettierignore",
|
|
22
|
+
"prettier:fix": "prettier . --write --ignore-path .prettierignore",
|
|
23
|
+
"eslint": "eslint .",
|
|
24
|
+
"eslint:fix": "eslint . --fix",
|
|
25
|
+
"start": "node ./dist/index.js"
|
|
12
26
|
},
|
|
13
27
|
"keywords": [
|
|
14
28
|
"axiom",
|
|
@@ -18,5 +32,49 @@
|
|
|
18
32
|
"express"
|
|
19
33
|
],
|
|
20
34
|
"author": "Sameh A. Elalfi <sameh.elalfi.mail@gmail.com>",
|
|
21
|
-
"license": "MIT"
|
|
22
|
-
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/toctive-com/create-axiom-app.git"
|
|
39
|
+
},
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/toctive-com/create-axiom-app/issues"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/toctive-com/create-axiom-app#readme",
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/cli-progress": "^3.11.0",
|
|
49
|
+
"@types/ejs": "^3.1.2",
|
|
50
|
+
"@types/figlet": "^1.5.6",
|
|
51
|
+
"@types/inquirer": "^9.0.3",
|
|
52
|
+
"@types/node": "^20.5.1",
|
|
53
|
+
"@types/yargs": "^17.0.24",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
55
|
+
"@vitest/coverage-v8": "^0.34.2",
|
|
56
|
+
"eslint": "^8.47.0",
|
|
57
|
+
"eslint-config-prettier": "^9.0.0",
|
|
58
|
+
"eslint-config-standard-with-typescript": "^38.0.0",
|
|
59
|
+
"eslint-plugin-import": "^2.28.1",
|
|
60
|
+
"eslint-plugin-n": "^16.0.1",
|
|
61
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
62
|
+
"nodemon": "^3.0.1",
|
|
63
|
+
"prettier": "^3.0.2",
|
|
64
|
+
"ts-node": "^10.9.1",
|
|
65
|
+
"tsconfig-paths": "^4.2.0",
|
|
66
|
+
"tslib": "^2.6.2",
|
|
67
|
+
"tsup": "^7.2.0",
|
|
68
|
+
"typescript": "^5.1.6",
|
|
69
|
+
"vite-tsconfig-paths": "^4.2.0",
|
|
70
|
+
"vitest": "^0.34.2"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"@colors/colors": "^1.6.0",
|
|
74
|
+
"cli-progress": "^3.12.0",
|
|
75
|
+
"ejs": "^3.1.9",
|
|
76
|
+
"figlet": "^1.6.0",
|
|
77
|
+
"inquirer": "^9.2.10",
|
|
78
|
+
"yargs": "^17.7.2"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Hello, <%= name %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Hello, <%= name %>
|
|
File without changes
|
package/tsup.config.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig } from 'tsup';
|
|
2
|
+
import tsconfig from './tsconfig.json';
|
|
3
|
+
|
|
4
|
+
export default defineConfig((options) => ({
|
|
5
|
+
name: 'Axiom',
|
|
6
|
+
entry: ['src/index.ts'],
|
|
7
|
+
format: ['esm', 'cjs'],
|
|
8
|
+
target: tsconfig.compilerOptions.target as 'esnext',
|
|
9
|
+
outDir: 'dist',
|
|
10
|
+
dts: true,
|
|
11
|
+
clean: true,
|
|
12
|
+
minify: !options.watch,
|
|
13
|
+
}));
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config';
|
|
2
|
+
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [
|
|
6
|
+
tsconfigPaths({
|
|
7
|
+
ignoreConfigErrors: true,
|
|
8
|
+
parseNative: true,
|
|
9
|
+
loose: true,
|
|
10
|
+
root: './',
|
|
11
|
+
}),
|
|
12
|
+
],
|
|
13
|
+
|
|
14
|
+
test: {
|
|
15
|
+
coverage: {
|
|
16
|
+
provider: 'v8',
|
|
17
|
+
reporter: ['text', 'json', 'html'],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
package/index.js
DELETED