Commit 2624bac0 authored by Nick Poulden's avatar Nick Poulden
Browse files

IE can't deal with Docs.view.class so renamed to Docs.view.cls. Also started a...

IE can't deal with Docs.view.class so renamed to Docs.view.cls. Also started a production build rake task
parent 1d070e30
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -36,14 +36,14 @@ def load_sdk_vars
  end
end

def run_jsduck(paths)
def run_jsduck(paths, template_links = true)
  system [
    "ruby bin/jsduck",
    # --external=Error to ignore the Error class that Ext.Error extends.
    "--external=Error",
    # to create symbolic links to template files instead of copying them over.
    # Useful for development.  Turn off for deployment.
    "--template-links",
    (template_links ? "--template-links" : ""),
    '--link=\'<a href="#/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>\'',
    # Note that we wrap image template inside <p> because {@img} often
    # appears inline withing text, but that just looks ugly in HTML
@@ -67,6 +67,20 @@ task :sdk do
  ])
end

desc "Run JSDuck on ExtJS SDK for export"
task :export do
  load_sdk_vars
  run_jsduck([
    "#{SDK_DIR}/extjs/src",
    "#{SDK_DIR}/platform/src",
    "#{SDK_DIR}/platform/core/src",
  ], false)
  
  system "mkdir -p #{OUT_DIR}/extjs/resources/themes"
  system "cp #{SDK_DIR}/extjs-all.js #{OUT_DIR}/extjs"
  system "cp -r #{SDK_DIR}/resources/themes/images #{OUT_DIR}/extjs/resources/themes"
end

desc "Run JSDuck on the Docs app itself"
task :docs do
  load_sdk_vars
+7 −1
Original line number Diff line number Diff line
@@ -16,9 +16,14 @@ Ext.define("Docs.History", {

    // Parses current URL and navigates to the page
    navigate: function(token) {
        if (this.ignoreChange) {
            this.ignoreChange = false;
            return;
        }
        
        var url = this.parseToken(token);
        if (url.type === "api") {
            Docs.App.getController('Classes').loadClass(url.key);
            Docs.App.getController('Classes').loadClass(url.key, true);
        }
        else if (url.type === "guide") {
            Docs.App.getController('Classes').showGuide(url.key, true);
@@ -40,6 +45,7 @@ Ext.define("Docs.History", {
     * @param {String} token  the part of URL after #
     */
    push: function(token) {
        this.ignoreChange = true;
        Ext.util.History.add(token);
    }
});
+3 −3
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@ Ext.define('Docs.controller.Classes', {
    ],

    views: [
        'class.List',
        'class.Tree'
        'cls.List',
        'cls.Tree'
    ],

    init: function() {
+3 −3
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@
Ext.define('Docs.view.Viewport', {
    extend: 'Ext.container.Viewport',
    requires: [
        'Docs.view.class.Show',
        'Docs.view.class.List',
        'Docs.view.cls.Show',
        'Docs.view.cls.List',
        'Docs.History'
    ],

@@ -92,7 +92,7 @@ Ext.define('Docs.view.Viewport', {
                            xtype: 'classlist',
                            classData: Docs.overviewData
                        },
                        Ext.create('Docs.view.class.Show'),
                        Ext.create('Docs.view.cls.Show'),
                        {
                            autoScroll: true,
                            xtype: 'container',
+1 −1
Original line number Diff line number Diff line
/**
 * Renders class name and icon in page header.
 */
Ext.define('Docs.view.class.Header', {
Ext.define('Docs.view.cls.Header', {
    extend: 'Ext.container.Container',
    padding: '5 0 17 0',
    alias: 'widget.classheader',
Loading