Browse Source

Add package.json and Gruntfile.

Herbert Vojčík 9 years ago
parent
commit
1654557e93
3 changed files with 146 additions and 0 deletions
  1. 85 0
      Gruntfile.js
  2. 23 0
      LICENSE-MIT
  3. 38 0
      package.json

+ 85 - 0
Gruntfile.js

@@ -0,0 +1,85 @@
+'use strict';
+
+var fs = require('fs'),
+    path = require('path');
+
+function findAmberPath(options) {
+    var result;
+    options.some(function (x) {
+        var candidate = path.join(__dirname, x);
+        return fs.existsSync(path.join(candidate, 'support/boot.js')) && (result = candidate);
+    });
+    return result;
+}
+
+module.exports = function(grunt) {
+  var path = require('path');
+
+  // These plugins provide necessary tasks.
+  grunt.loadNpmTasks('grunt-contrib-clean');
+  grunt.loadNpmTasks('grunt-execute');
+  grunt.loadNpmTasks('amber-dev');
+
+  // Default task.
+  grunt.registerTask('default', ['amberc:all']);
+  grunt.registerTask('test', ['amberc:test_runner', 'execute:test_runner', 'clean:test_runner']);
+
+  // 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
+    amberc: {
+      options: {
+        amber_dir: findAmberPath(['../..', 'bower_components/amber']),
+        library_dirs: ['src'],
+        closure_jar: ''
+      },
+      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-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'
+      }
+    },
+
+    execute: {
+      test_runner: {
+        src: ['test_runner.js']
+      }
+    },
+
+    clean: {
+      test_runner: ['test_runner.js']
+    }
+  });
+
+};

+ 23 - 0
LICENSE-MIT

@@ -0,0 +1,23 @@
+Copyright (c) 2012-2013 Nicolas Petton
+Copyright (c) 2014 Helios contributors https://github.com/amber-smalltalk/helios/contributors
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.

+ 38 - 0
package.json

@@ -0,0 +1,38 @@
+{
+  "name": "helios",
+  "title": "Helios IDE for Amber",
+  "description": "Helios IDE for Amber Smalltalk",
+  "version": "0.1.0",
+  "homepage": "https://github.com/amber-smalltalk/helios",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/amber-smalltalk/helios"
+  },
+  "bugs": {
+    "url": "https://github.com/amber-smalltalk/helios/issues"
+  },
+  "licenses": [
+    {
+      "type": "MIT",
+      "url": "https://github.com/amber-smalltalk/helios/blob/master/LICENSE-MIT"
+    }
+  ],
+  "engines": {
+    "node": ">= 0.8.0"
+  },
+  "scripts": {
+    "test": "grunt test"
+  },
+  "devDependencies": {
+    "grunt": "~0.4.0",
+    "grunt-execute": "~0.2.1",
+    "grunt-contrib-clean": "~0.5.0",
+    "amber-dev": "~0.1.5"
+  },
+  "keywords": [
+    "Amber",
+    "Smalltalk",
+    "Helios",
+    "IDE"
+  ]
+}