Skip to content

Commit 3d7b44e

Browse files
authored
Merge pull request #2328 from adumesny/master
Angular module lib
2 parents 5f6c8de + 7953790 commit 3d7b44e

Some content is hidden

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

41 files changed

+8136
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ Possible breaking change if you use nested grid JSON format, or original Angular
441441
* `GridStackOptions.addRemoveCB` -> `GridStack.addRemoveCB` is now global instead of grid option
442442
* removed `GridStackOptions.dragInOptions` since `GridStack.setupDragIn()` has it replaced since 4.0
443443
* remove `GridStackOptions.minWidth` obsolete since 5.1, use `oneColumnSize` instead
444-
* CSS rules removed `.grid-stack` prefix for anything already gs based, 12 column (default) now uses `.grid-stack-12`, `gs-min|max_w|h` attribute no longer written (but read)
444+
* CSS rules removed `.grid-stack` prefix for anything already gs based, 12 column (default) now uses `.gs-12`, extra.css is less than 1/4th it original size!, `gs-min|max_w|h` attribute no longer written (but read)
445445
446446
# jQuery Application
447447

angular/.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://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+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

angular/.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db
File renamed without changes.

angular/README_build.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# GridstackLib
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.10.
4+
5+
## Development server
6+
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application 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.
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 a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24+
25+
## Further help
26+
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

angular/angular.json

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

angular/package.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "gridstack-lib",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"ng": "ng",
6+
"start": "ng serve",
7+
"build": "ng build",
8+
"watch": "ng build --watch --configuration development",
9+
"test": "ng test"
10+
},
11+
"private": true,
12+
"dependencies": {
13+
"@angular/animations": "^14.2.0",
14+
"@angular/common": "^14.2.0",
15+
"@angular/compiler": "^14.2.0",
16+
"@angular/core": "^14.2.0",
17+
"@angular/forms": "^14.2.0",
18+
"@angular/platform-browser": "^14.2.0",
19+
"@angular/platform-browser-dynamic": "^14.2.0",
20+
"@angular/router": "^14.2.0",
21+
"gridstack": "^8.1.1",
22+
"rxjs": "~7.5.0",
23+
"tslib": "^2.3.0",
24+
"zone.js": "~0.11.4"
25+
},
26+
"devDependencies": {
27+
"@angular-devkit/build-angular": "^14.2.11",
28+
"@angular/cli": "~14.2.10",
29+
"@angular/compiler-cli": "^14.2.0",
30+
"@types/jasmine": "~4.0.0",
31+
"jasmine-core": "~4.3.0",
32+
"karma": "~6.4.0",
33+
"karma-chrome-launcher": "~3.1.0",
34+
"karma-coverage": "~2.2.0",
35+
"karma-jasmine": "~5.1.0",
36+
"karma-jasmine-html-reporter": "~2.0.0",
37+
"ng-packagr": "^14.2.0",
38+
"typescript": "~4.7.2"
39+
}
40+
}

angular/projects/demo/.browserslistrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR

angular/projects/demo/karma.conf.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false // leave Jasmine Spec Runner output visible in browser
23+
},
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, '../../coverage/demo'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
34+
},
35+
reporters: ['progress', 'kjhtml'],
36+
port: 9876,
37+
colors: true,
38+
logLevel: config.LOG_INFO,
39+
autoWatch: true,
40+
browsers: ['Chrome'],
41+
singleRun: false,
42+
restartOnFileChange: true
43+
});
44+
};

angular/projects/demo/src/app/app.component.css

Whitespace-only changes.

0 commit comments

Comments
 (0)