Gruntfile.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. module.exports = function(grunt) {
  2. grunt.loadNpmTasks('../node_modules/amber-dev');
  3. grunt.registerTask('default', ['amberc:hello']);
  4. grunt.initConfig({
  5. pkg: grunt.file.readJSON('../package.json'),
  6. amberc: {
  7. options: {
  8. amber_dir: 'node_modules/amber',
  9. closure_jar: ''
  10. },
  11. hello: {
  12. src: ['hello/Hello.st'],
  13. main_class: 'Hello',
  14. amd_namespace: 'amber_examples_hello',
  15. output_name: 'hello/Program'
  16. },
  17. writefile: {
  18. src: ['writefile/WriteFile.st'],
  19. main_class: 'WriteFile',
  20. amd_namespace: 'amber_examples_hello',
  21. output_name: 'writefile/Program'
  22. },
  23. benchfib: {
  24. src: ['benchfib/Benchfib.st'],
  25. main_class: 'Benchfib',
  26. amd_namespace: 'amber_examples_benchfib',
  27. output_name: 'benchfib/Program'
  28. },
  29. meta: {
  30. src: ['meta/MyScript.st'],
  31. main_class: 'MyScript',
  32. libraries: [
  33. 'Kernel-ImportExport', 'Compiler-Exceptions', 'Compiler-Core', 'Compiler-AST',
  34. 'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', 'parser'
  35. ],
  36. amd_namespace: 'amber_examples_meta',
  37. output_name: 'meta/Program'
  38. },
  39. pystone: {
  40. src: ['pystone/Pystone.st'],
  41. main_class: 'Pystone',
  42. amd_namespace: 'amber_examples_pystone',
  43. output_name: 'pystone/Program'
  44. },
  45. trivialserver: {
  46. src: ['trivialserver/TrivialServer.st'],
  47. main_class: 'TrivialServer',
  48. amd_namespace: 'amber_examples_trivialserver',
  49. output_name: 'trivialserver/Program'
  50. }
  51. }
  52. });
  53. }