Skip to content

Commit dbc705d

Browse files
committed
first commit
0 parents  commit dbc705d

Some content is hidden

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

53 files changed

+22239
-0
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

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

.travis.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: node_js
2+
3+
notifications:
4+
email: false
5+
6+
node_js:
7+
- "14"
8+
9+
addons:
10+
chrome: stable
11+
12+
before_install:
13+
# start your web application and listen on `localhost`
14+
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
15+
16+
script:
17+
- npm run lint
18+
- npm run test:headless
19+
20+
after_success:
21+
- npm run build:prod
22+
- npm run semantic-release
23+
24+
branches:
25+
except:
26+
- /^v\d+\.\d+\.\d+$/

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Angular2 Cookie Law
2+
3+
> Angular2+ component that provides a banner to inform users about the cookie law now with Angular Universal support
4+
5+
Angular2 Cookie Law is an HTML `<cookie-law>` tag enhanced with styling and animation.

angular.json

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

e2e/protractor.conf.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Protractor configuration file, see link for more information
2+
// https://github.com/angular/protractor/blob/master/lib/config.ts
3+
4+
const { SpecReporter } = require('jasmine-spec-reporter');
5+
6+
exports.config = {
7+
allScriptsTimeout: 11000,
8+
specs: [
9+
'./src/**/*.e2e-spec.ts'
10+
],
11+
capabilities: {
12+
'browserName': 'chrome'
13+
},
14+
directConnect: true,
15+
baseUrl: 'http://localhost:4200/',
16+
framework: 'jasmine',
17+
jasmineNodeOpts: {
18+
showColors: true,
19+
defaultTimeoutInterval: 30000,
20+
print: function() {}
21+
},
22+
onPrepare() {
23+
require('ts-node').register({
24+
project: require('path').join(__dirname, './tsconfig.e2e.json')
25+
});
26+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27+
}
28+
};

e2e/src/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('workspace-project 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('Angular2CookieLaw');
13+
});
14+
});

e2e/src/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

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

0 commit comments

Comments
 (0)