Gruntfile.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. module.exports = function(grunt) {
  2. var path = require('path');
  3. grunt.loadNpmTasks('amber-dev');
  4. grunt.loadNpmTasks('grunt-contrib-jshint');
  5. grunt.registerTask('default', ['amberc:cli']);
  6. grunt.initConfig({
  7. pkg: grunt.file.readJSON('package.json'),
  8. meta: {
  9. banner: '/*!\n <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> \n License: <%= pkg.license.type %> \n*/\n'
  10. },
  11. amberc: {
  12. options: {
  13. amber_dir: path.normalize(path.join(__dirname, "node_modules", "amber")),
  14. closure_jar: ''
  15. },
  16. amber_tests: {
  17. output_dir : 'src',
  18. src: ['src/Kernel-Tests.st', 'src/Compiler-Tests.st', 'src/SUnit-Tests.st'],
  19. libraries: ['SUnit']
  20. },
  21. cli: {
  22. output_dir: 'cli/src',
  23. src: ['cli/src/AmberCli.st'],
  24. libraries: [
  25. 'Compiler-Exceptions', 'Compiler-Core', 'Compiler-AST',
  26. 'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', 'parser',
  27. 'SUnit', 'Kernel-ImportExport',
  28. 'Kernel-Tests', 'Compiler-Tests', 'SUnit-Tests'
  29. ],
  30. main_class: 'AmberCli',
  31. output_name: '../support/amber-cli',
  32. amd_namespace: 'amber_cli'
  33. }
  34. },
  35. jshint: {
  36. cli: ['cli/src/*.js', 'cli/support/*.js']
  37. }
  38. });
  39. };