Skip to content

Commit

Permalink
build(coding-standard): adding coding-standards
Browse files Browse the repository at this point in the history
  • Loading branch information
oseer committed Mar 11, 2022
1 parent 8045700 commit c3dea60
Show file tree
Hide file tree
Showing 54 changed files with 22,949 additions and 177 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
cache: npm
- run: npm ci
- run: npm run format:check
- run: npx nx run-many --target=scsslint --all
- run: npx nx run-many --target=lint --all

test:
Expand All @@ -32,6 +33,19 @@ jobs:
- run: npm ci
- run: npx nx run-many --target=test --all

e2e:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 12
uses: actions/setup-node@v2
with:
node-version: 12
cache: npm
- run: npm ci
- run: npx nx run-many --target=e2e --all

build:
runs-on: ubuntu-latest

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
node-version: 12.x
- name: Install dependencies
run: npx ci
- name: SCSS Lint
run: npx nx run-many --target=scsslint --all
- name: Lint
run: npx nx run-many --target=lint --all
- name: Test
Expand All @@ -29,3 +31,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
- name: Deploy GitHub Pages
run: npm run ghpages:deploy
2 changes: 1 addition & 1 deletion .huskyrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
const {
covalentHooks,
generateHuskyConfig,
} = require('./src/platform/coding-standards/husky/husky.js');
} = require('./libs/coding-standards/src/lib/husky/husky.js');
const huskyHooks = generateHuskyConfig(covalentHooks());
module.exports = huskyHooks;
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
["@semantic-release/commit-analyzer", { "preset": "conventionalcommits" }],
["@semantic-release/release-notes-generator"],
["@semantic-release/exec", {
"prepareCmd":"./scripts/npm-version ${nextRelease.version}",
"prepareCmd": "./scripts/npm-version ${nextRelease.version} && node ./scripts/version-placeholder ./dist",
"publishCmd": "./scripts/npm-publish"
}],
["@semantic-release/npm"],
Expand Down
1 change: 1 addition & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"angular-guided-tour": "libs/angular-guided-tour",
"angular-highlight": "libs/angular-highlight",
"angular-text-editor": "libs/angular-text-editor",
"coding-standards2": "libs/coding-standards",
"docs-app": "apps/docs-app",
"docs-e2e": "apps/docs-e2e",
"markdown": "libs/markdown",
Expand Down
10 changes: 10 additions & 0 deletions apps/docs-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@
]
}
},
"scsslint": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "./node_modules/.bin/stylelint --allow-empty-input 'apps/docs-app/**/*.scss'"
}
]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/apps/docs-app"],
Expand Down
4 changes: 2 additions & 2 deletions apps/docs-e2e/src/integration/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ describe('covalent-docs', () => {

it('should display welcome message', () => {
// Custom command example, see `../support/commands.ts` file
cy.login('[email protected]', 'myPassword');
// cy.login('[email protected]', 'myPassword');

// Function helper example, see `../support/app.po.ts` file
getGreeting().contains('Welcome covalent-docs');
getGreeting().contains('Enterprise UI Platform');
});
});
7 changes: 1 addition & 6 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# [4.0.0-beta.4](https://github.com/teradata/covalent/compare/v4.0.0-beta.2...v4.0.0-beta.4) (2022-03-09)



# [4.0.0-beta.2](https://github.com/teradata/covalent/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2022-02-25)


### Performance Improvements

* **markdown:** do not run change detection when the markdown is clicked ([b73d7ba](https://github.com/teradata/covalent/commit/b73d7ba90b3262cab0deebdd648372d98b967bf4))


- **markdown:** do not run change detection when the markdown is clicked ([b73d7ba](https://github.com/teradata/covalent/commit/b73d7ba90b3262cab0deebdd648372d98b967bf4))

# [4.0.0-beta.1](https://github.com/teradata/covalent/compare/v4.0.0-alpha.0...v4.0.0-beta.1) (2022-02-03)

Expand Down
8 changes: 4 additions & 4 deletions libs/angular-code-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"license": "MIT",
"author": "Teradata UX",
"peerDependencies": {
"@angular/common": "^13.2.0",
"@angular/core": "^13.2.0",
"monaco-editor": "^0.32.1"
"@angular/common": "0.0.0-COVALENT",
"@angular/core": "0.0.0-COVALENT",
"monaco-editor": "0.0.0-MONACO"
},
"dependencies": {
"tslib": "^2.3.0"
"tslib": "0.0.0-TSLIB"
}
}
10 changes: 10 additions & 0 deletions libs/angular-code-editor/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@
"libs/angular-code-editor/src/**/*.html"
]
}
},
"scsslint": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "./node_modules/.bin/stylelint --allow-empty-input 'libs/angular-code-editor/**/*.scss'"
}
]
}
}
},
"tags": []
Expand Down
6 changes: 3 additions & 3 deletions libs/angular-dynamic-forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"license": "MIT",
"author": "Teradata UX",
"peerDependencies": {
"@angular/common": "^13.2.0",
"@angular/core": "^13.2.0"
"@angular/common": "0.0.0-NG",
"@angular/core": "0.0.0-NG"
},
"dependencies": {
"tslib": "^2.3.0"
"tslib": "0.0.0-TSLIB"
}
}
10 changes: 10 additions & 0 deletions libs/angular-dynamic-forms/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
"libs/angular-dynamic-forms/src/**/*.html"
]
}
},
"scsslint": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "./node_modules/.bin/stylelint --allow-empty-input 'libs/angular-dynamic-forms/**/*.scss'"
}
]
}
}
},
"tags": []
Expand Down
10 changes: 5 additions & 5 deletions libs/angular-echarts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"reusable"
],
"peerDependencies": {
"@angular/common": "^13.2.0",
"@angular/core": "^13.2.0",
"echarts": "^5.3.0",
"echarts-wordcloud": "^2.0.0"
"@angular/common": "0.0.0-NG",
"@angular/core": "0.0.0-NG",
"echarts": "0.0.0-ECHARTS",
"echarts-wordcloud": "0.0.0-ECHARTS-WORDCLOUD"
},
"dependencies": {
"tslib": "^2.3.0"
"tslib": "0.0.0-TSLIB"
}
}
10 changes: 10 additions & 0 deletions libs/angular-echarts/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@
"libs/angular-echarts/bar/**/*.html"
]
}
},
"scsslint": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "./node_modules/.bin/stylelint --allow-empty-input 'libs/angular-echarts/**/*.scss'"
}
]
}
}
},
"tags": []
Expand Down
2 changes: 1 addition & 1 deletion libs/angular-guided-tour/ng-package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/libs/angular-guided-tour",
"assets": ["./styles/*.scss"]
"assets": ["./styles/*.scss", "./**/*theme.scss"]
}
8 changes: 4 additions & 4 deletions libs/angular-guided-tour/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"guided tour"
],
"peerDependencies": {
"@angular/common": "^13.2.0",
"@angular/core": "^13.2.0",
"shepherd.js": "^9.0.0"
"@angular/common": "0.0.0-NG",
"@angular/core": "0.0.0-NG",
"shepherd.js": "0.0.0-SHEPHERD"
},
"dependencies": {
"tslib": "^2.3.0"
"tslib": "0.0.0-TSLIB"
}
}
10 changes: 10 additions & 0 deletions libs/angular-guided-tour/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
"libs/angular-guided-tour/src/**/*.html"
]
}
},
"scsslint": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "./node_modules/.bin/stylelint --allow-empty-input 'libs/angular-guided-tour/**/*.scss'"
}
]
}
}
},
"tags": []
Expand Down
3 changes: 2 additions & 1 deletion libs/angular-highlight/ng-package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/libs/angular-highlight"
"dest": "../../dist/libs/angular-highlight",
"assets": ["./**/*theme.scss"]
}
14 changes: 7 additions & 7 deletions libs/angular-highlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"highlightjs"
],
"peerDependencies": {
"highlight.js": "^11.4.0",
"@angular/common": "^13.2.0",
"@angular/core": "^13.2.0",
"@angular/platform-browser": "^13.2.0",
"@angular/cdk": "^13.2.0",
"@angular/material": "^13.2.0"
"highlight.js": "0.0.0-HIGHLIGHT",
"@angular/common": "0.0.0-NG",
"@angular/core": "0.0.0-NG",
"@angular/platform-browser": "0.0.0-NG",
"@angular/cdk": "0.0.0-NG",
"@angular/material": "0.0.0-MATERIAL"
},
"dependencies": {
"tslib": "^2.3.0"
"tslib": "0.0.0-TSLIB"
}
}
10 changes: 10 additions & 0 deletions libs/angular-highlight/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
"libs/angular-highlight/src/**/*.html"
]
}
},
"scsslint": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "./node_modules/.bin/stylelint --allow-empty-input 'libs/angular-highlight/**/*.scss'"
}
]
}
}
},
"tags": []
Expand Down
6 changes: 3 additions & 3 deletions libs/angular-text-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "@covalent/text-editor",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^13.2.0",
"@angular/core": "^13.2.0"
"@angular/common": "0.0.0-NG",
"@angular/core": "0.0.0-NG"
},
"dependencies": {
"tslib": "^2.3.0"
"tslib": "0.0.0-TSLIB"
}
}
10 changes: 10 additions & 0 deletions libs/angular-text-editor/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@
"libs/angular-text-editor/src/**/*.html"
]
}
},
"scsslint": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "./node_modules/.bin/stylelint --allow-empty-input 'libs/angular-text-editor/**/*.scss'"
}
]
}
}
},
"tags": []
Expand Down
8 changes: 4 additions & 4 deletions libs/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"license": "MIT",
"author": "Teradata UX",
"peerDependencies": {
"@angular/common": "^13.2.0",
"@angular/core": "^13.2.0",
"@covalent/core/common": "0.0.0"
"@angular/common": "0.0.0-NG",
"@angular/core": "0.0.0-NG",
"@covalent/core/common": "0.0.0-COVALENT"
},
"dependencies": {
"tslib": "^2.3.0"
"tslib": "0.0.0-TSLIB"
}
}
10 changes: 10 additions & 0 deletions libs/angular/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@
"libs/angular/layout/**/*.html"
]
}
},
"scsslint": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "./node_modules/.bin/stylelint --allow-empty-input 'libs/angular/**/*.scss'"
}
]
}
}
},
"tags": []
Expand Down
18 changes: 18 additions & 0 deletions libs/coding-standards/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
3 changes: 3 additions & 0 deletions libs/coding-standards/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# coding-standards

This library was generated with [Nx](https://nx.dev).
Loading

0 comments on commit c3dea60

Please sign in to comment.