Permalink
Browse files

[cleanup] OPAges: remove dead code

  • Loading branch information...
1 parent ce762a1 commit ab65ac0fb0785cd3c8733e6841198d970b1ffccb @OpaOnWindowsNow OpaOnWindowsNow committed Mar 7, 2012
@@ -1,18 +0,0 @@
-########################################
-# USER VARIABLES
-EXE = main.exe
-PACKNAME = opages.opx
-SRC = src/page.opa #src/types.opa src/db_declaration.opa src/db_access.opa src/page.opa src/tag_engine.opa
-MAINSRC = src/main.opa src/users.opa src/template_demo.opa
-PCK = opace.opx
-PCKDIR = ./
-PLUGIN =
-PLUGINDIR =
-
-#Compiler variables
-OPACOMPILER = opa
-FLAG =
-OPADOC = opadoc-gen.exe
-PORT = 9000
-
-include Makefile.common
@@ -1,75 +0,0 @@
-########################################
-# MAKEFILE VARIABLES
-OPA = $(OPACOMPILER) $(FLAG) $(OPAOPT)
-PWD ?= $(shell pwd)
-BUILDDIR ?= $(PWD)/_build/
-export BUILDDIR
-BUILDDOCDIR ?=$(PWD)/doc/
-export BUILDDOCDIR
-PACKDOC = $(BUILDDOCDIR)/$(PACKNAME:%.opx=%.doc)/
-BUILDDOC = $(PACKDOC)
-OPACOMPILER ?= opa
-OPADOC ?= opadoc-gen.exe
-DEPENDS = $(SRC) $(PCK:%=$(BUILDDIR)/%) $(PLUGIN:%=$(BUILDDIR)/%)
-
-########################################
-# MAIN RULE
-exe : $(EXE)
-pack : $(PACKNAME)
-doc : $(PACKDOC) doc.sub
-
-########################################
-# MAIN PACKAGE BUILDING
-$(PACKNAME) : $(BUILDDIR)/$(PACKNAME)
-
-$(BUILDDIR)/$(PACKNAME) : $(DEPENDS)
- @echo "### Building package $(PACKNAME)"
- $(OPA) --autocompile $(SRC) $(PLUGIN:%=$(BUILDDIR)/%) --build-dir $(BUILDDIR) -I $(BUILDDIR)
- @mv $(PACKNAME) $(BUILDDIR)/
-
-########################################
-# SUBS PACKAGE/PLUGIN BUILDING
-$(BUILDDIR)/%.opx :
- make $(@:$(BUILDDIR)/%.opx=-C $(PCKDIR)%) pack
-
-$(BUILDDIR)/%.opp :
- make $(@:$(BUILDDIR)/%.opp=-C $(PLUGINDIR)/%)
-
-########################################
-# EXECUTABLE BUILDING
-$(EXE) : $(PCK:%.opx=$(BUILDDIR)/%.opx) $(SRC) $(MAINSRC)
- @echo "### Building executable $(EXE)"
- $(OPA) $(MAINSRC) $(SRC) $(PLUGIN:%=$(BUILDDIR)/%) -o $@ -I $(BUILDDIR) --build-dir $(BUILDDIR)/$(EXE)
-
-$(EXE:%.exe=%.run) : $(EXE)
- ./$(EXE) -p $(PORT)
-
-########################################
-# DOCUMENTATION BUILDING - Dirty...
-$(PACKDOC) : $(DEPENDS)
- @echo "### Building documentation $(PACKNAME:%.opx=%.doc)"
- @mkdir -p $(BUILDDOC)
- @$(OPACOMPILER) $(SRC) $(PLUGIN:%=$(BUILDDIR)/%) --generate-interface -I $(BUILDDIR)
- @mv $(SRC:%=%.api) $(BUILDDOC)
- @mv $(SRC:%=%.api-txt) $(BUILDDOC)
- @ ls $(BUILDDOC)
- @$(OPADOC) $(BUILDDOC)
- @mkdir -p $(PACKDOC)
- @mv doc/*.html doc/*.css $(PACKDOC)
-
-doc.sub :
- @if [ -n "$(PCK)" ]; then make $(PCK:%.opx=-C $(PCKDIR)/%) doc; fi
-
-########################################
-# Using by recursives makefile
-pack.depends :
- @echo $(PCK) $(PLUGIN)
-
-########################################
-# CLEANING
-clean :
- @$(PCK:%.opx=make -C $(PCKDIR)/% clean &&) $(PLUGIN:%.opp=make -C $(PLUGINDIR)/% clean &&) echo -n
- @if [ -n "$(PACKNAME)" ]; then echo "### Cleaning $(PACKNAME)"; rm -rf $(BUILDDIR)/$(PACKNAME)*; fi
- @if [ -n "$(EXE)" ]; then echo "### Cleaning $(EXE)"; rm -rf $(BUILDDIR)/$(EXE) $(EXE); fi
- @if [ -n "$(PACKDOC)" ]; then echo "### Cleaning $(PACKNAME:%.opx=%.doc)"; rm -rf $(PACKDOC); fi
-
No changes.
@@ -1,17 +0,0 @@
-########################################
-# USER VARIABLES
-EXE =
-PACKNAME = opace.opx
-SRC = ace.opa
-PCK =
-PCKDIR =
-PLUGIN = ace.opp
-PLUGINDIR = plugin/
-
-#Compiler variables
-OPACOMPILER = opa
-FLAG =
-
-PORT = 8080
-
-include Makefile.common
@@ -1,105 +0,0 @@
-/*
- Copyright © 2011 MLstate
-
- This file is part of OPA.
-
- OPA is free software: you can redistribute it and/or modify it under the
- terms of the GNU Affero General Public License, version 3, as published by
- the Free Software Foundation.
-
- OPA is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
- more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with OPA. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-package opace
-
-/**
- * {1 About this module}
- * Ace editor is a standalone code editor written in JavaScript. This
- * module provides a binding to this client code editor.
- *
- * {1 Where should I start?}
- * You should start by define an editable zone like that :
- * [<div id="myzone">This is an editable zone</div>]
- * Then you can use [Ace.edit("myzone")] this function replace the dom
- * node with id "myzone" by an Ace editor.
- * Finally you can access to Ace properties ('Set & Get Ace editor
- * properties') and do some action on your Ace editor ('Action on Ace
- * editor').
- */
-
-/**
- * {1 Types defined in this module}.
- */
-/**
- * Type of an Ace editor.
- */
-type Ace.t = external
-
-Ace = {{
-
- /**
- * {1 Initialization}
- */
- /**
- * [edit(id)] Create an ACE editor which edit element with the given
- * [id].
- */
- edit(id) = (%%plugin_ace.edit%%)(id)
-
- /**
- * {1 Set & Get Ace editor properties}
- */
- /**
- * [set_mode(ace, mode)] Load [mode] for the given [ace]
- * editor. List of mode are defined on ace plugin. If the mode
- * doesn't exists returns [false].
- */
- set_mode(ace:Ace.t, mode:string) =
- (%%plugin_ace.set_mode%%)(ace, mode)
-
- /**
- * Get content of ACE editor.
- */
- get_content = %%plugin_ace.get_content%%
-
- /**
- * Set content of ACE editor.
- */
- set_content = %%plugin_ace.set_content%%
-
- /**
- * Add an event handler.
- */
- add_event_listener(ace : Ace.t, kind : Dom.event.kind, action : -> void) =
- (%%plugin_ace.add_event_listener%%)(ace, Dom.Event.get_name(kind), action)
-
- /**
- * {1 Action on Ace editor}
- */
- /**
- * Undo the last action.
- */
- undo = %%plugin_ace.undo%%
-
- /**
- * Redo the last action.
- */
- redo = %%plugin_ace.redo%%
-
- /**
- * Set editor as read only
- */
- read_only = %%plugin_ace.read_only%%
-
- /**
- * Set cursor position.
- */
- move_cursor = %%plugin_ace.move_cursor%%
-
-}}
@@ -1,4 +0,0 @@
-Ace, Ajax.org Cloud9 Editor
-http://ace.ajax.org/
-
-Licensed under the tri-license MPL/LGPL/GPL.
@@ -1,26 +0,0 @@
-########################################
-# USER VARIABLES
-MKLIB = opa-plugin-builder
-PLUGNAME = ace.opp
-SRC = plugin_ACE.js external_ACE.js
-CONF = myconf.jsconf
-
-########################################
-# MAKEFILE VARIABLES
-ifeq ($(origin BUILDDIR), undefined)
- PWD := $(shell pwd)
- BUILDDIR := $(PWD)/_build/
- export BUILDDIR
-endif
-
-########################################
-# PLUGIN BUILDING
-$(PLUGNAME) : $(SRC)
- @echo "### Building plugin $(PLUGNAME)"
- @$(MKLIB) -o $(@:%.opp=%) $? $(CONF) --build-dir $(BUILDDIR)
-
-########################################
-# CLEANING
-clean :
- @echo "### Cleaning plugin $(PLUGNAME)"
- @rm -rf $(BUILDDIR)/$(PLUGNAME)
Oops, something went wrong.
@@ -1,2 +0,0 @@
-[external_ACE.js.*]
-verbatim: true
@@ -1,64 +0,0 @@
-/**
- * For documentation please see [ace.opa]
- */
-##extern-type Ace.t
-
-##register edit : string -> Ace.t
-##args(id)
-{
- var r = ace.edit(id);
- return r;
-}
-
-##register set_mode : Ace.t, string -> bool
-##args(editor, mode)
-{
- var M = require("ace/mode/"+mode);
- if(M == undefined) return false;
- M = M.Mode;
- if(M == undefined) return false;
- editor.getSession().setMode(new M());
- return true;
-}
-
-##register get_content : Ace.t -> string
-##args(editor)
-{
- return editor.getSession().getValue();
-}
-
-##register set_content : Ace.t, string -> void
-##args(editor, content)
-{
- editor.getSession().setValue(content);
-}
-
-##register add_event_listener : Ace.t, string, ( -> 'void) -> void
-##args(editor, kind, handler)
-{
- editor.getSession().addEventListener(kind, handler);
-}
-
-##register redo : Ace.t -> void
-##args(editor)
-{
- editor.getSession().getUndoManager().redo();
-}
-
-##register undo : Ace.t -> void
-##args(editor)
-{
- editor.getSession().getUndoManager().undo();
-}
-
-##register read_only : Ace.t, bool -> void
-##args(editor, b)
-{
- editor.setReadOnly(b);
-}
-
-##register move_cursor : Ace.t, int, int -> void
-##args(editor, col, line)
-{
- editor.getSelection().moveCursorToScreen(col, line);
-}
Oops, something went wrong.

0 comments on commit ab65ac0

Please sign in to comment.