Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit f8db97d

Browse files
committed
Add bundles + Fix for @angular/cli 1.0.0-beta.32.3 #972
- Use @angular/cli version 1.0.0-beta.32.3 - Use rollup to generate bundles - `package.json` shamelessly copied from https://github.com/bbottema/ng2-simple-page-scroll
1 parent e75e3ef commit f8db97d

33 files changed

+307
-336
lines changed

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ _temp
1616
!karma*.js
1717
!protractor*.js
1818
!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
2519
!demo/src/**/*.js
20+
21+
# angular-datatables specific
22+
*.js.map
23+
*.d.ts
24+
*.metadata.json
25+
index*.js

.npmignore

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,67 @@
1-
examples
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Node template
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
13+
# Directory for instrumented libs generated by jscoverage/JSCover
14+
lib-cov
15+
16+
# Coverage directory used by tools like istanbul
17+
coverage
18+
19+
# Compiled binary addons (http://nodejs.org/api/addons.html)
20+
build/Release
21+
22+
# Dependency directory
223
node_modules
3-
src
4-
typings
5-
.editorconfig
6-
_test-output
7-
.travis.yml
24+
25+
/.codeclimate.yml
26+
/.gitignore
27+
/.gitattributes
28+
/.npmignore
29+
/.travis.yml
30+
/.eslintignore
31+
/.eslintrc
32+
33+
# Build System files
34+
/tslint.json
35+
/rollup-uglify.conf.js
36+
/rollup.conf.js
37+
/protractor.config.js
38+
/systemjs.config.js
39+
40+
# Typescript source files
41+
*.ts
42+
!*.d.ts
43+
*.js.map
44+
!/bundles/*.js.map
45+
!*.metadata.json
46+
tsconfig.json
47+
tsconfig-build.json
48+
49+
50+
# Editor specific
51+
.idea
52+
.vscode
53+
54+
# test cases
855
karma-test-shim.js
956
karma.conf.js
10-
tsconfig.json
11-
tslint.json
12-
typings.json
13-
protractor.config.js
57+
test
58+
_test-output
59+
60+
# other stuffs
1461
.github
1562
DEVELOPER.md
16-
systemjs.config.js
17-
.vscode
63+
.editorconfig
64+
65+
# angular-datatables specific
1866
demo
1967
deploy-doc.sh

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ install:
1616
- npm install
1717
script:
1818
- npm run lint
19-
- npm run test-once
19+
- npm run compile:tsc

demo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ You may need to have the following:
2424

2525
## Further help
2626

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).
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).

demo/angular-cli.json

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
23
"project": {
3-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.32.3",
45
"name": "angular-datatables-demo"
56
},
67
"apps": [
@@ -15,10 +16,10 @@
1516
],
1617
"index": "index.html",
1718
"main": "main.ts",
19+
"polyfills": "polyfills.ts",
1820
"test": "test.ts",
1921
"tsconfig": "tsconfig.json",
2022
"prefix": "app",
21-
"mobile": false,
2223
"styles": [
2324
"../node_modules/datatables.net-dt/css/jquery.dataTables.css",
2425
"../node_modules/materialize-css/dist/css/materialize.css",
@@ -29,41 +30,35 @@
2930
"../node_modules/tether/dist/js/tether.js",
3031
"../node_modules/datatables.net/js/jquery.dataTables.js"
3132
],
33+
"environmentSource": "environments/environment.ts",
3234
"environments": {
33-
"source": "environments/environment.ts",
3435
"dev": "environments/environment.ts",
3536
"prod": "environments/environment.prod.ts"
3637
}
3738
}
3839
],
39-
"addons": [],
40-
"packages": [
41-
"node_modules/angular2-highlight-js/lib"
42-
],
4340
"e2e": {
4441
"protractor": {
4542
"config": "./protractor.conf.js"
4643
}
4744
},
45+
"lint": [
46+
{
47+
"files": "src/**/*.ts",
48+
"project": "src/tsconfig.json"
49+
},
50+
{
51+
"files": "e2e/**/*.ts",
52+
"project": "e2e/tsconfig.json"
53+
}
54+
],
4855
"test": {
4956
"karma": {
5057
"config": "./karma.conf.js"
5158
}
5259
},
5360
"defaults": {
5461
"styleExt": "css",
55-
"prefixInterfaces": false,
56-
"inline": {
57-
"style": false,
58-
"template": false
59-
},
60-
"spec": {
61-
"class": false,
62-
"component": true,
63-
"directive": true,
64-
"module": false,
65-
"pipe": true,
66-
"service": true
67-
}
62+
"component": {}
6863
}
6964
}

demo/karma.conf.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,37 @@
44
module.exports = function (config) {
55
config.set({
66
basePath: '',
7-
frameworks: ['jasmine', 'angular-cli'],
7+
frameworks: ['jasmine', '@angular/cli'],
88
plugins: [
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
11-
require('karma-remap-istanbul'),
12-
require('angular-cli/plugins/karma')
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage-istanbul-reporter'),
13+
require('@angular/cli/plugins/karma')
1314
],
15+
client:{
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
17+
},
1418
files: [
1519
{ pattern: './src/test.ts', watched: false }
1620
],
1721
preprocessors: {
18-
'./src/test.ts': ['angular-cli']
22+
'./src/test.ts': ['@angular/cli']
1923
},
2024
mime: {
2125
'text/x-typescript': ['ts','tsx']
2226
},
23-
remapIstanbulReporter: {
24-
reports: {
25-
html: 'coverage',
26-
lcovonly: './coverage/coverage.lcov'
27-
}
27+
coverageIstanbulReporter: {
28+
reports: [ 'html', 'lcovonly' ],
29+
fixWebpackSourcePaths: true
2830
},
2931
angularCli: {
30-
config: './angular-cli.json',
32+
config: './.angular-cli.json',
3133
environment: 'dev'
3234
},
3335
reporters: config.angularCli && config.angularCli.codeCoverage
34-
? ['progress', 'karma-remap-istanbul']
35-
: ['progress'],
36+
? ['progress', 'coverage-istanbul']
37+
: ['progress', 'kjhtml'],
3638
port: 9876,
3739
colors: true,
3840
logLevel: config.LOG_INFO,

demo/package.json

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,57 +4,56 @@
44
"license": "MIT",
55
"angular-cli": {},
66
"scripts": {
7-
"lint": "tslint \"src/**/*.ts\"",
7+
"ng": "ng",
8+
"start": "ng serve",
89
"test": "ng test",
9-
"pree2e": "webdriver-manager update",
10-
"e2e": "protractor"
10+
"lint": "ng lint",
11+
"e2e": "ng e2e"
1112
},
1213
"private": true,
1314
"dependencies": {
14-
"@angular/common": "2.4.0",
15-
"@angular/compiler": "2.4.0",
16-
"@angular/core": "2.4.0",
17-
"@angular/forms": "2.4.0",
18-
"@angular/http": "2.4.0",
19-
"@angular/platform-browser": "2.4.0",
20-
"@angular/platform-browser-dynamic": "2.4.0",
21-
"@angular/router": "3.2.1",
15+
"@angular/common": "2.4.8",
16+
"@angular/compiler": "2.4.8",
17+
"@angular/core": "2.4.8",
18+
"@angular/forms": "2.4.8",
19+
"@angular/http": "2.4.8",
20+
"@angular/platform-browser": "2.4.8",
21+
"@angular/platform-browser-dynamic": "2.4.8",
22+
"@angular/platform-server": "2.4.8",
23+
"@angular/router": "3.4.8",
2224
"angular-datatables": "file:..",
2325
"angular2-highlight-js": "4.0.0",
2426
"core-js": "2.4.1",
25-
"datatables.net": "2.1.1",
26-
"datatables.net-bs": "2.1.1",
27-
"datatables.net-dt": "2.1.1",
28-
"datatables.net-responsive": "2.1.0",
29-
"datatables.net-responsive-bs": "2.1.0",
27+
"datatables.net": "1.10.13",
28+
"datatables.net-dt": "1.10.13",
29+
"datatables.net-responsive": "2.1.1",
3030
"datatables.net-scroller": "1.4.2",
31-
"datatables.net-scroller-bs": "1.4.2",
32-
"highlight.js": "9.8.0",
33-
"jquery": "3.1.0",
34-
"materialize-css": "0.97.8",
31+
"highlight.js": "9.9.0",
32+
"jquery": "3.1.1",
33+
"materialize-css": "0.98.0",
3534
"ng2-simple-page-scroll": "2.0.0",
36-
"rxjs": "5.1.0",
35+
"rxjs": "5.1.1",
3736
"tether": "1.3.8",
3837
"ts-helpers": "1.1.1",
39-
"zone.js": "0.7.6"
38+
"zone.js": "0.7.7"
4039
},
4140
"devDependencies": {
42-
"@angular/compiler-cli": "2.4.0",
41+
"@angular/cli": "1.0.0-beta.32.3",
42+
"@angular/compiler-cli": "2.4.8",
4343
"@types/jasmine": "2.5.38",
44-
"@types/node": "6.0.42",
45-
"angular-cli": "1.0.0-beta.21",
46-
"codelyzer": "1.0.0-beta.3",
47-
"jasmine-core": "2.5.2",
48-
"jasmine-spec-reporter": "2.5.0",
49-
"karma": "1.2.0",
50-
"karma-chrome-launcher": "2.0.0",
51-
"karma-cli": "1.0.1",
52-
"karma-jasmine": "1.0.2",
53-
"karma-remap-istanbul": "0.2.1",
54-
"protractor": "4.0.9",
55-
"ts-node": "1.2.1",
56-
"tslint": "3.13.0",
57-
"typescript": "2.0.3",
58-
"webdriver-manager": "10.2.5"
44+
"@types/node": "~6.0.60",
45+
"codelyzer": "~2.0.0-beta.4",
46+
"jasmine-core": "~2.5.2",
47+
"jasmine-spec-reporter": "~3.2.0",
48+
"karma": "~1.4.1",
49+
"karma-chrome-launcher": "~2.0.0",
50+
"karma-cli": "~1.0.1",
51+
"karma-jasmine": "~1.1.0",
52+
"karma-jasmine-html-reporter": "^0.2.2",
53+
"karma-coverage-istanbul-reporter": "^0.2.0",
54+
"protractor": "~5.1.0",
55+
"ts-node": "~2.0.0",
56+
"tslint": "~4.4.2",
57+
"typescript": "~2.0.10"
5958
}
6059
}

demo/protractor.conf.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Protractor configuration file, see link for more information
2-
// https://github.com/angular/protractor/blob/master/docs/referenceConf.js
2+
// https://github.com/angular/protractor/blob/master/lib/config.ts
33

44
/*global jasmine */
5-
var SpecReporter = require('jasmine-spec-reporter');
5+
const { SpecReporter } = require('jasmine-spec-reporter');
66

77
exports.config = {
88
allScriptsTimeout: 11000,
@@ -20,13 +20,12 @@ exports.config = {
2020
defaultTimeoutInterval: 30000,
2121
print: function() {}
2222
},
23-
useAllAngular2AppRoots: true,
2423
beforeLaunch: function() {
2524
require('ts-node').register({
2625
project: 'e2e'
2726
});
2827
},
29-
onPrepare: function() {
30-
jasmine.getEnv().addReporter(new SpecReporter());
28+
onPrepare() {
29+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
3130
}
3231
};

demo/src/app/app.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { Component, ElementRef } from '@angular/core';
22

3-
import { HighlightJsService } from 'angular2-highlight-js';
4-
53
@Component({
64
selector: 'app-root',
75
templateUrl: './app.component.html',

demo/src/app/getting-started.component.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ <h1 class="header center-on-small-only">Getting started</h1>
1313
<div class="section">
1414
<h2 class="header">Installation</h2>
1515
<p class="caption">
16-
To use angular-datatables, you need to have <a href="https://docs.npmjs.com/getting-started/installing-node">Node 4 or higher and NPM 3 or higher installed</a>.
16+
To use angular-datatables, you need to have <a href="https://docs.npmjs.com/getting-started/installing-node">Node 6.9.0 or higher and NPM 3 or higher installed</a>.
1717
</p>
1818
<p class="caption">
1919
The documentation will only deal with projects that use <a href="https://github.com/angular/angular-cli">angular-cli</a>. Indeed, the front-end ecosystem is evolving at a pace I can't follow anymore. Thus, there will only have a tutorial for angular-cli's project. If you managed to make it work in, for example, SystemJS projects, please submit a pull request to improve this documentation. Thanks!
2020
</p>
2121
<div class="col s12">
22-
<h4>Angular-CLI version 1.0.0-beta.21</h4>
22+
<h4>Angular-CLI version 1.0.0-beta.32.3</h4>
2323
<p>I recommend using <a href="https://github.com/angular/angular-cli">angular-cli</a> to create and manage your angular2 project</p>
2424
<p>
25-
Since Angular-CLI is still in beta, I prefer to warn you the demo was developpped in version <b>1.0.0-beta.21</b> and newer version of Angular-CLI may need to have different configuration.
25+
Since Angular-CLI is still in beta, I prefer to warn you the demo was developpped in version <b>1.0.0-beta.32.3</b> and newer version of Angular-CLI may need to have different configuration.
2626
</p>
2727
</div>
2828
<div class="col s12">
@@ -43,7 +43,6 @@ <h4 id="angular-cli">angular-cli.json</h4>
4343
<h4 id="ng-module">NgModule</h4>
4444
<p>
4545
Import the <code>DataTablesModule</code> at the appropriate level of your app.
46-
See the <a href="https://github.com/angular/angular-cli#3rd-party-library-installation">angular-cli documentation</a> for more information about installing 3rd party libraries.
4746
</p>
4847
<section [innerHTML]="ngModuleSnippet" highlight-js-content=".typescript"></section>
4948
</div>

demo/src/app/index.ts

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

0 commit comments

Comments
 (0)