Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

Commit

Permalink
Dev workflow improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiuconstantin committed Nov 19, 2018
1 parent 5142024 commit 055c4f6
Show file tree
Hide file tree
Showing 69 changed files with 9,517 additions and 6,438 deletions.
58 changes: 0 additions & 58 deletions .angular-cli.json

This file was deleted.

2 changes: 1 addition & 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 Down
10 changes: 1 addition & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
/dist
/tmp
/out-tsc
/components

# pack
*.tgz

# dependencies
/node_modules
Expand All @@ -34,14 +30,10 @@
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db
.vscode/
71 changes: 7 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,19 @@
cron-editor
===

A library that helps the user graphically build a CRON expression using Angular 2+. It is a fork of the vincentjames501's [angular-cron-gen](https://github.com/vincentjames501/angular-cron-gen) for AngularJS 1.5+.
`cron-editor` is library that helps the user graphically build a CRON expression (quartz format only) in an Angular application. It is a fork of [angular-cron-gen](https://github.com/vincentjames501/angular-cron-gen) for AngularJS, ported to Angular 2+ and heavily improved.

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.2.0. To run the sample app just run `npm run start` and go to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
This project contains the library along with an app to ease development and testing. It was generated with [Angular CLI](https://github.com/angular/angular-cli), following the awesome [Ng Library Series]() written by Todd Palmer.

To run the app just run `npm install`, then `npm run start` and go to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Demo

A work-in-progress demo can be found [here](https://claudiuconstantin.github.io/cron-editor/)
A quick demo of this app can be found [here](https://claudiuconstantin.github.io/cron-editor/).

## Usage
## Sample app

1. Install the npm package:
```
$ npm i cron-editor -S
```
2. Import the module in your own module:
```ts
import { CronEditorModule } from "cron-editor/cron-editor";
@NgModule({
imports: [..., CronEditorModule],
...
})
export class MyModule {
}
```
3. Use the component in your html code:
```html
<cron-editor [(cron)]="cronExpression"></cron-editor>
```
4. That's it, you're done!
## Options
```html
<cron-editor [(cron)]="cronExpression" [options]="cronOptions"></cron-editor>
```

```ts
import { CronOptions } from "cron-editor/cron-editor";

@Component({
...
})
export class MyComponent {
public cronOptions: CronOptions = {
formInputClass: 'form-control cron-editor-input',
formSelectClass: 'form-control cron-editor-select',
formRadioClass: 'cron-editor-radio',
formCheckboxClass: 'cron-editor-checkbox',

defaultTime: "10:00:00",

hideMinutesTab: false,
hideHourlyTab: false,
hideDailyTab: false,
hideWeeklyTab: false,
hideMonthlyTab: false,
hideYearlyTab: false,
hideAdvancedTab: true,
use24HourTime: true,
hideSeconds: false
};
}
```
This library is published as a [npm package](https://www.npmjs.com/package/cron-editor) you can directly include in your app. You can find a sample app [here](https://github.com/claudiuconstantin/cron-editor-sample).

## License:
Licensed under the MIT license
Licensed under the MIT license
171 changes: 171 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"cron-editor-app": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/cron-editor-app",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "cron-editor-app:build"
},
"configurations": {
"production": {
"browserTarget": "cron-editor-app:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "cron-editor-app:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"cron-editor-app-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "cron-editor-app:serve"
},
"configurations": {
"production": {
"devServerTarget": "cron-editor-app:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"cron-editor": {
"root": "projects/cron-editor",
"sourceRoot": "projects/cron-editor/src",
"projectType": "library",
"prefix": "cron",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/cron-editor/tsconfig.lib.json",
"project": "projects/cron-editor/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/cron-editor/src/test.ts",
"tsConfig": "projects/cron-editor/tsconfig.spec.json",
"karmaConfig": "projects/cron-editor/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/cron-editor/tsconfig.lib.json",
"projects/cron-editor/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "cron-editor-app"
}
2 changes: 0 additions & 2 deletions cron-editor.d.ts

This file was deleted.

7 changes: 0 additions & 7 deletions cron-editor.js

This file was deleted.

Loading

0 comments on commit 055c4f6

Please sign in to comment.