Commit f84815f2 authored by mdsecurity's avatar mdsecurity

updated angular cli

parent 7d78bf5b
...@@ -4,7 +4,7 @@ root = true ...@@ -4,7 +4,7 @@ root = true
[*] [*]
charset = utf-8 charset = utf-8
indent_style = space indent_style = space
indent_size = 4 indent_size = 2
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
......
...@@ -6,17 +6,22 @@ ...@@ -6,17 +6,22 @@
# dependencies # dependencies
/node_modules /node_modules
/bower_components
# IDEs and editors # IDEs and editors
/.idea /.idea
/.vscode
.project .project
.classpath .classpath
.c9/ .c9/
*.launch *.launch
.settings/ .settings/
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# misc # misc
/.sass-cache /.sass-cache
/connect.lock /connect.lock
......
# WhatsOpenA2 # WhatsOpenA2
This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.22-1. This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.26.
## Development server ## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding ## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class`. Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.
## Build ## Build
...@@ -22,10 +22,10 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github. ...@@ -22,10 +22,10 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`. Before running the tests make sure you are serving the app via `ng serve`.
## Deploying to Github Pages ## Deploying to GitHub Pages
Run `ng github-pages:deploy` to deploy to Github Pages. Run `ng github-pages:deploy` to deploy to GitHub Pages.
## Further help ## Further help
To get more help on the `angular-cli` use `ng --help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md). To get more help on the `angular-cli` use `ng help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
{ {
"project": { "project": {
"version": "1.0.0-beta.22-1", "version": "1.0.0-beta.26",
"name": "whats-open-a2" "name": "whats-open-a2"
}, },
"apps": [ "apps": [
...@@ -20,12 +20,9 @@ ...@@ -20,12 +20,9 @@
"styles": [ "styles": [
"../node_modules/bootstrap/scss/bootstrap.scss", "../node_modules/bootstrap/scss/bootstrap.scss",
"../node_modules/font-awesome/scss/font-awesome.scss", "../node_modules/font-awesome/scss/font-awesome.scss",
"styles.scss", "styles.scss"
"text-styles.scss"
],
"scripts": [
], ],
"scripts": [],
"environments": { "environments": {
"source": "environments/environment.ts", "source": "environments/environment.ts",
"dev": "environments/environment.ts", "dev": "environments/environment.ts",
...@@ -33,8 +30,6 @@ ...@@ -33,8 +30,6 @@
} }
} }
], ],
"addons": [],
"packages": [],
"e2e": { "e2e": {
"protractor": { "protractor": {
"config": "./protractor.conf.js" "config": "./protractor.conf.js"
......
...@@ -4,34 +4,35 @@ ...@@ -4,34 +4,35 @@
"license": "MIT", "license": "MIT",
"angular-cli": {}, "angular-cli": {},
"scripts": { "scripts": {
"ng": "ng",
"start": "ng serve", "start": "ng serve",
"lint": "tslint \"src/**/*.ts\"", "lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check",
"test": "ng test", "test": "ng test",
"pree2e": "webdriver-manager update", "pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor" "e2e": "protractor"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/common": "2.2.3", "@angular/common": "^2.3.1",
"@angular/compiler": "2.2.3", "@angular/compiler": "^2.3.1",
"@angular/core": "2.2.3", "@angular/core": "^2.3.1",
"@angular/forms": "2.2.3", "@angular/forms": "^2.3.1",
"@angular/http": "2.2.3", "@angular/http": "^2.3.1",
"@angular/platform-browser": "2.2.3", "@angular/platform-browser": "^2.3.1",
"@angular/platform-browser-dynamic": "2.2.3", "@angular/platform-browser-dynamic": "^2.3.1",
"@angular/router": "3.2.3", "@angular/router": "^3.3.1",
"bootstrap": "^4.0.0-alpha.6", "bootstrap": "^4.0.0-alpha.6",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"mapbox-gl": "^0.31.0", "font-awesome": "^4.7.0",
"rxjs": "5.0.0-beta.12", "rxjs": "^5.0.1",
"ts-helpers": "^1.1.1", "ts-helpers": "^1.1.1",
"zone.js": "^0.6.23" "zone.js": "^0.7.2"
}, },
"devDependencies": { "devDependencies": {
"@angular/compiler-cli": "2.2.3", "@angular/compiler-cli": "^2.3.1",
"@types/jasmine": "2.5.38", "@types/jasmine": "2.5.38",
"@types/node": "^6.0.42", "@types/node": "^6.0.42",
"angular-cli": "1.0.0-beta.22-1", "angular-cli": "1.0.0-beta.26",
"codelyzer": "~2.0.0-beta.1", "codelyzer": "~2.0.0-beta.1",
"jasmine-core": "2.5.2", "jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0", "jasmine-spec-reporter": "2.5.0",
...@@ -40,10 +41,9 @@ ...@@ -40,10 +41,9 @@
"karma-cli": "^1.0.1", "karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2", "karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1", "karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.9", "protractor": "~4.0.13",
"ts-node": "1.2.1", "ts-node": "1.2.1",
"tslint": "^3.15.1", "tslint": "^4.3.0",
"typescript": "~2.0.3", "typescript": "~2.0.3"
"webdriver-manager": "10.2.5"
} }
} }
// Protractor configuration file, see link for more information // Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/docs/referenceConf.js // https://github.com/angular/protractor/blob/master/lib/config.ts
/*global jasmine */ /*global jasmine */
var SpecReporter = require('jasmine-spec-reporter'); var SpecReporter = require('jasmine-spec-reporter');
......
var Xray = require('x-ray');
var fs = require('fs');
var x = Xray({
filters: {
trim: function (value) {
return value.trim()
},
reverse: function (value) {
return typeof value === 'string' ? value.split('').reverse().join('') : value
},
slice: function (value, start, end) {
return typeof value === 'string' ? value.slice(start, end) : value
},
parse_op_hrs: function (value) {
value = value.replace('Hours of Operation', '');
value = value.replace('Monday:', '');
value = value.replace('Tuesday:', ',');
value = value.replace('Wednesday:', ',');
value = value.replace('Thursday:', ',')
value = value.replace('Friday:', ',')
value = value.replace('Saturday:', ',')
value = value.replace('Sunday:', ',')
value = value.split(' ').join('');
value = value.split(',');
for(let i = 0; i < value.length;i++){
value[i] = value[i].split('-');
value[i][0].replace('a',',a')
value[i][0].replace('p',',p')
value[i][0].replace(':',',')
value[i][0].split(',');
value[i][0] = new Date()
}
return value;
}
}
});
x('http://dining.gmu.edu/dining-choices/hours-of-operation/', {
title: ['.storename | trim'],
location: ['.location | trim'],
operationHours: ['.open-closed-sign | parse_op_hrs']
// operation:''
})
// this fixes the json so each element in the array has a title location and oparation hours
(function (err, obj) {
let newObj = [];
for (let i = 0; i < obj.title.length; i++) {
let entry = {
title: obj.title[i],
location: obj.location[i],
operationHours: obj.operationHours[i]
}
newObj.unshift(entry);
}
fs.writeFile("results.json", JSON.stringify(newObj, null, "\t"), function (err) {
if (err) throw err;
});
})
let to_Date_Ob = function(hours){
if(hours[2] === 'pm'){
hours[1]+= 12;
}
let date = new Date();
}
...@@ -3,7 +3,7 @@ import './polyfills.ts'; ...@@ -3,7 +3,7 @@ import './polyfills.ts';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core'; import { enableProdMode } from '@angular/core';
import { environment } from './environments/environment'; import { environment } from './environments/environment';
import { AppModule } from './app/'; import { AppModule } from './app/app.module';
if (environment.production) { if (environment.production) {
enableProdMode(); enableProdMode();
......
// This file includes polyfills needed by Angular 2 and is loaded before // This file includes polyfills needed by Angular and is loaded before
// the app. You can add your own extra polyfills to this file. // the app. You can add your own extra polyfills to this file.
import 'core-js/es6/symbol'; import 'core-js/es6/symbol';
import 'core-js/es6/object'; import 'core-js/es6/object';
......
/* You can add global styles to this file, and also import other style files */
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import './polyfills.ts'; import './polyfills.ts';
import 'zone.js/dist/long-stack-trace-zone'; import 'zone.js/dist/long-stack-trace-zone';
...@@ -25,7 +27,7 @@ getTestBed().initTestEnvironment( ...@@ -25,7 +27,7 @@ getTestBed().initTestEnvironment(
platformBrowserDynamicTesting() platformBrowserDynamicTesting()
); );
// Then we find all the tests. // Then we find all the tests.
let context = require.context('./', true, /\.spec\.ts/); const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules. // And load the modules.
context.keys().map(context); context.keys().map(context);
// Finally, start Karma to run the tests. // Finally, start Karma to run the tests.
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"node_modules/codelyzer" "node_modules/codelyzer"
], ],
"rules": { "rules": {
"callable-types": true,
"class-name": true, "class-name": true,
"comment-format": [ "comment-format": [
true, true,
...@@ -11,10 +12,13 @@ ...@@ -11,10 +12,13 @@
"curly": true, "curly": true,
"eofline": true, "eofline": true,
"forin": true, "forin": true,
"import-blacklist": [true, "rxjs"],
"import-spacing": true,
"indent": [ "indent": [
true, true,
"spaces" "spaces"
], ],
"interface-over-type-literal": true,
"label-position": true, "label-position": true,
"max-line-length": [ "max-line-length": [
true, true,
...@@ -40,10 +44,12 @@ ...@@ -40,10 +44,12 @@
"no-debugger": true, "no-debugger": true,
"no-duplicate-variable": true, "no-duplicate-variable": true,
"no-empty": false, "no-empty": false,
"no-empty-interface": true,
"no-eval": true, "no-eval": true,
"no-inferrable-types": true, "no-inferrable-types": true,
"no-shadowed-variable": true, "no-shadowed-variable": true,
"no-string-literal": false, "no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true, "no-switch-case-fall-through": true,
"no-trailing-whitespace": true, "no-trailing-whitespace": true,
"no-unused-expression": true, "no-unused-expression": true,
...@@ -57,6 +63,7 @@ ...@@ -57,6 +63,7 @@
"check-else", "check-else",
"check-whitespace" "check-whitespace"
], ],
"prefer-const": true,
"quotemark": [ "quotemark": [
true, true,
"single" "single"
...@@ -79,6 +86,8 @@ ...@@ -79,6 +86,8 @@
"variable-declaration": "nospace" "variable-declaration": "nospace"
} }
], ],
"typeof-compare": true,
"unified-signatures": true,
"variable-name": false, "variable-name": false,
"whitespace": [ "whitespace": [
true, true,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment