Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit eebdf3c

Browse files
committed
perf: Rewrite all project
1 parent 679d8bf commit eebdf3c

294 files changed

Lines changed: 8491 additions & 21304 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
version: 2
3+
jobs:
4+
node-latest: &test
5+
docker:
6+
- image: node:latest
7+
working_directory: ~/cli
8+
steps:
9+
- checkout
10+
- restore_cache: &restore_cache
11+
keys:
12+
- v1-npm-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}}
13+
- v1-npm-{{checksum ".circleci/config.yml"}}
14+
- run:
15+
name: Install dependencies
16+
command: .circleci/greenkeeper
17+
- run: ./bin/run --version
18+
- run: ./bin/run --help
19+
- run:
20+
name: Testing
21+
command: yarn test
22+
- run:
23+
name: Submitting code coverage to codecov
24+
command: |
25+
./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov
26+
curl -s https://codecov.io/bash | bash
27+
- save_cache:
28+
key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
29+
paths:
30+
- ~/cli/node_modules
31+
- /usr/local/share/.cache/yarn
32+
- /usr/local/share/.config/yarn
33+
node-8:
34+
<<: *test
35+
docker:
36+
- image: node:8
37+
38+
workflows:
39+
version: 2
40+
"@rucken/cli":
41+
jobs:
42+
- node-latest
43+
- node-8

.circleci/greenkeeper

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
6+
7+
if [[ "$CIRCLE_BRANCH" != greenkeeper/* ]]; then
8+
yarn
9+
# yarn check
10+
exit 0
11+
fi
12+
13+
if [[ ! -z "$GIT_EMAIL" ]] & [[ ! -z "$GIT_USERNAME" ]]; then
14+
git config --global push.default simple
15+
git config --global user.email "$GIT_EMAIL"
16+
git config --global user.name "$GIT_USERNAME"
17+
fi
18+
19+
if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
20+
yarn global add greenkeeper-lockfile@1
21+
fi
22+
23+
greenkeeper-lockfile-update
24+
yarn
25+
greenkeeper-lockfile-upload
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
# Editor configuration, see http://editorconfig.org
21
root = true
32

43
[*]
5-
charset = utf-8
64
indent_style = space
75
indent_size = 2
8-
insert_final_newline = true
6+
charset = utf-8
97
trim_trailing_whitespace = true
8+
insert_final_newline = true
109

1110
[*.md]
12-
max_line_length = off
1311
trim_trailing_whitespace = false

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto
2+
*.js text eol=lf
3+
*.ts text eol=lf

.gitignore

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
# See http://help.github.com/ignore-files/ for more about ignoring files.
2-
3-
# compiled output
4-
.ng_pkg_build
5-
.env
6-
.tmp
7-
dist
8-
tmp
9-
out-tsc
10-
*.tgz
11-
12-
# dependencies
1+
*-debug.log
2+
*-error.log
3+
/.nyc_output
4+
/dist
5+
/lib
6+
/package-lock.json
7+
/tmp
138
node_modules
14-
159
# IDEs and editors
1610
/.idea
1711
.project
@@ -27,27 +21,5 @@ node_modules
2721
!.vscode/tasks.json
2822
!.vscode/launch.json
2923
!.vscode/extensions.json
30-
31-
# misc
32-
/.sass-cache
33-
/connect.lock
34-
/coverage/*
35-
/libpeerconnection.log
36-
npm-debug.log
37-
testem.log
38-
/typings
39-
40-
# e2e
41-
/e2e/*.js
42-
/e2e/*.map
43-
44-
#System Files
45-
.DS_Store
46-
Thumbs.db
47-
temp_*.json
48-
/test/fixture/**/package-lock.json
49-
/test/fixture/**/src/index.ts
50-
/test/fixture/**/src/app/index.ts
51-
/test/fixture/**/i18n/ru.i18n.ts
52-
/test/fixture/**/i18n/template.pot
53-
/test/fixture/ananas
24+
/*.tgz
25+
/.travis.yml

.nycrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extension": [
3+
".ts"
4+
],
5+
"include": [
6+
"src/**/*.ts"
7+
],
8+
"exclude": [
9+
"**/*.d.ts"
10+
],
11+
"all": true
12+
}

.vscode/launch.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

README.md

Lines changed: 98 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,142 @@
1-
# @rucken/cli
1+
@rucken/cli
2+
===========
23

4+
Console tools for create and build Angular6+ application based on [rucken](https://github.com/rucken) template
5+
6+
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
37
[![Greenkeeper badge](https://badges.greenkeeper.io/rucken/cli.svg)](https://greenkeeper.io/)
4-
[![NPM version][npm-image]][npm-url]
8+
[![Version](https://img.shields.io/npm/v/@rucken/cli.svg)](https://npmjs.org/package/@rucken/cli)
59
[![Build Status][travis-image]][travis-url]
10+
[![CircleCI](https://circleci.com/gh/rucken/cli/tree/master.svg?style=shield)](https://circleci.com/gh/rucken/cli/tree/master)
11+
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/rucken/cli?branch=master&svg=true)](https://ci.appveyor.com/project/rucken/cli/branch/master)
12+
[![Codecov](https://codecov.io/gh/rucken/cli/branch/master/graph/badge.svg)](https://codecov.io/gh/rucken/cli)
13+
[![Downloads/week](https://img.shields.io/npm/dw/@rucken/cli.svg)](https://npmjs.org/package/@rucken/cli)
14+
[![License](https://img.shields.io/npm/l/@rucken/cli.svg)](https://github.com/rucken/cli/blob/master/package.json)
615
[![Gitter][gitter-image]][gitter-url]
716
[![Join the chat at telegram][telegram-image]][telegram-url]
817

9-
Console tools for create and build Angular5+ application based on [rucken](https://github.com/rucken) template
10-
11-
## What is Rucken?
12-
13-
- **Core** - Base entities and services for create applications on `Angular5+`, include work with users, groups and permissions.
18+
<!-- toc -->
19+
* [What is Rucken?](#what-is-rucken)
20+
* [Usage](#usage)
21+
* [Commands](#commands)
22+
<!-- tocstop -->
23+
# What is Rucken?
24+
- **Core** - Base entities and services for create applications on `Angular6+`, include work with users, groups and permissions.
1425
- **Web** - Base ui grids and inputs and etc. for manage users, groups and permissions.
1526

16-
## Installation
17-
18-
```bash
19-
npm install -g @rucken/cli
27+
# Usage
28+
<!-- usage -->
29+
```sh-session
30+
$ npm install -g @rucken/cli
31+
$ rucken COMMAND
32+
running command...
33+
$ rucken (-v|--version|version)
34+
@rucken/cli/2.0.6 win32-x64 node-v8.11.3
35+
$ rucken --help [COMMAND]
36+
USAGE
37+
$ rucken COMMAND
38+
...
2039
```
40+
<!-- usagestop -->
41+
# Commands
42+
<!-- commands -->
43+
* [`rucken config [FOLDER]`](#rucken-config-folder)
44+
* [`rucken help [COMMAND]`](#rucken-help-command)
45+
* [`rucken make-ts-list [FOLDER]`](#rucken-make-ts-list-folder)
46+
* [`rucken prepare [FOLDER]`](#rucken-prepare-folder)
47+
* [`rucken translate [FOLDER]`](#rucken-translate-folder)
48+
* [`rucken version-updater [FOLDER]`](#rucken-version-updater-folder)
2149

22-
## Usage
50+
## `rucken config [FOLDER]`
2351

24-
```bash
25-
rucken --help
26-
```
52+
change angular.json properties and tsconfig.json properties for switch between dev - for speedup mono serve mode and prod - build optimization and standalone build all lib and application
2753

28-
### Commands
54+
```
55+
USAGE
56+
$ rucken config [FOLDER]
2957
30-
options "app" - see list of apps taken from ".angular-cli.json" with condition index!==undefined
58+
OPTIONS
59+
-h, --help show CLI help
60+
-m, --mode=(dev|prod) [default: prod]
61+
```
3162

32-
options "lib" - see list of apps taken from ".angular-cli.json" with condition index===undefined
63+
## `rucken help [COMMAND]`
3364

34-
```bash
35-
rucken --help
65+
display help for rucken
3666

37-
# clear all temp and dist folders on application/library
38-
rucken clear --app app1
67+
```
68+
USAGE
69+
$ rucken help [COMMAND]
3970
40-
# build application/library
41-
rucken build --lib
42-
43-
# npm link dist folder of library to all packages
44-
rucken link --lib lib1
71+
ARGUMENTS
72+
COMMAND command to show help for
4573
46-
# npm link src folder of application/library to all packages
47-
rucken link-npm --lib lib1
74+
OPTIONS
75+
--all see all commands in CLI
76+
```
4877

49-
# extract-translate + po2ts + make-ts-list to application/library
50-
rucken prepare --app
51-
rucken prepare --help
78+
## `rucken make-ts-list [FOLDER]`
5279

53-
# make index.ts with import all ts files in application/library
54-
rucken make-ts-list
55-
rucken prepare --help
80+
make index.ts with list of ts files recursive from source folder
5681

57-
# run synchronously many different commands with many different options, for run with options use "~~" instead "--"
58-
rucken commands clear prepare link ~~lib lib1
5982
```
60-
### Scaffold commands
61-
62-
```bash
63-
# generate new application based on rucken template
64-
rucken new ananas
65-
rucken new --help
83+
USAGE
84+
$ rucken make-ts-list [FOLDER]
6685
67-
# generate model, service, grid, lookup input, modal for edit row in grid, modal for select items from grid with items
68-
rucken entity --entity-name apple
69-
rucken entity --help
86+
OPTIONS
87+
-e, --excludes=excludes [default: ["*server*","*node_modules*"]] exclude directories/files masks
88+
-h, --help show CLI help
89+
-i, --indexFileName=indexFileName [default: index.ts] output file
90+
```
7091

71-
# generate page
72-
rucken page --page-name apple
73-
rucken page --help
92+
## `rucken prepare [FOLDER]`
7493

75-
# generate frame on page
76-
rucken frame --page-name apple --frame-name banana
77-
rucken frame --help
94+
translate + make-ts-list + version-update + config
7895

79-
# generate frame with page
80-
rucken page+frame --page-name apple --frame-name banana
81-
rucken page+frame --help
8296
```
83-
### Create and run application
97+
USAGE
98+
$ rucken prepare [FOLDER]
8499
85-
```bash
86-
rucken new my-app
87-
cd my-app
88-
npm install
89-
npm run app:start-mockapi
100+
OPTIONS
101+
-h, --help show CLI help
102+
-m, --mode=(dev|prod) [default: prod]
90103
```
91104

92-
## Quick links
105+
## `rucken translate [FOLDER]`
93106

94-
[Source](https://github.com/rucken/cli) - Source code.
107+
extract translate from source and make ts class from it
95108

96-
[Live demo](https://rucken.github.io/core) [[source]](https://github.com/rucken/core) - Demo application (backend: http://www.mockapi.io).
109+
```
110+
USAGE
111+
$ rucken translate [FOLDER]
112+
113+
OPTIONS
114+
-c, --clean remove obsolete strings when merging
115+
-e, --excludes=excludes [default: ["node_modules"]] exclude directories/files masks
116+
-f, --format=(po|json) [default: po] file prefix and build mode
117+
-h, --help show CLI help
118+
-p, --prefix=prefix name of class prefix
119+
-t, --templateName=templateName [default: template] name of template
120+
```
97121

98-
[Live demo (SSR)](https://rucken.herokuapp.com) [[source]](https://github.com/rucken/core) - Demo application with server side rendering (backend: http://www.mockapi.io).
122+
## `rucken version-updater [FOLDER]`
99123

100-
[Live demo (NestJS)](https://rucken-core-nestjs.herokuapp.com) [[source]](https://github.com/rucken/core-nestjs) - Demo application with live backend (backend: https://nestjs.com).
124+
libraries dependencies and package.json versions updater from root package.json
101125

102-
## License
126+
```
127+
USAGE
128+
$ rucken version-updater [FOLDER]
103129
104-
MIT
130+
OPTIONS
131+
-h, --help show CLI help
132+
-r, --root=root [default: .] root project with package.json for get inforamtion about dependencies and it versions
133+
```
134+
<!-- commandsstop -->
105135

106136
[travis-image]: https://travis-ci.org/rucken/cli.svg?branch=master
107137
[travis-url]: https://travis-ci.org/rucken/cli
108138
[gitter-image]: https://img.shields.io/gitter/room/rucken/cli.js.svg
109139
[gitter-url]: https://gitter.im/rucken/cli
110-
[npm-image]: https://badge.fury.io/js/%40rucken%2Fcli.svg
111-
[npm-url]: https://npmjs.org/package/@rucken/cli
112140
[dependencies-image]: https://david-dm.org/rucken/cli/status.svg
113141
[dependencies-url]: https://david-dm.org/rucken/cli
114142
[telegram-image]: https://img.shields.io/badge/chat-telegram-blue.svg?maxAge=2592000

_env

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)