Commit f84815f2 authored by mdsecurity's avatar mdsecurity

updated angular cli

parent 7d78bf5b
......@@ -4,7 +4,7 @@ root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
......
......@@ -6,17 +6,22 @@
# dependencies
/node_modules
/bower_components
# IDEs and editors
/.idea
/.vscode
.project
.classpath
.c9/
*.launch
.settings/
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# misc
/.sass-cache
/connect.lock
......
# 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
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
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
......@@ -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/).
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
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": {
"version": "1.0.0-beta.22-1",
"version": "1.0.0-beta.26",
"name": "whats-open-a2"
},
"apps": [
......@@ -20,12 +20,9 @@
"styles": [
"../node_modules/bootstrap/scss/bootstrap.scss",
"../node_modules/font-awesome/scss/font-awesome.scss",
"styles.scss",
"text-styles.scss"
],
"scripts": [
"styles.scss"
],
"scripts": [],
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
......@@ -33,8 +30,6 @@
}
}
],
"addons": [],
"packages": [],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
......
......@@ -4,34 +4,35 @@
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"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",
"pree2e": "webdriver-manager update",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "2.2.3",
"@angular/compiler": "2.2.3",
"@angular/core": "2.2.3",
"@angular/forms": "2.2.3",
"@angular/http": "2.2.3",
"@angular/platform-browser": "2.2.3",
"@angular/platform-browser-dynamic": "2.2.3",
"@angular/router": "3.2.3",
"@angular/common": "^2.3.1",
"@angular/compiler": "^2.3.1",
"@angular/core": "^2.3.1",
"@angular/forms": "^2.3.1",
"@angular/http": "^2.3.1",
"@angular/platform-browser": "^2.3.1",
"@angular/platform-browser-dynamic": "^2.3.1",
"@angular/router": "^3.3.1",
"bootstrap": "^4.0.0-alpha.6",
"core-js": "^2.4.1",
"mapbox-gl": "^0.31.0",
"rxjs": "5.0.0-beta.12",
"font-awesome": "^4.7.0",
"rxjs": "^5.0.1",
"ts-helpers": "^1.1.1",
"zone.js": "^0.6.23"
"zone.js": "^0.7.2"
},
"devDependencies": {
"@angular/compiler-cli": "2.2.3",
"@angular/compiler-cli": "^2.3.1",
"@types/jasmine": "2.5.38",
"@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",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
......@@ -40,10 +41,9 @@
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.9",
"protractor": "~4.0.13",
"ts-node": "1.2.1",
"tslint": "^3.15.1",
"typescript": "~2.0.3",
"webdriver-manager": "10.2.5"
"tslint": "^4.3.0",
"typescript": "~2.0.3"
}
}
// 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 */
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';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { environment } from './environments/environment';
import { AppModule } from './app/';
import { AppModule } from './app/app.module';
if (environment.production) {
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.
import 'core-js/es6/symbol';
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 'zone.js/dist/long-stack-trace-zone';
......@@ -25,7 +27,7 @@ getTestBed().initTestEnvironment(
platformBrowserDynamicTesting()
);
// Then we find all the tests.
let context = require.context('./', true, /\.spec\.ts/);
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
// Finally, start Karma to run the tests.
......
......@@ -3,6 +3,7 @@
"node_modules/codelyzer"
],
"rules": {
"callable-types": true,
"class-name": true,
"comment-format": [
true,
......@@ -11,10 +12,13 @@
"curly": true,
"eofline": true,
"forin": true,
"import-blacklist": [true, "rxjs"],
"import-spacing": true,
"indent": [
true,
"spaces"
],
"interface-over-type-literal": true,
"label-position": true,
"max-line-length": [
true,
......@@ -40,10 +44,12 @@
"no-debugger": true,
"no-duplicate-variable": true,
"no-empty": false,
"no-empty-interface": true,
"no-eval": true,
"no-inferrable-types": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unused-expression": true,
......@@ -57,6 +63,7 @@
"check-else",
"check-whitespace"
],
"prefer-const": true,
"quotemark": [
true,
"single"
......@@ -79,6 +86,8 @@
"variable-declaration": "nospace"
}
],
"typeof-compare": true,
"unified-signatures": true,
"variable-name": false,
"whitespace": [
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