-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #329 from js-data/3.0
3.0
- Loading branch information
Showing
34 changed files
with
701 additions
and
700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | ||
}); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
({ | ||
name: 'main', | ||
mainConfigFile: 'main.js', | ||
out: 'bundle.js', | ||
optimize: 'none' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' } | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' } | ||
] | ||
} | ||
}; |
Oops, something went wrong.