Skip to content

Commit f632242

Browse files
committed
Stable Version 3.0.0-beta.1.
1 parent 72e3105 commit f632242

18 files changed

+489
-681
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ bower_components/
2020

2121
*.iml
2222
.idea/
23+
24+
build_examples/r.js/bundle.js

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
##### 3.0.0-beta.1 - 17 April 2015
2+
13
##### 2.4.0 - 15 April 2015
24

35
###### Backwards compatible API changes

Gruntfile.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ module.exports = function (grunt) {
7272
files: [
7373
'bower_components/angular-1.3.2/angular.js',
7474
'bower_components/angular-mocks-1.3.2/angular-mocks.js',
75-
'bower_components/js-data/dist/js-data.js',
75+
'node_modules/js-data/dist/js-data.js',
7676
'dist/js-data-angular.min.js',
7777
'karma.start.js',
7878
'test/**/*.js'
@@ -87,24 +87,26 @@ module.exports = function (grunt) {
8787
},
8888
webpack: {
8989
dist: {
90+
debug: true,
9091
entry: './src/index.js',
9192
output: {
9293
filename: './dist/js-data-angular.js',
93-
libraryTarget: 'umd',
94+
libraryTarget: 'umd2',
9495
library: 'jsDataAngularModuleName'
9596
},
9697
externals: {
9798
'js-data': {
98-
amd: 'js-data',
99+
amd: 'JSData',
99100
commonjs: 'js-data',
100101
commonjs2: 'js-data',
101102
root: 'JSData'
102103
},
104+
'axios': 'axios',
103105
'angular': 'angular'
104106
},
105107
module: {
106108
loaders: [
107-
{ test: /(.+)\.js$/, exclude: /node_modules/, loader: 'babel-loader?blacklist=useStrict' }
109+
{ test: /(.+)\.js$/, loader: 'babel-loader?blacklist=useStrict' }
108110
],
109111
preLoaders: [
110112
{

bower.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@
2525
"angular-mocks-1.1.5": "angular-mocks-unstable#1.1.5",
2626
"angular-mocks-1.2.16": "angular-mocks#1.2.16",
2727
"angular-mocks-1.2.25": "angular-mocks#1.2.25",
28-
"angular-mocks-1.3.2": "angular-mocks#1.3.2"
28+
"angular-mocks-1.3.2": "angular-mocks#1.3.2",
29+
"requirejs": "~2.1.17"
2930
},
3031
"dependencies": {
31-
"js-data": ">=1.5.7",
32+
"js-data": "2.0.0-beta.3",
33+
"js-data-http": "2.0.0-beta.3",
3234
"angular": ">=1.1.0"
3335
},
3436
"resolutions": {

build_examples/r.js/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
`r.js -o require.config.js` will produce `bundle.js`
2+
3+
In `index.html` switch `script/main` between `main` (load scripts dynamically) and `bundle` (load bundled scripts)

build_examples/r.js/app.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
define('app', [
2+
'angular',
3+
'js-data-angular'
4+
], function (angular, jsDataModuleName) {
5+
return angular.module('app', [jsDataModuleName])
6+
.run(function (DS, DSVersion, $rootScope) {
7+
$rootScope.test = 'It works! Using js-data ' + DSVersion.full;
8+
});
9+
});

build_examples/r.js/index.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>My App</title>
5+
<!-- load scripts dynamically -->
6+
<!--<script data-main="main" src="../../bower_components/requirejs/require.js"></script>-->
7+
8+
<!-- load bundled scripts -->
9+
<script data-main="bundle" src="../../bower_components/requirejs/require.js"></script>
10+
</head>
11+
<body ng-cloak>
12+
<h1>{{ test }}</h1>
13+
</body>
14+
</html>

build_examples/r.js/main.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
require.config({
2+
paths: {
3+
angular: '../../bower_components/angular/angular',
4+
'js-data-angular': '../../dist/js-data-angular',
5+
'JSData': '../../bower_components/js-data/dist/js-data'
6+
},
7+
shim: {
8+
'angular': {
9+
exports: 'angular'
10+
}
11+
}
12+
});
13+
14+
require([
15+
'angular',
16+
'app',
17+
'JSData'
18+
], function (angular, app) {
19+
angular.element(document.getElementsByTagName('html')[0]).ready(function () {
20+
// bootstrap the app manually
21+
angular.bootstrap(document, ['app']);
22+
});
23+
}
24+
);

build_examples/r.js/require.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
({
2+
name: 'main',
3+
mainConfigFile: 'main.js',
4+
out: 'bundle.js',
5+
optimize: 'none'
6+
})

0 commit comments

Comments
 (0)