Skip to content

Commit

Permalink
feat: setup new project
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jan 12, 2020
1 parent cd46b79 commit 78473c8
Show file tree
Hide file tree
Showing 10 changed files with 184 additions and 67 deletions.
40 changes: 40 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 2
jobs:
build_10.15.3:
docker:
- image: 'circleci/node:10.15.3'
working_directory: ~/app
steps:
- checkout
- restore_cache:
keys:
- 'v1-dependencies-{{ checksum "package.json" }}'
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: 'v1-dependencies-{{ checksum "package.json" }}'
- run: npm test
build_latest:
docker:
- image: 'circleci/node:latest'
working_directory: ~/app
steps:
- checkout
- restore_cache:
keys:
- 'v1-dependencies-{{ checksum "package.json" }}'
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: 'v1-dependencies-{{ checksum "package.json" }}'
- run: npm test
workflows:
version: 2
workflow:
jobs:
- build_10.15.3
- build_latest
70 changes: 70 additions & 0 deletions .github/COMMIT_CONVENTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
## Git Commit Message Convention

> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
Using conventional commit messages, we can automate the process of generating the CHANGELOG file. All commits messages will automatically be validated against the following regex.

``` js
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types|build)((.+))?: .{1,50}/
```

## Commit Message Format
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:

> The **scope** is optional
```
feat(router): add support for prefix
Prefix makes it easier to append a path to a group of routes
```

1. `feat` is type.
2. `router` is scope and is optional
3. `add support for prefix` is the subject
4. The **body** is followed by a blank line.
5. The optional **footer** can be added after the body, followed by a blank line.

## Types
Only one type can be used at a time and only following types are allowed.

- feat
- fix
- docs
- style
- refactor
- perf
- test
- workflow
- ci
- chore
- types
- build

If a type is `feat`, `fix` or `perf`, then the commit will appear in the CHANGELOG.md file. However if there is any BREAKING CHANGE, the commit will always appear in the changelog.

### Revert
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>`., where the hash is the SHA of the commit being reverted.

## Scope
The scope could be anything specifying place of the commit change. For example: `router`, `view`, `querybuilder`, `database`, `model` and so on.

## Subject
The subject contains succinct description of the change:

- use the imperative, present tense: "change" not "changed" nor "changes".
- don't capitalize first letter
- no dot (.) at the end

## Body

Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.

## Footer

The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _Put an `x` in the boxes that apply_

_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._

- [ ] I have read the [CONTRIBUTING](https://github.com/adonisjs/adonis-lucid/blob/develop/CONTRIBUTING.md) doc
- [ ] I have read the [CONTRIBUTING](https://github.com/adonisjs/adonis-lucid/blob/master/CONTRIBUTING.md) doc
- [ ] Lint and unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added necessary documentation (if appropriate)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License

Copyright 2018 Harminder Virk, contributors
Copyright 2019 Harminder virk, contributors

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:

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
environment:
matrix:
- nodejs_version: Stable
- nodejs_version: 8.0.0
- nodejs_version: 10.15.3
init: git config --global core.autocrlf true
install:
- ps: 'Install-Product node $env:nodejs_version'
- npm install
test_script:
- node --version
- npm --version
- npm run test:win
- npm run test
build: 'off'
clone_depth: 1
matrix:
Expand Down
7 changes: 3 additions & 4 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"core": true,
"ts": false,
"ts": true,
"license": "MIT",
"services": [
"travis",
"appveyor",
"coveralls"
"circleci"
],
"appveyorUsername": "thetutlage",
"minNodeVersion": "8.0.0"
"minNodeVersion": "10.15.3"
}
4 changes: 3 additions & 1 deletion japaFile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require('ts-node/register')

const { configure } = require('japa')
configure({
files: ['test/**/*.spec.js']
files: ['test/**/*.spec.ts']
})
111 changes: 53 additions & 58 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,87 +2,82 @@
"name": "@adonisjs/lucid",
"version": "6.1.3",
"description": "SQL ORM built on top of Active Record pattern",
"main": "index.js",
"files": [
"commands",
"config",
"lib",
"providers",
"src",
"templates",
"instructions.js",
"instructions.md"
],
"scripts": {
"mrm": "mrm --preset=@adonisjs/mrm-preset",
"pretest": "npm run lint",
"test:cleanup": "rm -rf test/functional/database && rm -rf test/unit/tmp",
"test:sqlite": "DB=sqlite node japaFile.js",
"test:win": "node japaFile.js",
"test:mysql": "DB=mysql node japaFile.js",
"test": "nyc npm run test:sqlite && npm run test:mysql",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"commit": "git-cz",
"lint": "standard"
"test": "node japaFile.js",
"prepublishOnly": "npm run build",
"lint": "tslint --project tsconfig.json",
"clean": "del build",
"compile": "npm run lint && npm run clean && tsc",
"build": "npm run compile",
"commit": "git-cz"
},
"repository": {
"type": "git",
"url": "git+https://github.com/adonisjs/adonis-lucid.git"
},
"author": "",
"author": "virk,adonisjs",
"license": "MIT",
"bugs": {
"url": "https://github.com/adonisjs/adonis-lucid/issues"
},
"homepage": "https://github.com/adonisjs/adonis-lucid#readme",
"dependencies": {
"@adonisjs/generic-exceptions": "^2.0.1",
"chance": "^1.0.18",
"debug": "^4.1.1",
"knex": "^0.16.5",
"lodash": "^4.17.11",
"moment": "^2.24.0",
"pluralize": "^7.0.0",
"pretty-hrtime": "^1.0.3",
"require-all": "^3.0.0"
"knex": "^0.19.1",
"ts-essentials": "^3.0.0",
"utility-types": "^3.7.0"
},
"devDependencies": {
"@adonisjs/ace": "^5.0.7",
"@adonisjs/fold": "^4.0.9",
"@adonisjs/mrm-preset": "^1.0.16",
"@adonisjs/sink": "^1.0.17",
"commitizen": "^2.10.1",
"coveralls": "^3.0.3",
"cz-conventional-changelog": "^2.1.0",
"fs-extra": "^7.0.1",
"japa": "^2.0.7",
"japa-cli": "^1.0.1",
"mrm": "^1.2.1",
"mysql": "^2.16.0",
"nyc": "^13.3.0",
"pg": "^7.8.2",
"@adonisjs/mrm-preset": "^2.0.3",
"@poppinss/dev-utils": "^1.0.0",
"@types/dotenv": "^6.1.1",
"@types/node": "^12.6.8",
"clone": "^2.1.2",
"commitizen": "^4.0.3",
"cz-conventional-changelog": "^3.0.2",
"del-cli": "^2.0.0",
"doctoc": "^1.4.0",
"dotenv": "^8.0.0",
"husky": "^3.0.2",
"japa": "^2.0.10",
"mrm": "^1.2.2",
"mysql": "^2.17.1",
"pg": "^7.12.0",
"pkg-ok": "^2.3.1",
"semver": "^5.5.1",
"sqlite3": "^4.0.6",
"standard": "^12.0.1"
"sqlite3": "^4.0.9",
"ts-node": "^8.3.0",
"tslint": "^5.18.0",
"tslint-eslint-rules": "^5.4.0",
"typescript": "^3.5.3"
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
"publishConfig": {
"tag": "next",
"access": "public"
},
"nyc": {
"include": [
"src",
"lib"
],
"exclude": [
"test"
],
"extension": [
".ts"
]
},
"standard": {
"globals": [
"use"
]
"main": "build/index.js",
"files": [
"build/src",
"build/index.d.ts",
"build/index.js"
],
"husky": {
"hooks": {
"pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md",
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js"
}
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
}
}
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/@adonisjs/mrm-preset/_tsconfig"
}
8 changes: 8 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": [
"@adonisjs/mrm-preset/_tslint"
],
"rules": {
"await-promise": true
}
}

0 comments on commit 78473c8

Please sign in to comment.