Creating custom sencha-touch js with only required modules - compilation

I'm working with in a Sencha Touch app project. Currently we are using sencha-touch-all.js. But it's size is too big. Are there any procedure to make one custom sencha-touch.js with only required modules.
Thanks in advance.

Mitchell Simoens says:
You can use sencha-touch-debug.js for development and if you are using MVC then you can do a build that will include only the ST classes and your application classes making it only what you need.
Source

Use the sencha cmd to generate the app, then compile with sencha app build package|production. CMD will create a bundle app.js which includes only the required clases for your app.

Related

how does spfx get builded? how to build custom spfx generator

I am learning spfx webpart. I open the gulpfile.js file but it only has limited code lines. how can I know the procedure of building spfx webpart?
And I notice that there is a PNP spfx generator. is it possible to create my own custom spfx generator? or involve spfx into my node project?
thanks
SPFx projects are built using a complex Build System that is an npm package. You can find it under node_modules folder under the name - #microsoft/sp-build-web
This package makes use of more packages. You can go into the node_moduels folder and look for packages named #microsoft/gulp-core-build*
The entire build system is built in Object oriented code with lots of classes and interfaces using TypeScript.
If you want to just customize the Build process then you can build custom tasks which are coded in the gulpfile.js.
On good article to learn is at - https://rencore.com/blog/extending-sharepoint-framework-build-process-custom-tasks/

Xamarin Forms Customer Control Library

I need to create a reusable Xamarin Forms control that will be used in two separate projects. It does require custom renderers for IOS and Android. The problem is I cannot figure our what kind of project to use to create a reusable custom control library for Xamarin forms.
Every site seems to talk about creating customer controls that can be reusing in the same project. But I need it in a separate project for reuse.
Can someone please point me in the right direction.
Depending what are your needs regarding multi-targeting, using a solution with a shared project of type MSBuild.Sdk.Extras could be very helpful. You can then packed your shared project into a package that you can reference from your apps project and use locally.
Examples that might guide you and shows you the path are known nuget packages that are being used by app developers cross-platforms, just an example Xamarin.Forms.PancakeView.
Related to MSBuild.Sdk.Extras: How to use different base class in custom control depending on platform target?

Using Angular libraries in Nativescript code sharing project

I'm trying to migrate an Angular app to a shared codebase with Nativescript using the new #nativescript/schematics, however, I'm having problems importing my Angular library when building the mobile version of the app. I used the angular-cli to create the library (ng generate library).
For the web version, all I had to do was build the library separately using ng build library-name which then allowed me to import it into the main application.
How can I build a mobile version of the library that can be imported into the main application when running tns run ios --bundle? I've already migrated the components and module of the library with appropriate *.tns files.
Any help is appreciated
I had the same problem. Nativescript cli do not have this feature where we can build an angular library into npm package and use it in other projects.
I tried a workaround and it worked for me. Write a script to copy all of your project files into another directory and replace all *.tns.ts, *tns.html and *.tns.scss. files with *.ts, *.html and *.scss respectively. Then build these files using regular ng command. You can add a build configuration for the same in angular.json file to build from the copied directory. I hope it helps.
I'm sorry this is just a hyperlink answer but the space required to answer this, in my opinion, is way too large. I just finished finalizing a repo I've been working on to do exactly this. I have a whole slew of angular web libraries that I now want to make available for use on mobile using NativeScript. I have put everything I have learned so far into this repo and I hope it helps you too.
Thanks for the final push/idea #Rohit, a script for doing what he suggests is in the test-lib/gulpfile.js of this repo.

Download a zip file using xamarin forms app

I Am Newbie in Xamarin. Our Xamarin forms app supports Android and IOS. Most of the app functionality is written in PCL class library which is referred in the above platforms.
Now we need to download a zip file using this app. Some posts are suggesting to handle it in common PCL library and some are suggesting to handle it in respective native projects. I am bit confused, which is the better approach of the two. Are there any limitations in this approaches?
If possible could you please share a sample app. Thanks in advance.
You can write the code to download the file in PCL. For downloading file you can make use of HTTPClient. At the same time you have to call dependency service and write the dependent code in corresponding android/ios projects to specify the file output path.
https://developer.xamarin.com/recipes/ios/network/web_requests/download_a_file/ uses webClient which is written in android. You can use HTTPClient to get same result in PCL

Can I create a console application using Xamarin.Mac?

I just purchased Xamarin.Mac in an effort to create a cross platform console utility. I figured this would be trivial but I am missing something.
How can I create and what do I need to do to deploy a simple Console.WriteLine("Hello World"); app using Xamarin.Mac?
here is the result I am looking for from the console in any folder on my mac.
$ my_xammac_app
Hello World
$
Use File - C# - Console Project to create console c# application
Create a new Mac project and simply use the assemblies you need.
You can delete the UI files that a new project contains (such as the .xibs and the files that go along with that). You don't have to use them.
The options are described here:
http://www.mono-project.com/Guide:Running_Mono_Applications

Resources