Skip to content

Commit 243f2a8

Browse files
committed
initial bootstrap
0 parents  commit 243f2a8

17 files changed

+4147
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[{Makefile,**.mk}]
12+
# Use tabs for indentation (Makefiles require tabs)
13+
indent_style = tab

.envrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# @see https://direnv.net/ and https://github.com/direnv/direnv/wiki/Node for docs
2+
set -e
3+
use node
4+
layout node

.eslintrc.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
extends: ['standard', 'plugin:prettier/recommended'],
7+
rules: {
8+
'generator-star-spacing': 'off',
9+
'space-before-function-paren': 'off',
10+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
11+
}
12+
}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
.DS_Store

.gitlab-ci.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
image: node:10
2+
3+
cache:
4+
paths:
5+
- node_modules/
6+
- .yarn
7+
8+
stages:
9+
- audit
10+
11+
# test:
12+
# stage: test
13+
# except:
14+
# - schedules
15+
# script:
16+
# - yarn install --pure-lockfile --cache-folder .yarn
17+
# - yarn test:ci
18+
# coverage: '/^Statements\s*:\s*([^%]+)/'
19+
20+
audit:
21+
stage: audit
22+
only:
23+
- schedules
24+
script:
25+
- yarn audit

.npmignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/examples
2+
/coverage
3+
/.nyc_output
4+
/.envrc
5+
/.eslintrc.js
6+
/.git/
7+
/.gitlab-ci.yml
8+
/.npmignore
9+
/.nvmrc
10+
/.prettierrc
11+
/.taprc
12+
/.yarnrc
13+
/node_modules/
14+
/yarn.lock
15+
!.gitignore

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

.prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
semi: false
2+
singleQuote: true
3+
trailingComma: none
4+
bracketSpacing: true

.taprc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"timeout": 30,
3+
"reporter": "spec"
4+
}

.yarnrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
version-tag-prefix ""
2+
version-commit-hooks false

LICENSE

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(The MIT License)
2+
3+
Copyright (c) 2020-present [u|screen](https://uscreen.de)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# dev-repo
2+
3+
> TBD
4+
5+
6+
## Usage
7+
8+
> TBD
9+
10+
---
11+
12+
## Roadmap
13+
14+
- > ...TBD
15+
16+
## Changelog
17+
18+
### v0.0.0
19+
20+
- initially bootstrapped
21+
22+
---
23+
24+
## License
25+
26+
Licensed under [MIT](./LICENSE).
27+
28+
Published, Supported and Sponsored by [u|screen](https://uscreen.de)

bin/cli-install.js

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env node
2+
3+
const cli = require('commander')
4+
const chalk = require('chalk')
5+
6+
// const { fetchAllUsers, userList, listAllUsers } = require('../src/users')
7+
8+
/**
9+
* package.json content
10+
*/
11+
const { version } = require('../package.json')
12+
13+
/**
14+
* simple error formating
15+
*/
16+
const error = error => {
17+
console.error(chalk.red(`ERROR: ${error.message} Aborting.`))
18+
}
19+
20+
/**
21+
* define the command
22+
*/
23+
cli
24+
.version(version)
25+
.arguments('[repository]')
26+
.action(async repository => {
27+
try {
28+
if (repository) {
29+
throw Error(`install of ${repository} not yet implemented`)
30+
} else {
31+
throw Error(`install of all repositories not yet implemented`)
32+
}
33+
} catch (e) {
34+
error(e)
35+
}
36+
})
37+
38+
/**
39+
* read args
40+
*/
41+
cli.parse(process.argv)

bin/cli-list.js

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env node
2+
3+
const cli = require('commander')
4+
const chalk = require('chalk')
5+
6+
// const { fetchAllUsers, userList, listAllUsers } = require('../src/users')
7+
8+
/**
9+
* package.json content
10+
*/
11+
const { version } = require('../package.json')
12+
13+
/**
14+
* simple error formating
15+
*/
16+
const error = error => {
17+
console.error(chalk.red(`ERROR: ${error.message} Aborting.`))
18+
}
19+
20+
/**
21+
* define the command
22+
*/
23+
cli
24+
.version(version)
25+
.arguments('[repository]')
26+
.action(async repository => {
27+
try {
28+
if (repository) {
29+
throw Error(`list of ${repository} not yet implemented`)
30+
} else {
31+
throw Error(`list of all repositories not yet implemented`)
32+
}
33+
} catch (e) {
34+
error(e)
35+
}
36+
})
37+
38+
/**
39+
* read args
40+
*/
41+
cli.parse(process.argv)

bin/cli.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env node
2+
3+
const cli = require('commander')
4+
5+
/**
6+
* package.json content
7+
*/
8+
const { version } = require('../package.json')
9+
10+
/**
11+
* define the command
12+
*/
13+
cli
14+
.version(version)
15+
.command(
16+
'install [repository]',
17+
'install named repository (ie. "webapi"), or all if no name supplied'
18+
)
19+
.command(
20+
'list [repository]',
21+
'list named repository (ie. "webapi"), or all if no name supplied'
22+
)
23+
24+
/**
25+
* read args
26+
*/
27+
cli.parse(process.argv)
28+
29+
/**
30+
* output help as default
31+
*/
32+
if (!process.argv.slice(2).length) {
33+
cli.help()
34+
}

package.json

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "@uscreen.de/dev-repo",
3+
"version": "0.0.0",
4+
"description": "cli to manage dev repos",
5+
"main": "index.js",
6+
"bin": {
7+
"dev": "./bin/cli.js"
8+
},
9+
"repository": "[email protected]:uscreen/npm/dev-repo.git",
10+
"author": "Marcus Spiegel <[email protected]>",
11+
"license": "MIT",
12+
"scripts": {
13+
"lint": "eslint '**/*.js' --fix",
14+
"test": "tap test/**/*.test.js",
15+
"test:cov": "tap --coverage-report=html test/**/*.test.js",
16+
"test:ci": "tap --coverage-report=text-summary test/**/*.test.js"
17+
},
18+
"gitHooks": {
19+
"pre-commit": "lint-staged"
20+
},
21+
"lint-staged": {
22+
"*.{js}": [
23+
"eslint --fix",
24+
"git add"
25+
]
26+
},
27+
"dependencies": {
28+
"commander": "^4.1.0",
29+
"fs-extra": "^8.1.0",
30+
"read-pkg-up": "^7.0.0",
31+
"write-pkg": "^4.0.0"
32+
},
33+
"devDependencies": {
34+
"eslint": "^6.5.1",
35+
"eslint-config-prettier": "^6.3.0",
36+
"eslint-config-standard": "^14.1.0",
37+
"eslint-plugin-import": "^2.18.2",
38+
"eslint-plugin-node": "^11.0.0",
39+
"eslint-plugin-prettier": "^3.1.1",
40+
"eslint-plugin-promise": "^4.2.1",
41+
"eslint-plugin-standard": "^4.0.1",
42+
"lint-staged": "^9.4.1",
43+
"prettier": "^1.18.2",
44+
"tap": "^14.6.9",
45+
"yorkie": "^2.0.0"
46+
}
47+
}

0 commit comments

Comments
 (0)