forked from aurelia/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enables support for SystemJS as module loader including new project setup via au new. closes aurelia#198
- Loading branch information
Showing
10 changed files
with
157 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
const ProjectItem = require('../../../project-item').ProjectItem; | ||
|
||
module.exports = function(project) { | ||
project.loader = project.model.loader.id; | ||
delete project.model.loader; // remove loader from model as it is actually a property of model.build | ||
|
||
project.loaderTextPlugin = 'text'; | ||
project.loaderScript = 'node_modules/requirejs/require.js'; | ||
project.addToContent( | ||
ProjectItem.resource('index.html', 'content/require.index.html') | ||
).addToClientDependencies( | ||
'requirejs', | ||
'text' | ||
); | ||
}; |
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,20 @@ | ||
'use strict'; | ||
const ProjectItem = require('../../../project-item').ProjectItem; | ||
|
||
module.exports = function(project) { | ||
project.loader = project.model.loader.id; | ||
delete project.model.loader; // remove loader from model as it is actually a property of model.build | ||
|
||
project.loaderTextPlugin = { | ||
'name': 'text', | ||
'path': '../node_modules/systemjs-plugin-text', | ||
'main': 'text' | ||
}; | ||
project.loaderScript = 'node_modules/systemjs/dist/system.js'; | ||
project.addToContent( | ||
ProjectItem.resource('index.html', 'content/system.index.html') | ||
).addToClientDependencies( | ||
'systemjs', | ||
'systemjs-plugin-text' | ||
); | ||
}; |
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
File renamed without changes.
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,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Aurelia</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
</head> | ||
|
||
<body aurelia-app="main"> | ||
<script src="scripts/vendor-bundle.js"></script> | ||
<script>SystemJS.import("aurelia-bootstrapper").catch(function(err) { console.log(err); })</script> | ||
</body> | ||
</html> |
Oops, something went wrong.