Skip to content

Commit 7a4d69c

Browse files
committed
Tackle import issues
1 parent d2d2eef commit 7a4d69c

22 files changed

+391
-356
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Node generated files
2+
bundle
23
node_modules
4+
dist
35
npm-debug.log
46
# OS generated files
57
Thumbs.db

.npmignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Node generated files
22
node_modules
3+
./src
4+
tsconfig.json
35
npm-debug.log
6+
rollup*
47
# OS generated files
58
Thumbs.db
69
.DS_Store
@@ -15,4 +18,4 @@ Properties
1518
*.csproj
1619
*.user
1720

18-
gulpfile.js
21+
gulpfile.js

README.md

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,33 @@
11
ng2-gridstack
22
=============
33

4-
A gridstack component for Angular2. Based on [gridstack.js](https://github.com/troolee/gridstack.js).
4+
A gridstack component for Angular2+. Based on [gridstack.js](https://github.com/troolee/gridstack.js) 0.3.0.
55

66
Usage
77
=====
88
## Requirements
99

1010
* [gridstack.js](https://github.com/troolee/gridstack.js#usage)
11-
* [@angular/core](https://www.npmjs.com/package/@angular/core)
1211

1312
## Install
1413

1514
[![NPM version](https://img.shields.io/npm/v/ng2-gridstack.svg)](https://www.npmjs.com/package/ng2-gridstack)
1615

1716
```bash
18-
$ npm install ng2-gridstack
17+
$ npm install ng2-gridstack --save
1918
```
2019
## Basic Usage
2120

22-
Using SystemJs :
23-
24-
```js
25-
System.config({
26-
paths: {
27-
(...)
28-
},
29-
map: {
30-
'ng2-gridstack': 'npm:ng2-gridstack',
31-
(...)
32-
},
33-
packages: {
34-
app: {
35-
'ng2-gridstack': {
36-
main: './ng2-gridstack.js',
37-
defaultExtension: 'js'
38-
},
39-
(...)
40-
}
41-
```
42-
43-
Import the component in your module
21+
Import the module...
4422

4523
```ts
46-
import { GridStackComponent, GridStackItemDirective } from 'ng2-gridstack'
24+
import { GridStackModule } from 'ng2-gridstack'
4725
(...)
4826

4927
@NgModule({
5028
imports: [
5129
(...)
30+
GridStackModule,
5231
],
5332
declarations: [
5433
GridStackComponent,
@@ -62,6 +41,12 @@ import { GridStackComponent, GridStackItemDirective } from 'ng2-gridstack'
6241
export class YourModule { }
6342
```
6443

44+
and load gridstack's css. Example using the global css file from AngularCLI
45+
```css
46+
/* You can add global styles to this file, and also import other style files */
47+
@import "~gridstack/dist/gridstack.min.css";
48+
```
49+
6550
[ng2-gridstack](https://github.com/troolee/ng2-gridstack) can be used in two ways, either by letting the component add the items for you, or by building your own items.
6651

6752
#### First mode

ng2-gridstack.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

ng2-gridstack.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

ng2-gridstack.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

ng2-gridstack.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

package-lock.json

Lines changed: 249 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)