Skip to content

Commit a462327

Browse files
committed
Init project for Angular2 support l-lin#863 l-lin#864 l-lin#865
0 parents  commit a462327

File tree

572 files changed

+48981
-0
lines changed

Some content is hidden

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

572 files changed

+48981
-0
lines changed

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
13+
[*.md]
14+
max_line_length = 0
15+
trim_trailing_whitespace = false
16+
17+
# Indentation override
18+
#[lib/**.js]
19+
#[{package.json,.travis.yml}]
20+
#[**/**.js]

.github/CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Got a Question or Problem?
2+
3+
You can ask questions by posting an issue. There is no problem, I'll just add the label `question`.
4+
5+
However, please follow those simple guidelines before posting:
6+
7+
1. Describe your issue in an understandable english (english is not my native language, but I still try to write something decent, and so should you).
8+
2. Please be polite (and occasionally avoid being a beggar... :unamused:).
9+
3. Provide a code to illustrate your issue. A [plnkr](http://plnkr.co/) or something alike is better.
10+
4. Github provides us a wonderful [Markdown](https://help.github.com/articles/github-flavored-markdown) (text-to-HTML), so use it without restraint, especially when putting your code.
11+
5. Some really good advices on how to ask question:
12+
* on [StackOverflow](http://stackoverflow.com/help/how-to-ask)
13+
* on [DataTables](https://datatables.net/manual/tech-notes/10)
14+
15+
Well, that's just some common sense, so it should not be so hard to follow them.
16+
17+
Thank you.
18+
19+
# Found an Issue?
20+
21+
If you find a bug in the source code, you can help us by submitting an issue to our GitHub Repository. Even better, you can submit a Pull Request with a fix.
22+
23+
# Want a Feature?
24+
25+
You can request a new feature by submitting an issue to our GitHub Repository. If you would like to implement a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it.

.github/ISSUE_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Before you write your question, please take some extra time to write a good title that is short yet descriptive.
2+
3+
## What versions you are using?
4+
5+
- angular version:
6+
- jquery version:
7+
- datatables version:
8+
- angular-datatables version:
9+
10+
## What's the problem?
11+
12+
Describe your issue and be specific, especially in reproduction steps.
13+
Try to consistently reproduce your issue — in a clean environment.
14+
15+
## Can you share your code?
16+
17+
Write your example code using [Markdown](https://help.github.com/articles/github-flavored-markdown) syntax. Really, it's not difficult...
18+
If you can, a [plnkr](http://plnkr.co/), [jsfiddle](https://jsfiddle.net/), [codepen](http://codepen.io/) or something alike is even better!
19+
20+
Forgive me for being blunt, but if you can't follow this simple issue template (especially the code), don't expect me to help you efficiently!!!

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.idea
2+
*.iml
3+
typings/**
4+
node_modules
5+
jspm_packages
6+
link-checker-results.txt
7+
**/*npm-debug.log.*
8+
*.js
9+
*.js.map
10+
e2e/**/*.js
11+
e2e/**/*.js.map
12+
_test-output
13+
_temp
14+
.vscode
15+
16+
!karma*.js
17+
!protractor*.js
18+
!systemjs.config.js
19+
!typings/typings.d.ts
20+
!wallaby.js
21+
!index.js
22+
!index.d.js
23+
!dist/*.js
24+
!dist/*.js.map
25+
!demo/src/**/*.js

.npmignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
examples
2+
node_modules
3+
src
4+
typings
5+
.editorconfig
6+
_test-output
7+
.travis.yml
8+
karma-test-shim.js
9+
karma.conf.js
10+
tsconfig.json
11+
tslint.json
12+
typings.json
13+
protractor.config.js
14+
.github
15+
DEVELOPER.md
16+
systemjs.config.js
17+
.vscode
18+
demo

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
dist: trusty
2+
sudo: required
3+
language: node_js
4+
node_js:
5+
- "6"
6+
os:
7+
- linux
8+
env:
9+
global:
10+
- DBUS_SESSION_BUS_ADDRESS=/dev/null
11+
- DISPLAY=:99.0
12+
- CHROME_BIN=chromium-browser
13+
before_script:
14+
- sh -e /etc/init.d/xvfb start
15+
install:
16+
- npm install
17+
script:
18+
- npm run lint
19+
- npm run test-once

DEVELOPER.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Building angular-datatables
2+
3+
## Prerequisites
4+
5+
Node.js and npm are essential to Angular 2 development.
6+
7+
[Get it now](https://docs.npmjs.com/getting-started/installing-node) if it's not already installed on your machine.
8+
9+
**Verify that you are running at least node `v4.x.x` and npm `3.x.x`**
10+
by running `node -v` and `npm -v` in a terminal/console window.
11+
Older versions produce errors.
12+
13+
We recommend [nvm](https://github.com/creationix/nvm) or [n](https://github.com/tj/n) for managing multiple versions of node and npm.
14+
15+
## Clone this project
16+
17+
Clone this repo into new project folder (e.g., `my-proj`).
18+
```bash
19+
git clone https://github.com/l-lin/angular-datatables
20+
cd angular-datatables
21+
```
22+
23+
## Install npm packages
24+
25+
> See npm, n and nvm version notes above
26+
27+
Install the npm packages described in the `package.json` and verify that it works:
28+
29+
**Attention Windows Developers: You must run all of these commands in administrator mode**.
30+
31+
```bash
32+
npm install
33+
npm run build
34+
```
35+
36+
The `npm run build` command compiles the library,
37+
38+
### npm scripts
39+
40+
We've captured many of the most useful commands in npm scripts defined in the `package.json`:
41+
42+
* `npm run tsc` - runs the TypeScript compiler once.
43+
* `npm run tsc:w` - runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them.
44+
with excellent support for Angular apps that use routing.
45+
* `npm test` - compiles, runs and watches the karma unit tests
46+
* `npm build` - compiles and generate the JS files
47+
48+
## Testing
49+
50+
These tools are configured for specific conventions described below.
51+
52+
*It is unwise and rarely possible to run the application, the unit tests, and the e2e tests at the same time.
53+
We recommend that you shut down one before starting another.*
54+
55+
### Unit Tests
56+
TypeScript unit-tests are usually in the `src` folder. Their filenames must end in `.spec`.
57+
58+
Look for the example `src/angular-datatables.directive.spec.ts`.
59+
Add more `.spec.ts` files as you wish; we configured karma to find them.
60+
61+
Run it with `npm test`
62+
63+
That command first compiles the application, then simultaneously re-compiles and runs the karma test-runner.
64+
Both the compiler and the karma watch for (different) file changes.
65+
66+
Shut it down manually with Ctrl-C.
67+
68+
Test-runner output appears in the terminal window.
69+
We can update our app and our tests in real-time, keeping a weather eye on the console for broken tests.
70+
Karma is occasionally confused and it is often necessary to shut down its browser or even shut the command down (Ctrl-C) and
71+
restart it. No worries; it's pretty quick.
72+
73+
The `HTML-Reporter` is also wired in. That produces a prettier output; look for it in `~_test-output/tests.html`.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) Louis Lin <[email protected]> (l-lin.github.io)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Angular DataTables [![Build Status](https://travis-ci.org/l-lin/angular-datatables.png?branch=angular2)](https://travis-ci.org/l-lin/angular-datatables) [![npm version](https://badge.fury.io/js/angular-datatables.svg)](https://badge.fury.io/js/angular-datatables)
2+
3+
> [Angular 2](https://angular.io/) + [DataTables](https://datatables.net/)
4+
5+
# Documentation
6+
7+
Please check the [online documentation](http://l-lin.github.io/angular-datatables/)
8+
9+
# FAQ
10+
## Why version 2.X? Where is version 1.X?
11+
12+
Since AngularJS has released a version 2 that is breaking everything, I made a version 2 for simplicity purpose, to indicate the major version of this library is using the version 2 of AngularJS.
13+
14+
## Why is there less functionnalities?
15+
16+
Because, I'm still working on it... But, if you want to contribute, feel free to make a pull request!
17+
18+
## Will you still work on version 0.X.Y?
19+
20+
Only on bugs, and only if I have the time (which I don't really have much nowadays...)
21+
22+
## Why no BowerJS? GruntJS?
23+
24+
Let's not multiply the tools and do all in NPM!
25+
26+
## Where is the Angular renderer? What about the Promise renderer?
27+
28+
Not developed yet!
29+
30+
## Where are the DTOptionsBuilder, DTColumnBuilder and DTColumnDefBuilder?
31+
32+
In the first versions of angular-datatables, there were some builder to help using the directive.
33+
However, they seem to have brought more confusion instead. So, starting from version 2, you will need to provide the options directly, like in the DataTable's documentation.
34+
35+
# Getting involved
36+
37+
Check the [developer guide](DEVELOPER.md)
38+
39+
# LICENCE
40+
41+
[MIT](LICENCE)

demo/.editorconfig

Lines changed: 13 additions & 0 deletions
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

demo/.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
7+
# dependencies
8+
/node_modules
9+
/bower_components
10+
11+
# IDEs and editors
12+
/.idea
13+
/.vscode
14+
.project
15+
.classpath
16+
.c9/
17+
*.launch
18+
.settings/
19+
20+
# misc
21+
/.sass-cache
22+
/connect.lock
23+
/coverage/*
24+
/libpeerconnection.log
25+
npm-debug.log
26+
testem.log
27+
/typings
28+
29+
# e2e
30+
/e2e/*.js
31+
/e2e/*.map
32+
33+
#System Files
34+
.DS_Store
35+
Thumbs.db

demo/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# angular-datatables demo
2+
3+
This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.21.
4+
5+
## Development server
6+
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.
7+
8+
## Build
9+
10+
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.
11+
12+
## Deploying to Github Pages
13+
14+
Run `deploy-doc.sh` to deploy the documentation to the Github Pages
15+
16+
You may need to have the following:
17+
- git
18+
- angular-cli installed in global
19+
- have the basic commands in your OS
20+
21+
```
22+
./deploy-doc.sh "My commit message"
23+
```
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).

0 commit comments

Comments
 (0)