소스 검색

Two-phase grunt compilation.

Works as a smoke test for
"Fix nasty bug when "dependent libs" not exported.".
Herby Vojčík 6 년 전
부모
커밋
dca521ef8d
1개의 변경된 파일9개의 추가작업 그리고 4개의 파일을 삭제
  1. 9 4
      Gruntfile.js

+ 9 - 4
Gruntfile.js

@@ -12,7 +12,7 @@ module.exports = function (grunt) {
     var helpers = require('./external/sdk').helpers;
 
     grunt.registerTask('default', ['peg', 'build:all']);
-    grunt.registerTask('build:all', ['amberc:amber', 'build:cli', 'amberc:dev']);
+    grunt.registerTask('build:all', ['amberc:lang', 'amberc:tests', 'build:cli', 'amberc:dev']);
     grunt.registerTask('build:cli', ['amberc:cli', 'amdconfig', 'requirejs:cli']);
     grunt.registerTask('test', ['amdconfig', 'requirejs:test_runner', 'exec:test_runner', 'clean:test_runner']);
     grunt.registerTask('devel', ['amdconfig']);
@@ -42,7 +42,7 @@ module.exports = function (grunt) {
                 amber_dir: process.cwd(),
                 closure_jar: ''
             },
-            amber: {
+            lang: {
                 output_dir: 'src',
                 src: ['src/Kernel-Helpers.st',
                     'src/Kernel-Objects.st', 'src/Kernel-Classes.st', 'src/Kernel-Methods.st', 'src/Kernel-Collections.st',
@@ -51,11 +51,16 @@ module.exports = function (grunt) {
                     'src/Platform-DOM.st',
                     'src/Kernel-Dag.st', 'src/Compiler-Core.st', 'src/Compiler-AST.st',
                     'src/Compiler-IR.st', 'src/Compiler-Inlining.st', 'src/Compiler-Semantic.st', 'src/Compiler-Interpreter.st',
-                    'src/SUnit.st',
-                    'src/Kernel-Tests.st', 'src/Compiler-Tests.st', 'src/Platform-DOM-Tests.st', 'src/SUnit-Tests.st'
+                    'src/SUnit.st'
                 ],
                 jsGlobals: ['navigator']
             },
+            tests: {
+                output_dir: 'src',
+                src: ['src/Kernel-Tests.st', 'src/Compiler-Tests.st', 'src/Platform-DOM-Tests.st', 'src/SUnit-Tests.st'],
+                libraries: ['amber_core/SUnit'],
+                jsGlobals: ['navigator']
+            },
             cli: {
                 output_dir: 'external/cli/src',
                 src: ['external/cli/src/AmberCli.st'],