Skip to content

Commit 3963ef0

Browse files
committed
initial commit
1 parent f8958e7 commit 3963ef0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+16258
-2
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.gitignore

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/dist-server
6+
/tmp
7+
/out-tsc
8+
9+
# dependencies
10+
/node_modules
11+
12+
# IDEs and editors
13+
/.idea
14+
.project
15+
.classpath
16+
.c9/
17+
*.launch
18+
.settings/
19+
*.sublime-workspace
20+
21+
# IDE - VSCode
22+
.vscode/*
23+
!.vscode/settings.json
24+
!.vscode/tasks.json
25+
!.vscode/launch.json
26+
!.vscode/extensions.json
27+
28+
# misc
29+
/.sass-cache
30+
/connect.lock
31+
/coverage
32+
/libpeerconnection.log
33+
npm-debug.log
34+
yarn-error.log
35+
testem.log
36+
/typings
37+
38+
# e2e
39+
/e2e/*.js
40+
/e2e/*.map
41+
42+
# System Files
43+
.DS_Store
44+
Thumbs.db

README.md

+27-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
1-
# ng-image-slider
2-
Image slider with image lightbox in angular 6.
1+
# ImagegSlider
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.4.
4+
5+
## Development server
6+
7+
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.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24+
25+
## Further help
26+
27+
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).

angular.json

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"imageg-slider": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"architect": {
11+
"build": {
12+
"builder": "@angular-devkit/build-angular:browser",
13+
"options": {
14+
"outputPath": "dist/ng-image-slider",
15+
"index": "src/index.html",
16+
"main": "src/main.ts",
17+
"tsConfig": "src/tsconfig.app.json",
18+
"polyfills": "src/polyfills.ts",
19+
"assets": [
20+
"src/assets",
21+
"src/favicon.ico"
22+
],
23+
"styles": [
24+
"src/styles.css"
25+
],
26+
"scripts": []
27+
},
28+
"configurations": {
29+
"production": {
30+
"optimization": true,
31+
"outputHashing": "all",
32+
"sourceMap": false,
33+
"extractCss": true,
34+
"namedChunks": false,
35+
"aot": true,
36+
"extractLicenses": true,
37+
"vendorChunk": false,
38+
"buildOptimizer": true,
39+
"fileReplacements": [
40+
{
41+
"replace": "src/environments/environment.ts",
42+
"with": "src/environments/environment.prod.ts"
43+
}
44+
]
45+
}
46+
}
47+
},
48+
"serve": {
49+
"builder": "@angular-devkit/build-angular:dev-server",
50+
"options": {
51+
"browserTarget": "imageg-slider:build"
52+
},
53+
"configurations": {
54+
"production": {
55+
"browserTarget": "imageg-slider:build:production"
56+
}
57+
}
58+
},
59+
"extract-i18n": {
60+
"builder": "@angular-devkit/build-angular:extract-i18n",
61+
"options": {
62+
"browserTarget": "imageg-slider:build"
63+
}
64+
},
65+
"test": {
66+
"builder": "@angular-devkit/build-angular:karma",
67+
"options": {
68+
"main": "src/test.ts",
69+
"karmaConfig": "./karma.conf.js",
70+
"polyfills": "src/polyfills.ts",
71+
"tsConfig": "src/tsconfig.spec.json",
72+
"scripts": [],
73+
"styles": [
74+
"src/styles.css"
75+
],
76+
"assets": [
77+
"src/assets",
78+
"src/favicon.ico"
79+
]
80+
}
81+
},
82+
"lint": {
83+
"builder": "@angular-devkit/build-angular:tslint",
84+
"options": {
85+
"tsConfig": [
86+
"src/tsconfig.app.json",
87+
"src/tsconfig.spec.json"
88+
],
89+
"exclude": [
90+
"**/node_modules/**"
91+
]
92+
}
93+
}
94+
}
95+
},
96+
"imageg-slider-e2e": {
97+
"root": "",
98+
"sourceRoot": "e2e",
99+
"projectType": "application",
100+
"architect": {
101+
"e2e": {
102+
"builder": "@angular-devkit/build-angular:protractor",
103+
"options": {
104+
"protractorConfig": "./protractor.conf.js",
105+
"devServerTarget": "imageg-slider:serve"
106+
}
107+
},
108+
"lint": {
109+
"builder": "@angular-devkit/build-angular:tslint",
110+
"options": {
111+
"tsConfig": [
112+
"e2e/tsconfig.e2e.json"
113+
],
114+
"exclude": [
115+
"**/node_modules/**"
116+
]
117+
}
118+
}
119+
}
120+
},
121+
"ng-image-slider": {
122+
"root": "projects/ng-image-slider",
123+
"sourceRoot": "projects/ng-image-slider/src",
124+
"projectType": "library",
125+
"prefix": "lib",
126+
"architect": {
127+
"build": {
128+
"builder": "@angular-devkit/build-ng-packagr:build",
129+
"options": {
130+
"tsConfig": "projects/ng-image-slider/tsconfig.lib.json",
131+
"project": "projects/ng-image-slider/ng-package.json"
132+
},
133+
"configurations": {
134+
"production": {
135+
"project": "projects/ng-image-slider/ng-package.prod.json"
136+
}
137+
}
138+
},
139+
"test": {
140+
"builder": "@angular-devkit/build-angular:karma",
141+
"options": {
142+
"main": "projects/ng-image-slider/src/test.ts",
143+
"tsConfig": "projects/ng-image-slider/tsconfig.spec.json",
144+
"karmaConfig": "projects/ng-image-slider/karma.conf.js"
145+
}
146+
},
147+
"lint": {
148+
"builder": "@angular-devkit/build-angular:tslint",
149+
"options": {
150+
"tsConfig": [
151+
"projects/ng-image-slider/tsconfig.lib.json",
152+
"projects/ng-image-slider/tsconfig.spec.json"
153+
],
154+
"exclude": [
155+
"**/node_modules/**"
156+
]
157+
}
158+
}
159+
}
160+
}
161+
},
162+
"defaultProject": "imageg-slider",
163+
"schematics": {
164+
"@schematics/angular:component": {
165+
"prefix": "app",
166+
"styleext": "css"
167+
},
168+
"@schematics/angular:directive": {
169+
"prefix": "app"
170+
}
171+
}
172+
}

e2e/app.e2e-spec.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { AppPage } from './app.po';
2+
3+
describe('imageg-slider App', () => {
4+
let page: AppPage;
5+
6+
beforeEach(() => {
7+
page = new AppPage();
8+
});
9+
10+
it('should display welcome message', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('Welcome to app!');
13+
});
14+
});

e2e/app.po.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppPage {
4+
navigateTo() {
5+
return browser.get('/');
6+
}
7+
8+
getParagraphText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}

e2e/tsconfig.e2e.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/e2e",
5+
"baseUrl": "./",
6+
"module": "commonjs",
7+
"target": "es5",
8+
"types": [
9+
"jasmine",
10+
"jasminewd2",
11+
"node"
12+
]
13+
}
14+
}

karma.conf.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage-istanbul-reporter'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client:{
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
17+
},
18+
coverageIstanbulReporter: {
19+
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
20+
fixWebpackSourcePaths: true
21+
},
22+
23+
reporters: ['progress', 'kjhtml'],
24+
port: 9876,
25+
colors: true,
26+
logLevel: config.LOG_INFO,
27+
autoWatch: true,
28+
browsers: ['Chrome'],
29+
singleRun: false
30+
});
31+
};

0 commit comments

Comments
 (0)