Export two modules of same project separately? - web-component

In Stenciljs is it possible to export two modules of same project separately?
I want to create host which can have multiple web components from same project and when required we can import it in any other projects.

You can use the tsconfig option in stencil.config.ts to decide which tsconfig.json to use for the build (e. g. based on an environment variable), and then have different include or exclude settings in those tsconfigs, to decide which modules should be part of the build.

Related

How can you split scalajs cross-project modules (js, jvm, shared) into subprojects?

I'm trying to set up scalajs project using sbt, and since I will be including a "shared" module that will be used by both the jvm side of the project (server) and the js side (web client), I plan to use sbt-scalajs-crossproject. The problem is that I would like to separate part of the js code from the rest to publish as a library (all of the reusable js components). This would require splitting the js part of the project into multiple subprojects. Is this possible?
The best solution I have found is to put the reusable components in a separate scalajs subproject which is published as a distinct module. The rest of the code then goes into a cross-project which depends on the scalajs components project.

How to deploy solution with multiple web projects with VSTS?

I have a solution with multiple web-projects and many class libraries.
I want to deploy web-projects to my own VM with installed deployment agents.
Should I create for every web-project separate its own Build and Release Definitions, right?
Obviously, creating separate Build and Release definition for each web project works. But if you want to use one build & release definition, it also can be achieved, and there are many ways.
For example, if you want to use each project artifact, you could use individual project files in the solution to build in Build definition. Or you could copy the file you need for one project in Release definition, etc. In a word, it depends on how do you want to achieve your requirement.

How to add multiple AMP modules to alfresco-sdk?

I am new to alfresco-sdk. I am used to have old style AMP modules and then run ant script to combine them into alfresco WAR file.
I have followed tutorials of alfresco-sdk for
alfresco all in one
alfresco AMP
alfresco share
archetypes and it ran successfully.
I could not figure out if I have three different AMP modules, how can I combine them in one?
Say for example, currently I following AMP modules in my repo -
alfresco-DEF-AMP
alfresco-generic-AMP
alresco-ABC-AMP
What should I do such that when I give amp-to-war command, it takes customization from above three modules and puts then into alfresco WAR.
I think you should stick with using a seperate archetype alfresco (AKA repository) AMP for each of your existing modules.
By Running the alfresco SDK maven build with target mvn package on each module, will create an amp file for you. These amps can then be deployed to your alfresco instance (with apply_amps.bat), just like you probably are used to, with ant builds.
You don t have to execute the maven build via run.bat file, which starts alfresco with your module in an embedded container.
If you really want to combine them into one, I suppose you ll have to merge your code of the 3 modules into one module of type alfresco AMP, and still work the above way.
We can use alfresco All-in-one archetype for that.
We can use overlays to include our custom modules such as
alfresco-DEF-AMP
alfresco-generic-AMP
alresco-ABC-AMP
to generate single WAR file (alfresco/repo.war)
Below link is very useful
http://docs.alfresco.com/sdk2.1/concepts/alfresco-sdk-advanced-add-custom-amps.html

how to add third party angular directives to meteor application

I'm using angular-meteor library to develop a meteor application with angular as a front-end.
I need to add an angular directive called angular-file-upload.
When I use this directive in my node/angular app, it is installed via bower, and has this folder structure:
angular-file-upload folder contains
angular-file-upload.js
as well as a sub-folder named src,
which contains 3 files:
intro.js, module.js and outro.js
What is the process of installing such third party angular directives?
Is this done with meteor add command, or by placing these files manually into specific directories?
Check out this link, if those are the actual packages which serve your purpose then you can directly add them to you Meteor app by using meteor add <package-name> command in the terminal.
While the alternate way to do this is by adding these .js files manually to public or lib folder and link them to your corresponding HTML pages. But I would personally prefer the 1st way to do this.
You can create the library by yourself. There are few alternatives to do that.
Basically it goes down to these steps:
add package.js in root directory
meteor publish --create
The complete details how to do that can be found here: http://angular-meteor.com/tutorial/step_19

import play framework module as jar into java project

I have created a play module, how I can import the exported jar to normal java project(not play project)?
When I tried it it gives error:
The type play.libs.F$Promise cannot be resolved. It is indirectly referenced from required .class files
You need to include the play libs as well. Have a look at the deployment documentation. activator dist allows you to create a standalone distribution for your entire play-app.
You can also search the jars in the output for the one which contains the classes you need and just add this one jar to your project.
Or: use sbt/maven to manage your dependencies and add the entire play-framework. (seems to be a bit of an overkill though)

Resources