Skip to content

Commit

Permalink
cli: built by requirejs
Browse files Browse the repository at this point in the history
  • Loading branch information
Herbert Vojčík committed Jun 8, 2015
1 parent 57953b4 commit d01bfc1
Show file tree
Hide file tree
Showing 2 changed files with 28,100 additions and 48,456 deletions.
27 changes: 23 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-execute');

grunt.registerTask('default', ['peg', 'amberc:all']);
grunt.registerTask('amberc:all', ['amberc:amber', 'amberc:cli', 'amberc:dev']);
grunt.registerTask('default', ['peg', 'build:all']);
grunt.registerTask('build:all', ['amberc:amber', 'build:cli', 'amberc:dev']);
grunt.registerTask('build:cli', ['amberc:cli', 'requirejs:cli']);
grunt.registerTask('test', ['amdconfig:amber', 'requirejs:test_runner', 'execute:test_runner', 'clean:test_runner']);
grunt.registerTask('devel', ['amdconfig:amber']);

Expand Down Expand Up @@ -62,8 +63,6 @@ module.exports = function (grunt) {
'SUnit', 'Platform-ImportExport',
'Kernel-Tests', 'Compiler-Tests', 'SUnit-Tests'
],
main_class: 'AmberCli',
output_name: '../support/amber-cli',
amd_namespace: 'amber_cli'
},
dev: {
Expand All @@ -74,6 +73,26 @@ module.exports = function (grunt) {
},

requirejs: {
cli: {
options: {
mainConfigFile: "config.js",
rawText: {
"app": "(" + function () {
define(["amber/devel", "amber_cli/AmberCli"], function (amber) {
amber.initialize();
amber.globals.AmberCli._main();
});
} + "());"
},
pragmas: {
// none, for repl to have all info
},
include: ['config-node', 'app'],
optimize: "none",
wrap: helpers.nodeWrap('app'),
out: "external/amber-cli/support/amber-cli.js"
}
},
test_runner: {
options: {
mainConfigFile: "config.js",
Expand Down
Loading

0 comments on commit d01bfc1

Please sign in to comment.