|
@@ -12,96 +12,96 @@ function findAmberPath(options) {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
-module.exports = function(grunt) {
|
|
|
- var path = require('path');
|
|
|
+module.exports = function (grunt) {
|
|
|
+ var path = require('path');
|
|
|
|
|
|
- // These plugins provide necessary tasks.
|
|
|
- grunt.loadNpmTasks('grunt-execute');
|
|
|
- grunt.loadNpmTasks('grunt-contrib-clean');
|
|
|
- grunt.loadNpmTasks('grunt-contrib-less');
|
|
|
- grunt.loadNpmTasks('grunt-contrib-watch');
|
|
|
- grunt.loadNpmTasks('amber-dev');
|
|
|
+ // These plugins provide necessary tasks.
|
|
|
+ grunt.loadNpmTasks('grunt-execute');
|
|
|
+ grunt.loadNpmTasks('grunt-contrib-clean');
|
|
|
+ grunt.loadNpmTasks('grunt-contrib-less');
|
|
|
+ grunt.loadNpmTasks('grunt-contrib-watch');
|
|
|
+ grunt.loadNpmTasks('amber-dev');
|
|
|
|
|
|
- // Default task.
|
|
|
- grunt.registerTask('default', ['less', 'amberc:all']);
|
|
|
- grunt.registerTask('test', ['amberc:test_runner', 'execute:test_runner', 'clean:test_runner']);
|
|
|
- grunt.registerTask('devel', ['amdconfig:helios']);
|
|
|
+ // Default task.
|
|
|
+ grunt.registerTask('default', ['less', 'amberc:all']);
|
|
|
+ grunt.registerTask('test', ['amberc:test_runner', 'execute:test_runner', 'clean:test_runner']);
|
|
|
+ grunt.registerTask('devel', ['amdconfig:helios']);
|
|
|
|
|
|
- // Project configuration.
|
|
|
- grunt.initConfig({
|
|
|
- // Metadata.
|
|
|
- // pkg: grunt.file.readJSON(''),
|
|
|
- banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
|
|
|
- '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
|
|
|
- '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
|
|
|
- '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
|
|
|
- ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
|
|
|
- // task configuration
|
|
|
- less: {
|
|
|
- development: {
|
|
|
- files: {
|
|
|
- 'resources/helios.css': 'resources/helios.less'
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ // Project configuration.
|
|
|
+ grunt.initConfig({
|
|
|
+ // Metadata.
|
|
|
+ // pkg: grunt.file.readJSON(''),
|
|
|
+ banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
|
|
|
+ '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
|
|
|
+ '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
|
|
|
+ '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
|
|
|
+ ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
|
|
|
+ // task configuration
|
|
|
+ less: {
|
|
|
+ development: {
|
|
|
+ files: {
|
|
|
+ 'resources/helios.css': 'resources/helios.less'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- amberc: {
|
|
|
- options: {
|
|
|
- amber_dir: findAmberPath(['../..', 'bower_components/amber']),
|
|
|
- library_dirs: ['src', 'bower_components/amber-contrib-web/src']
|
|
|
- },
|
|
|
- all: {
|
|
|
- output_dir : 'src',
|
|
|
- src: [
|
|
|
- // list all sources in dependency order
|
|
|
- 'src/Helios-Core.st', 'src/Helios-Exceptions.st', 'src/Helios-Announcements.st',
|
|
|
- 'src/Helios-KeyBindings.st', 'src/Helios-Layout.st', 'src/Helios-Helpers.st',
|
|
|
- 'src/Helios-Commands-Core.st',
|
|
|
- 'src/Helios-Commands-Tools.st', 'src/Helios-Commands-Browser.st', 'src/Helios-Commands-SUnit.st',
|
|
|
- 'src/Helios-References.st', 'src/Helios-Inspector.st', 'src/Helios-Browser.st',
|
|
|
- 'src/Helios-Transcript.st', 'src/Helios-Workspace.st', 'src/Helios-Debugger.st',
|
|
|
- 'src/Helios-SUnit.st',
|
|
|
- // list all tests in dependency order
|
|
|
- 'src/Helios-Browser-Tests.st', 'src/Helios-Workspace-Tests.st', 'src/Helios-SUnit-Tests.st'
|
|
|
- ],
|
|
|
- libraries: ['Web', 'SUnit'],
|
|
|
- amd_namespace: 'helios',
|
|
|
- jsGlobals: ['navigator']
|
|
|
- },
|
|
|
- test_runner: {
|
|
|
- src: ['node_modules/amber-dev/lib/Test.st'],
|
|
|
- libraries: [
|
|
|
- /* add dependencies packages here */
|
|
|
- /* add other code-to-test packages here */
|
|
|
- 'SUnit',
|
|
|
- /* add other test packages here */
|
|
|
- ],
|
|
|
- main_class: 'NodeTestRunner',
|
|
|
- output_name: 'test_runner'
|
|
|
- }
|
|
|
- },
|
|
|
+ amberc: {
|
|
|
+ options: {
|
|
|
+ amber_dir: findAmberPath(['../..', 'bower_components/amber']),
|
|
|
+ library_dirs: ['src', 'bower_components/amber-contrib-web/src']
|
|
|
+ },
|
|
|
+ all: {
|
|
|
+ output_dir: 'src',
|
|
|
+ src: [
|
|
|
+ // list all sources in dependency order
|
|
|
+ 'src/Helios-Core.st', 'src/Helios-Exceptions.st', 'src/Helios-Announcements.st',
|
|
|
+ 'src/Helios-KeyBindings.st', 'src/Helios-Layout.st', 'src/Helios-Helpers.st',
|
|
|
+ 'src/Helios-Commands-Core.st',
|
|
|
+ 'src/Helios-Commands-Tools.st', 'src/Helios-Commands-Browser.st', 'src/Helios-Commands-SUnit.st',
|
|
|
+ 'src/Helios-References.st', 'src/Helios-Inspector.st', 'src/Helios-Browser.st',
|
|
|
+ 'src/Helios-Transcript.st', 'src/Helios-Workspace.st', 'src/Helios-Debugger.st',
|
|
|
+ 'src/Helios-SUnit.st',
|
|
|
+ // list all tests in dependency order
|
|
|
+ 'src/Helios-Browser-Tests.st', 'src/Helios-Workspace-Tests.st', 'src/Helios-SUnit-Tests.st'
|
|
|
+ ],
|
|
|
+ libraries: ['Web', 'SUnit'],
|
|
|
+ amd_namespace: 'helios',
|
|
|
+ jsGlobals: ['navigator']
|
|
|
+ },
|
|
|
+ test_runner: {
|
|
|
+ src: ['node_modules/amber-dev/lib/Test.st'],
|
|
|
+ libraries: [
|
|
|
+ /* add dependencies packages here */
|
|
|
+ /* add other code-to-test packages here */
|
|
|
+ 'SUnit',
|
|
|
+ /* add other test packages here */
|
|
|
+ ],
|
|
|
+ main_class: 'NodeTestRunner',
|
|
|
+ output_name: 'test_runner'
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- amdconfig: {helios: {dest: 'config.js'}},
|
|
|
+ amdconfig: {helios: {dest: 'config.js'}},
|
|
|
|
|
|
- execute: {
|
|
|
- test_runner: {
|
|
|
- src: ['test_runner.js']
|
|
|
- }
|
|
|
- },
|
|
|
+ execute: {
|
|
|
+ test_runner: {
|
|
|
+ src: ['test_runner.js']
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- clean: {
|
|
|
- test_runner: ['test_runner.js']
|
|
|
- },
|
|
|
+ clean: {
|
|
|
+ test_runner: ['test_runner.js']
|
|
|
+ },
|
|
|
|
|
|
- watch: {
|
|
|
- less: {
|
|
|
- files: ['resources/*.less'],
|
|
|
- tasks: ['less'],
|
|
|
- options: {
|
|
|
- spawn: false
|
|
|
+ watch: {
|
|
|
+ less: {
|
|
|
+ files: ['resources/*.less'],
|
|
|
+ tasks: ['less'],
|
|
|
+ options: {
|
|
|
+ spawn: false
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
|
|
|
};
|