Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : building steal config key broken

$
0
0
I used the wrong wording. I didn't fix anything. I went with an older install of steal-tools and it builds to something that works. The output looks like the first example.

With a fresh install of steal-tools, it doesn't work. The output looks like the second example.

By not work I mean our application compiles into a single JS file, but when we load it, it doesn't behave like stealconfig existed and tries to load dependencies which don't exist because map and path aren't set. 

Don't know if it's useful, but here is our stealconfig

  1.   steal.config({
  2.         map: {
  3.             "mootools/mootools": "mootools",
  4.             "mootools-more/mootools-more": "mootools-more",
  5.             "mootools-datepicker/mootools-datepicker": "mootools-datepicker"
  6.         },
  7.         paths: {
  8.             "mootools": "bower_components/mootools/dist/mootools-core.js",
  9.             "mootools-more" : "MooTools-More-1.5.1.js",
  10.             "mootools-datepicker" : "mootools-datepicker/Source/Picker.js",
  11.             "mooRainbow/colourPicker" : "mooRainbow/colourPicker.js",
  12.             "views": "views.production",
  13.             "steal/dev.js": "can/lib/steal/dev/dev.js", // special can steal
  14.             "can/util/util": "can/util/mootools/mootools.js" // util defaults to jquery, we want mootools
  15.         },
  16.         meta: {
  17.             "mootools" : {
  18.                 format: "global",
  19.                 deps: supportsUnknownElements ? undefined : ["can/lib/html5shiv.js"],
  20.                 scriptEval: true
  21.             },
  22.             "mootools-more" : {
  23.                 format: "global",
  24.                 deps: ['mootools'],
  25.                 scriptEval: true
  26.             },
  27.             "punycode.js": {
  28.                 format: "global",
  29.                 exports: "punycode"
  30.             },
  31.             "mootools-datepicker": {
  32.                 format: "global",
  33.                 deps: ["mootools"],
  34.                 exports: "Picker"
  35.             },
  36.             "mootools-datepicker/Source/Picker.Attach.js": {
  37.                 format: "global",
  38.                 exports: "Picker.Attach",
  39.                 deps: [
  40.                     "mootools-datepicker"
  41.                 ]
  42.             },
  43.           "mootools-datepicker/Source/Picker.Date.js": {
  44.                 format: "global",
  45.                 exports: "Picker.Date",
  46.                 deps: [
  47.                     "mootools-datepicker/Source/Locale.en-US.DatePicker.js",
  48.                     "mootools-datepicker"
  49.                 ]
  50.             },
  51.             "mootools-datepicker/Source/Picker.Date.Range.js": {
  52.                 format: "global",
  53.                 exports: "Picker.Date.Range",
  54.                 deps: [
  55.                     "mootools-datepicker/Source/Picker.Attach.js"
  56.                 ]
  57.             },
  58.             "mooRainbow/mooRainbow-1.4.js": {
  59.                 format: "global",
  60.                 exports: "MooRainbow",
  61.                 deps: [
  62.                     "mootools",
  63.                     "mootools-more"
  64.                 ]
  65.             },
  66.             "mooRainbow/colourPicker.js": {
  67.                 format: "global",
  68.                 exports: "MooRainbow",
  69.                 deps: [
  70.                     "mootools",
  71.                     "mootools-more",
  72.                     "mooRainbow/mooRainbow-1.4.js"
  73.                 ]
  74.             },
  75.             "arian-mootools-form-upload-beac887/Source/Request.File.js": {
  76.                 format: "global",
  77.                 exports: "Request.File",
  78.                 deps: ['mootools']
  79.             }
  80.         },
  81.         ext: {
  82.             ejs: "can/view/ejs/ejs.js",
  83.             mustache: "can/view/mustache/mustache.js"
  84.         }
  85.     });
  86.     System.buildConfig = {
  87.       map: {
  88.         "can/util/util": "can/util/domless/domless"
  89.       }
  90. };

and Gruntfile

  1. 'use strict';
  2. module.exports = function (grunt) {
  3.   grunt.initConfig({
  4.     stealBuild: {
  5.         default: {
  6.             options: {
  7.                 system: {
  8.                     main: "ucp2/ucp2",
  9.                     config: __dirname + "/stealconfig.js"
  10.                 }
  11.             }
  12.         }
  13.     },
  14.     options: {
  15.         wrapper: 'steal("can/view/ejs", function() { {{{content}}} })'
  16.     },
  17.     cancompile: {
  18.         dist: {
  19.             src: ['templates/*.ejs', 'templates/email/*.ejs'],
  20.             dest: 'views.production.js'
  21.         }
  22.     }
  23. })
  24.   grunt.loadNpmTasks('steal-tools');
  25.   grunt.registerTask('build',['stealBuild']);
  26. };

Viewing all articles
Browse latest Browse all 3491

Trending Articles