-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
2,788 additions
and
1,527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["projects/**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"parserOptions": { | ||
"project": ["tsconfig.json", "e2e/tsconfig.json"], | ||
"createDefaultProgram": true | ||
}, | ||
"extends": [ | ||
"plugin:@angular-eslint/recommended", | ||
"plugin:@angular-eslint/template/process-inline-templates", | ||
"plugin:prettier/recommended", | ||
"prettier" | ||
], | ||
"rules": { | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"prefix": "ngx", | ||
"style": "kebab-case", | ||
"type": "element" | ||
} | ||
], | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"prefix": "ngx", | ||
"style": "camelCase", | ||
"type": "attribute" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": ["plugin:@angular-eslint/template/recommended"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
name: ngx-clipboard | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.15.0 | ||
cache: 'yarn' | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.17.0 | ||
cache: 'yarn' | ||
|
||
- uses: actions/cache@v2 | ||
id: angular-cache | ||
with: | ||
path: | | ||
.angular/cache | ||
key: ${{ runner.os }}-ng-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: ${{ runner.os }}-ng | ||
- uses: actions/cache@v2 | ||
id: angular-cache | ||
with: | ||
path: | | ||
.angular/cache | ||
key: ${{ runner.os }}-ng-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: ${{ runner.os }}-ng | ||
|
||
- name: Install dependencies | ||
run: yarn --pure-lockfile --non-interactive --no-progress | ||
- name: Install dependencies | ||
run: yarn --pure-lockfile --non-interactive --no-progress | ||
|
||
# Fix linting errors first | ||
# - name: Run TSLint | ||
# run: yarn lint | ||
# Fix linting errors first | ||
# - name: Run TSLint | ||
# run: yarn lint | ||
|
||
- name: Run tests | ||
run: yarn test --configuration=ci | ||
- name: Run tests | ||
run: yarn test --configuration=ci | ||
|
||
- name: Build host app | ||
run: yarn ng build library-host --prod | ||
- name: Build host app | ||
run: yarn ng build library-host --prod | ||
|
||
- name: Build library | ||
run: yarn build | ||
- name: Build library | ||
run: yarn build | ||
|
||
- name: Publish library | ||
if: github.event_name == 'workflow_dispatch' | ||
run: yarn publish:lib | ||
- name: Publish library | ||
if: github.event_name == 'workflow_dispatch' | ||
run: yarn publish:lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"extends": "../../.eslintrc.json", | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"parserOptions": { | ||
"project": ["projects/ngx-clipboard/tsconfig.lib.json", "projects/ngx-clipboard/tsconfig.spec.json"], | ||
"createDefaultProgram": true | ||
}, | ||
"rules": { | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"type": "attribute", | ||
"prefix": "ngx", | ||
"style": "camelCase" | ||
} | ||
], | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"type": "element", | ||
"prefix": "ngx", | ||
"style": "kebab-case" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
// Karma configuration file, see link for more information | ||
// https://karma-runner.github.io/1.0/config/configuration-file.html | ||
|
||
module.exports = function(config) { | ||
config.set({ | ||
basePath: '', | ||
frameworks: ['jasmine', '@angular-devkit/build-angular'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-jasmine-html-reporter'), | ||
require('karma-coverage-istanbul-reporter'), | ||
require('@angular-devkit/build-angular/plugins/karma') | ||
], | ||
client: { | ||
clearContext: false // leave Jasmine Spec Runner output visible in browser | ||
}, | ||
coverageIstanbulReporter: { | ||
dir: require('path').join(__dirname, '../../coverage'), | ||
reports: ['html', 'lcovonly'], | ||
fixWebpackSourcePaths: true | ||
}, | ||
reporters: ['progress', 'kjhtml'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['Chrome'], | ||
customLaunchers: { | ||
ChromeHeadlessCI: { | ||
base: 'ChromeHeadless', | ||
flags: ['--no-sandbox', '--disable-gpu'] | ||
}, | ||
}, | ||
singleRun: true | ||
}); | ||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '', | ||
frameworks: ['jasmine', '@angular-devkit/build-angular'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-jasmine-html-reporter'), | ||
require('karma-coverage-istanbul-reporter'), | ||
require('@angular-devkit/build-angular/plugins/karma') | ||
], | ||
client: { | ||
clearContext: false // leave Jasmine Spec Runner output visible in browser | ||
}, | ||
coverageIstanbulReporter: { | ||
dir: require('path').join(__dirname, '../../coverage'), | ||
reports: ['html', 'lcovonly'], | ||
fixWebpackSourcePaths: true | ||
}, | ||
reporters: ['progress', 'kjhtml'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['Chrome'], | ||
customLaunchers: { | ||
ChromeHeadlessCI: { | ||
base: 'ChromeHeadless', | ||
flags: ['--no-sandbox', '--disable-gpu'] | ||
} | ||
}, | ||
singleRun: true | ||
}); | ||
}; |
9 changes: 2 additions & 7 deletions
9
projects/ngx-clipboard/src/lib/ngx-clipboard-if-supported.directive.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.