Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
feat: upgrade to angular 10
Browse files Browse the repository at this point in the history
BREAKING CHANGE: requires angular > v10
  • Loading branch information
scttcper committed Jul 13, 2020
1 parent 938c51f commit 7fffe12
Show file tree
Hide file tree
Showing 19 changed files with 3,067 additions and 9,772 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions circle.yml → .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
jobs:
test:
docker:
- image: circleci/node:12-browsers
- image: circleci/node:14-browsers
environment:
CHROME_BIN: '/usr/bin/google-chrome'
steps:
Expand All @@ -27,12 +27,12 @@ jobs:
command: bash <(curl -s https://codecov.io/bash)
release:
docker:
- image: circleci/node:12
- image: circleci/node:14
steps:
- checkout
- run: npm ci
- run: npm run build
- run: npm run semantic-release
- run: cd dist && npx semantic-release

workflows:
version: 2
Expand Down
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Editor configuration, see http://editorconfig.org
# Editor configuration, see https://editorconfig.org
root = true

[*]
Expand All @@ -8,6 +8,9 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"printWidth": 100,
"arrowParens": "avoid"
}
39 changes: 15 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
<div align="center">
<h1>ngx-csv</h1>
<br>
<a href="https://www.npmjs.com/package/@ctrl/ngx-csv">
<img src="https://badge.fury.io/js/%40ctrl%2Fngx-csv.svg" alt="npm">
</a>
<a href="https://travis-ci.org/TypeCtrl/ngx-csv">
<img src="https://travis-ci.org/TypeCtrl/ngx-csv.svg?branch=master" alt="travis">
</a>
<a href="https://codecov.io/github/typectrl/ngx-csv">
<img src="https://img.shields.io/codecov/c/github/typectrl/ngx-csv.svg" alt="codecov">
</a>
<br>
<br>
</div>
# @ctrl/ngx-csv

[![npm](https://badgen.net/npm/v/@ctrl/ngx-csv)](https://www.npmjs.com/package/@ctrl/ngx-csv)
[![CircleCI](https://badgen.net/circleci/github/scttcper/ngx-csv)](https://circleci.com/gh/scttcper/ngx-csv)
[![coverage](https://badgen.net/codecov/c/github/scttcper/ngx-csv)](https://codecov.io/gh/scttcper/ngx-csv)

> Easily generate a CSV download in the browser with Angular
**Demo**: https://ngx-csv.netlify.com/
**Demo**: https://ngx-csv.vercel.app

### Install

Expand All @@ -31,7 +21,8 @@ Latest version available for each version of Angular
| ngx-trend | Angular |
| --------- | ------- |
| 2.1.1 | 8.x |
| current | >= 9.x |
| 3.0.1 | 9.x |
| current | >= 10.x |

### Import

Expand All @@ -49,12 +40,12 @@ Add the csvLink directive to your `<a>` tag

### Input

* **data**: The body of the csv
* **headers**: Set the first line of the csv
* **delimiter**: Set the seperator between values. Default `','`
* **filename**: Set the filename of the csv. Default `data.csv`
* **uFEFF**: Adds a Byte order mark to setup the csv as UTF-8. Default `true`
* **target**: Element target. Default `\_blank
- **data**: The body of the csv
- **headers**: Set the first line of the csv
- **delimiter**: Set the seperator between values. Default `','`
- **filename**: Set the filename of the csv. Default `data.csv`
- **uFEFF**: Adds a Byte order mark to setup the csv as UTF-8. Default `true`
- **target**: Element target. Default `\_blank

### Accepted Data Formats

Expand Down Expand Up @@ -115,4 +106,4 @@ const data = [

### See Also

* [react-csv](https://github.com/abdennour/react-csv)
- [react-csv](https://github.com/abdennour/react-csv)
19 changes: 13 additions & 6 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,27 @@
"projects": {
"ngx-csv": {
"projectType": "application",
"schematics": {},
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
Expand All @@ -41,19 +48,19 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
"maximumWarning": "2kb",
"maximumError": "4kb"
}
]
}
Expand Down
15 changes: 7 additions & 8 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function(config) {
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
Expand All @@ -10,18 +10,17 @@ module.exports = function(config) {
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-mocha-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage'),
dir: require('path').join(__dirname, './coverage/zzz'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true,
fixWebpackSourcePaths: true
},
reporters: ['mocha', 'kjhtml'],
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand All @@ -34,6 +33,6 @@ module.exports = function(config) {
},
},
singleRun: false,
restartOnFileChange: true,
restartOnFileChange: true
});
};
Loading

1 comment on commit 7fffe12

@vercel
Copy link

@vercel vercel bot commented on 7fffe12 Jul 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.