I would like to use TiRemoteImage from https://github.com/ulizama/TiRemoteImage
and in my alloy project I have added lib and components folder in app folder. Then I copy the files in TiRemoteImage's Resources/lib and Resources/components folder into my project's lib and components respectively
So my project folder structure looks like this now
app
> assets
> components
> controllers
> lib
> models
> styles
> views
I have then added
var RemoteImage = require('/components/remoteimage');
in index.js and then my app will just crash without any error. Am I including the component correctly?
You are using Alloy framework and the github project is not an alloy project so you have to copy all modules (.js in components and lib ) in /lib folder and change all line of code like : require("/components/module.js") ou require("/lib/module.js") by require("module.js")
Related
currently, my war folder structure is like this.
--mywebapp
--META-INF
--org
--WEB-INF
--classes
--static
--templates
I want to move the static and templates folder to mywebapp folder, and access the front end resources from there
--mywebapp
--static
--templates
--META-INF
--org
--WEB-INF
--classes
Is it possible with maven war plugin?
I plan to use the above folder structure when I use an external source in Tomcat.
Thank you
I'm working on codeignator 4 framework .
I'm having 2 apps inside one codeignator 4 framework
The question is : how can I create a folder that is shared with all my apps
And all apps can have access to it
How to add it to the path
How to create a loader for it
Think of a central log in system for all apps PLACED IN SHARED FOLDER
Structure
My project folder (codeignator 4)๐.
{
๐ App1
๐ App2
+shared folder (having model๐
libraries ๐ config๐ folders )
๐ System
๐Public
๐writable
}
I was wondering if it is possible to override/add to the template paths for Playframework? For instance, the default templates are looked under views folder and are compiled automatically. These templates are further reachable directly using a URL without any additional config.
---app
|-controllers
|-models
|-templates //How do I compile templates under this folder?
|-views
What I would like to know is if it is possible to add a custom path in addition to the views folder that is also compiled with the build process. Alternatively, is it possible to block certain templates to be not reachable by direct URL ?
Thanks in advance!
Under the app directory, Play should automatically compile anything that looks like a Twirl template - that is, has a registered extension such as *.scala.html - regardless of what directory it's in. The views directory is just a convention, and compiling templates under an app/templates directory should already happen.
If you open an SBT prompt you can verify this by running the command:
show twirlCompileTemplates::sourceDirectories
Which should give you something like:
[info] my-project/compile:twirlCompileTemplates::sourceDirectories
[info] List(/home/me/my-project/app)
For adding a templates directory outside the app folder, you should be able to add something like the following in your build.sbt (for example, the directory extra_templates):
import play.twirl.sbt.Import.TwirlKeys._
sourceDirectories in (Compile, compileTemplates) += file("extra_templates")
I am building a simple NativeScript app, and am trying to do it using a TypeScript base code.
I am using Sublime Text 3 under OSX.
I realized by looking at the demo apps that the tns_modules matches the NativeScript repository so I added it to my app/ folder as a Git submodule, and then compiled it (npm i && grunt). Is that the wrong way to integrate these modules?
I then realized that I could not just run a tns emulate android of my app made of .ts files: I had to compile them too. So I set up a Grunt task to do so, but it was not easy to handle the dependencies. I ended up with this Gruntfile.coffee in app/:
module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-typescript'
grunt.config 'typescript',
build:
src: [
'**/*.ts'
'!*_modules/**'
]
options:
references: [
'tns_modules/bin/dist/definitions/**/*.d.ts'
]
target: 'es5'
sourceMap: false
declaration: false
module: 'commonjs'
noResolve: true
And it works with simple code, e.g. I'm able to extend a module like Observable by writing:
import observable = require("data/observable");
class Activities extends observable.Observable {
//...
}
I then compile with grunt (the .js files are created along with the .ts ones) and run with tns emulate android (with Genymotion emulator).
Is it the right architecture for my development? When I use Telerik Platform, the compilation process is hidden so I'm not sure I'm doing it right.
And now I'm trying to use Telerik's side-bar module directly in a page's XML file, the way they do it:
<Page xmlns="http://www.nativescript.org/tns.xsd" loaded="pageLoaded" xmlns:tsb="./tns_modules/bin/dist/apps/TelerikNEXT/TelerikUI/side-bar">
<tsb:SideBar title="MyApp">
...
But I get this error:
E/TNS.Native( 2456): TypeError: Cannot read property 'android' of undefined
E/TNS.Native( 2456): File: "/data/data/org.nativescript.scmobile/files/app/./tns_modules/bin/dist/apps/TelerikNEXT/TelerikUI/side-bar, line: 39, column: 39
Which corresponds to:
this._android = new com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer(this._context);
Any idea how I should include these modules? Note that I'm new to mobile dev.
The sidebar, which they're using in the example, is a (payed) controller from Telerik.
As such, it needs to be downloaded and added with tns library add {ios|android} /path/to/the/sidebar.
This command will read project.properties file from the specified shared library folder and will add a reference to it in your project. If in turn the shared library has references to other projects then these projects will be included recursively. As a result, this will create a new folder lib which is sibling to already existing app and platforms.
http://docs.nativescript.org/runtimes/android/external-libs/resource-libs
Iโm trying to create a custom Xcode 6 project template. Standard file layout when I create a project using Single View project looks like this:
ProjectName
โ>ProjectName
โ>ProjectName.xcodeproj
โ>ProjectNameTests
How can I add files to this top level using the custom xcode template? I would like to add .gitignore and README.md files so it would look like this:
ProjectName
โ>.gitignore
โ>ProjectName
โ>ProjectName.xcodeproj
โ>ProjectNameTests
โ>README.md