Gruntfile.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. },
  15. amber_tests: {
  16. output_dir : 'src',
  17. src: ['src/Kernel-Tests.st', 'src/Compiler-Tests.st', 'src/SUnit-Tests.st'],
  18. libraries: ['SUnit']
  19. },
  20. cli: {
  21. output_dir: 'src',
  22. src: ['src/AmberCli.st'],
  23. libraries: [
  24. 'Compiler-Exceptions', 'Compiler-Core', 'Compiler-AST',
  25. 'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', 'parser',
  26. 'SUnit', 'Kernel-ImportExport',
  27. 'Kernel-Tests', 'Compiler-Tests', 'SUnit-Tests'
  28. ],
  29. main_class: 'AmberCli',
  30. output_name: '../support/amber-cli',
  31. amd_namespace: 'amber_cli'
  32. }
  33. },
  34. jshint: {
  35. cli: ['src/*.js', 'support/*.js']
  36. }
  37. });
  38. };