Skip to content

Commit

Permalink
Merge pull request #329 from js-data/3.0
Browse files Browse the repository at this point in the history
3.0
  • Loading branch information
jmdobry committed Jul 3, 2015
2 parents 72e3105 + 65dbe3e commit c3d47b0
Show file tree
Hide file tree
Showing 34 changed files with 701 additions and 700 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ bower_components/

*.iml
.idea/

build_examples/r.js/bundle.js
build_examples/browserify/bundle.js
build_examples/webpack/bundle.js
build_examples/webpack_es6/bundle.js
build_examples/webpack_es6_2/bundle.js
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
##### 3.0.0 - 02 July 2015

Stable Version 3.0.0

##### 3.0.0-rc.1 - 28 June 2015

Stable Version 3.0.0-rc.1

##### 3.0.0-beta.2 - 19 April 2015

Added examples of various build setups `./build_examples/`

##### 3.0.0-beta.1 - 17 April 2015

###### Backwards compatible API changes
- #306 - Keep it DRY

###### Other
- #314 - Switch to using peerDependencies

##### 2.4.0 - 15 April 2015

###### Backwards compatible API changes
Expand Down
8 changes: 5 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = function (grunt) {
files: [
'bower_components/angular-1.3.2/angular.js',
'bower_components/angular-mocks-1.3.2/angular-mocks.js',
'bower_components/js-data/dist/js-data.js',
'node_modules/js-data/dist/js-data.min.js',
'dist/js-data-angular.min.js',
'karma.start.js',
'test/**/*.js'
Expand All @@ -87,10 +87,11 @@ module.exports = function (grunt) {
},
webpack: {
dist: {
debug: true,
entry: './src/index.js',
output: {
filename: './dist/js-data-angular.js',
libraryTarget: 'umd',
libraryTarget: 'umd2',
library: 'jsDataAngularModuleName'
},
externals: {
Expand All @@ -100,11 +101,12 @@ module.exports = function (grunt) {
commonjs2: 'js-data',
root: 'JSData'
},
'axios': 'axios',
'angular': 'angular'
},
module: {
loaders: [
{ test: /(.+)\.js$/, exclude: /node_modules/, loader: 'babel-loader?blacklist=useStrict' }
{ test: /(.+)\.js$/, loader: 'babel-loader?blacklist=useStrict' }
],
preLoaders: [
{
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Angular wrapper for [js-data](http://www.js-data.io).

#### What happened Angular-data?
Js-data-angular is Angular-data 2.0, with [js-data](http://www.js-data.io) as the framework-agnostic core. Documentation for Angular-data 1.x can be found at [angular-data.pseudobry.com](http://angular-data.pseudobry.com).
Angular-data is deprecated. js-data + js-data-angular is the new hotness.

### Guides
- [Angular + JSData (js-data-angular)](http://www.js-data.io/docs/js-data-angular)
Expand Down Expand Up @@ -41,7 +41,7 @@ __Latest Release:__ [![Latest Release](https://img.shields.io/github/release/js-

__Status:__

[![Dependency Status](https://img.shields.io/gemnasium/js-data/js-data-angular.svg?style=flat-square)](https://gemnasium.com/js-data/js-data-angular) [![Coverage Status](https://img.shields.io/coveralls/js-data/js-data-angular/master.svg?style=flat-square)](https://coveralls.io/r/js-data/js-data-angular?branch=master) [![Codacity](https://img.shields.io/codacy/e7690b906dfa471ebcc8b2bdc52e9662.svg?style=flat-square)](https://www.codacy.com/public/jasondobry/js-data-angular/dashboard)
[![Dependency Status](https://img.shields.io/gemnasium/js-data/js-data-angular.svg?style=flat-square)](https://gemnasium.com/js-data/js-data-angular) [![Coverage Status](https://img.shields.io/coveralls/js-data/js-data-angular/master.svg?style=flat-square)](https://coveralls.io/r/js-data/js-data-angular?branch=master) [![Codacity](https://img.shields.io/codacy/e7690b906dfa471ebcc8b2bdc52e9662.svg?style=flat-square)](https://www.codacy.com/public/jasondobry/js-data-angular/dashboard)

__Supported Platforms:__

Expand Down Expand Up @@ -99,6 +99,8 @@ app.controller('postCtrl', function ($scope, $routeParams, Post, Comment) {
[CHANGELOG.md](https://github.com/js-data/js-data-angular/blob/master/CHANGELOG.md)

### Community
- [Gitter Channel](https://gitter.im/js-data/js-data) - Better than IRC!
- [Announcements](http://www.js-data.io/blog)
- [Mailing List](https://groups.io/org/groupsio/jsdata) - Ask your questions!
- [Issues](https://github.com/js-data/js-data-angular/issues) - Found a bug? Feature request? Submit an issue!
- [GitHub](https://github.com/js-data/js-data-angular) - View the source code for js-data.
Expand Down
12 changes: 2 additions & 10 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,12 @@
"package.json"
],
"devDependencies": {
"angular-1.1.5": "angular-unstable#1.1.5",
"angular-1.2.16": "angular#1.2.16",
"angular-1.2.25": "angular#1.2.25",
"angular-1.3.2": "angular#1.3.2",
"angular-mocks-1.1.5": "angular-mocks-unstable#1.1.5",
"angular-mocks-1.2.16": "angular-mocks#1.2.16",
"angular-mocks-1.2.25": "angular-mocks#1.2.25",
"angular-mocks-1.3.2": "angular-mocks#1.3.2"
},
"dependencies": {
"js-data": ">=1.5.7",
"js-data": ">=2.0.0",
"js-data-http": ">=2.0.0",
"angular": ">=1.1.0"
},
"resolutions": {
"angular": "1.3.2"
}
}
3 changes: 3 additions & 0 deletions build_examples/browserify/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Running `browserify -x axios app.js > bundle.js` in this directory will produce `bundle.js`

Note the external dependency "axios" that is excluded from the build (it's not needed when using js-data-angular).
17 changes: 17 additions & 0 deletions build_examples/browserify/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// this is what you would do in a real app
// var angular = require('angular');

// for the example to work
var angular = require('../../node_modules/angular');

console.log(angular);

angular.module('app', [
// this is what you would do in a real app
// require('js-data-angular')

// for the example to work
require('../../dist/js-data-angular.js')
]).run(function (DS, DSVersion, $rootScope) {
$rootScope.test = 'It works! Using js-data ' + DSVersion.full;
});
11 changes: 11 additions & 0 deletions build_examples/browserify/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>My App</title>
<!-- load bundled scripts -->
<script src="bundle.js"></script>
</head>
<body>
<h1>{{ test }}</h1>
</body>
</html>
3 changes: 3 additions & 0 deletions build_examples/r.js/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Running `r.js -o require.config.js` in this directory will produce `bundle.js`

In `index.html` switch `script/main` between `main` (load scripts dynamically) and `bundle` (load bundled scripts)
9 changes: 9 additions & 0 deletions build_examples/r.js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
define('app', [
'angular',
'js-data-angular'
], function (angular, jsDataModuleName) {
return angular.module('app', [jsDataModuleName])
.run(function (DS, DSVersion, $rootScope) {
$rootScope.test = 'It works! Using js-data ' + DSVersion.full;
});
});
14 changes: 14 additions & 0 deletions build_examples/r.js/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>My App</title>
<!-- load scripts dynamically -->
<script data-main="main" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.17/require.min.js"></script>

<!-- load bundled scripts -->
<!--<script data-main="bundle" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.17/require.min.js"></script>-->
</head>
<body ng-cloak>
<h1>{{ test }}</h1>
</body>
</html>
23 changes: 23 additions & 0 deletions build_examples/r.js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require.config({
paths: {
angular: '../../bower_components/angular/angular',
'js-data-angular': '../../dist/js-data-angular',
'js-data': '../../bower_components/js-data/dist/js-data'
},
shim: {
'angular': {
exports: 'angular'
}
}
});

require([
'angular',
'app'
], function (angular, app) {
angular.element(document.getElementsByTagName('html')[0]).ready(function () {
// bootstrap the app manually
angular.bootstrap(document, ['app']);
});
}
);
6 changes: 6 additions & 0 deletions build_examples/r.js/require.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
({
name: 'main',
mainConfigFile: 'main.js',
out: 'bundle.js',
optimize: 'none'
})
3 changes: 3 additions & 0 deletions build_examples/webpack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Running `webpack` in this directory will produce `bundle.js`

Note the external dependency "axios" that is excluded from the build (it's not needed when using js-data-angular).
17 changes: 17 additions & 0 deletions build_examples/webpack/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// this is what you would do in a real app
// var angular = require('angular');

// for the example to work
var angular = require('../../node_modules/angular');

console.log(angular);

angular.module('app', [
// this is what you would do in a real app
// require('js-data-angular')

// for the example to work
require('../../dist/js-data-angular.js')
]).run(function (DS, DSVersion, $rootScope) {
$rootScope.test = 'It works! Using js-data ' + DSVersion.full;
});
11 changes: 11 additions & 0 deletions build_examples/webpack/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>My App</title>
<!-- load bundled scripts -->
<script src="bundle.js"></script>
</head>
<body>
<h1>{{ test }}</h1>
</body>
</html>
12 changes: 12 additions & 0 deletions build_examples/webpack/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
entry: './app.js',
output: {
filename: 'bundle.js'
},
externals: ['axios'],
resolve: {
alias: {
'js-data-angular': '../dist/js-data-angular.js'
}
}
};
3 changes: 3 additions & 0 deletions build_examples/webpack_es6/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Running `webpack` in this directory will produce `bundle.js`

Note the external dependency "axios" that is excluded from the build (it's not needed when using js-data-angular).
8 changes: 8 additions & 0 deletions build_examples/webpack_es6/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import angular from 'angular';
import jsDataModuleName from 'js-data-angular';

angular.module('app', [
jsDataModuleName
]).run((DS, DSVersion, $rootScope) => {
$rootScope.test = 'It works! Using js-data ' + DSVersion.full;
});
11 changes: 11 additions & 0 deletions build_examples/webpack_es6/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>My App</title>
<!-- load bundled scripts -->
<script src="bundle.js"></script>
</head>
<body>
<h1>{{ test }}</h1>
</body>
</html>
17 changes: 17 additions & 0 deletions build_examples/webpack_es6/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
entry: './app.js',
output: {
filename: 'bundle.js'
},
externals: ['axios'],
resolve: {
alias: {
'js-data-angular': '../../dist/js-data-angular.js'
}
},
module: {
loaders: [
{ test: /(.+)\.js$/, loader: 'babel-loader?blacklist=useStrict' }
]
}
};
3 changes: 3 additions & 0 deletions build_examples/webpack_es6_2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Running `webpack` in this directory will produce `bundle.js`

Note the external dependency "axios" that is excluded from the build (it's not needed when using js-data-angular).
8 changes: 8 additions & 0 deletions build_examples/webpack_es6_2/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'angular';
import 'js-data-angular';

angular.module('app', [
'js-data'
]).run((DS, DSVersion, $rootScope) => {
$rootScope.test = 'It works! Using js-data ' + DSVersion.full;
});
11 changes: 11 additions & 0 deletions build_examples/webpack_es6_2/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>My App</title>
<!-- load bundled scripts -->
<script src="bundle.js"></script>
</head>
<body>
<h1>{{ test }}</h1>
</body>
</html>
17 changes: 17 additions & 0 deletions build_examples/webpack_es6_2/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
entry: './app.js',
output: {
filename: 'bundle.js'
},
externals: ['axios'],
resolve: {
alias: {
'js-data-angular': '../../dist/js-data-angular.js'
}
},
module: {
loaders: [
{ test: /(.+)\.js$/, loader: 'babel-loader?blacklist=useStrict' }
]
}
};
Loading

0 comments on commit c3d47b0

Please sign in to comment.