Browse Source

migration to amber 0.14.17

Herbert Vojčík 9 years ago
parent
commit
b46b781a22
5 changed files with 27 additions and 14 deletions
  1. 15 6
      Gruntfile.js
  2. 4 3
      bower.json
  3. 1 1
      config-node.js
  4. 1 1
      devel.js
  5. 6 3
      package.json

+ 15 - 6
Gruntfile.js

@@ -11,7 +11,7 @@ module.exports = function (grunt) {
     grunt.loadNpmTasks('amber-dev');
 
     // Default task.
-    grunt.registerTask('default', ['amberc:all']);
+    grunt.registerTask('default', ['amdconfig:app', 'amberc:all']);
     grunt.registerTask('test', ['amdconfig:app', 'requirejs:test_runner', 'execute:test_runner', 'clean:test_runner']);
     grunt.registerTask('devel', ['amdconfig:app', 'requirejs:devel']);
     grunt.registerTask('deploy', ['amdconfig:app', 'requirejs:deploy']);
@@ -29,25 +29,31 @@ module.exports = function (grunt) {
         amberc: {
             options: {
                 amber_dir: path.join(__dirname, "bower_components", "amber"),
-                library_dirs: ['src']
+                configFile: "config.js"
             },
             all: {
                 src: [
                     'src/Web.st' // list all sources in dependency order
                     // list all tests in dependency order
                 ],
-                amd_namespace: 'trapped',
-                libraries: []
+                amd_namespace: 'amber/web',
+                libraries: ['amber_core/SUnit']
             }
         },
 
         amdconfig: {app: {dest: 'config.js'}},
 
         requirejs: {
+            options: {
+                useStrict: true
+            },
             deploy: {
                 options: {
                     mainConfigFile: "config.js",
-                    rawText: {"app": 'define(["deploy"],function(x){return x});'},
+                    rawText: {
+                        "amber/Platform": '/*stub*/',
+                        "app": 'define(["deploy"],function(x){return x});define("amber/Platform",["amber_core/Platform-Browser"],{});'
+                    },
                     pragmas: {
                         excludeIdeData: true,
                         excludeDebugContexts: true
@@ -59,7 +65,10 @@ module.exports = function (grunt) {
             devel: {
                 options: {
                     mainConfigFile: "config.js",
-                    rawText: {"app": 'define(["devel"],function(x){return x});'},
+                    rawText: {
+                        "amber/Platform": '/*stub*/',
+                        "app": 'define(["devel"],function(x){return x});define("amber/Platform",["amber_core/Platform-Browser"],{});'
+                    },
                     include: ['config', 'node_modules/requirejs/require', 'app'],
                     exclude: ['devel'],
                     out: "the.js"

+ 4 - 3
bower.json

@@ -23,14 +23,15 @@
     "test",
     "tests"
   ],
+  "private": false,
   "dependencies": {
     "amber": ">=0.12.6",
     "amber-contrib-jquery": ">=0.1.0"
   },
   "devDependencies": {
-    "amber": ">=0.14.4",
+    "amber": ">=0.14.17",
     "amber-ide-starter-dialog": "^0.1.0",
-    "amber-contrib-legacy": "^0.2.0",
-    "helios": ">=0.4.3"
+    "amber-contrib-legacy": "^0.2.1",
+    "helios": ">=0.5.3"
   }
 }

+ 1 - 1
config-node.js

@@ -2,6 +2,6 @@
 // when building an app to run in node.js.
 // Free to edit. You can break tests (cli test runner uses
 // this to build itself - it is a node executable).
-define("amber_core/Platform-Browser", ["amber_core/Platform-Node"], {});
+define("amber/Platform", ["amber_core/Platform-Node"], {});
 define("amber/browser-compatibility", {});
 define("jquery", {});

+ 1 - 1
devel.js

@@ -2,7 +2,7 @@ define([
     './testing',
     'amber/devel',
     // --- packages used only during development begin here ---
-    'amber-attic/IDE'
+    'amber/legacy/IDE'
     // --- packages used only during development end here ---
 ], function (amber) {
     return amber;

+ 6 - 3
package.json

@@ -4,11 +4,11 @@
   "description": "Amber Smalltalk's original Seaside-inspired DOM manipulation library",
   "main": "local.amd.json",
   "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
+    "test": "grunt test"
   },
   "repository": {
     "type": "git",
-    "url": "git://github.com/amber-smalltalk/amber-contrib-web"
+    "url": "git://github.com/amber-smalltalk/amber-contrib-web.git"
   },
   "keywords": [
     "amber",
@@ -21,8 +21,11 @@
     "url": "https://github.com/amber-smalltalk/amber-contrib-web/issues"
   },
   "homepage": "https://github.com/amber-smalltalk/amber-contrib-web",
+  "engines": {
+    "node": "0.10.x || 0.12.x || >=4.0.0"
+  },
   "devDependencies": {
-    "amber-dev": "^0.6.0",
+    "amber-dev": "^0.8.0",
     "grunt": "^0.4.5",
     "grunt-contrib-clean": "^0.6.0",
     "grunt-contrib-requirejs": "^0.4.4",