I'm trying to enable Travis CI on my NativeScript project and have purchased a NativeScript UI Pro library (without support).
How can I enable the license on each build on the server?
When installing the package it is referenced to a local .tgz file. in package.json like this:
dependencies: {
"nativescript-telerik-ui-pro": "file:pathToTelerikUiProPackage.tgz"
}
How can I make this file available to Travis without adding it to source control?
Did you follow the Pro install instructions at http://docs.telerik.com/devtools/nativescript-ui/getting-started
I don't have Pro, but it sounds like you don't use NPM to install it - you manually extract the file you get from their website and then add it as a plugin.
If this doesn't help, consider posting a question on their dedicated forums.
Further research made it clear that I needed to co-locate the Nativescript UI Pro package to my source code.
Given I work on an open source project this was not a solution.
As a work around I placed the package in a private repository and added a before_install script to download the file to the working directory on Travis.
.travis.yml:
before_install:
- sh get-nativescript-ui-pro.sh
The script to download is as follows.
get-nativescript-ui-pro.sh:
#!/bin/bash
if [ "$PRIVATE_USER" = "" ];
then
echo "ERROR: Can't get nativescript-ui-pro package. User not set";
exit;
fi
curl --trace /dev/null -s -O -u $PRIVATE_USER {LINK TO RESOURCE}
Replace {LINK TO RESOURCE} with a complete link to the resource, i.e. the stored Nativescript UI Pro .tgz file. An environment variable named PRIVATE_USER holds the credentials to the repository account. This can be set in the Travis configuration panel for the specific repository.
Related
While trying to install and configure Zotero using a bash script, I'm encountering some difficulties in adding an .xpi addon using bash. The documentation says:
To install a plugin in Zotero, download its .xpi file to your
computer. Then, in Zotero, click “Tools → Add-Ons”, then drag the .xpi
for the plugin onto the Add-Ons window that opens.
My closest approach was simulating the "open with" option and chosing "Zotero". However, even when using "open with" manually, Zotero assumes the incoming file is a literature file instead of an addon file. So the implementation:
#!/bin/bash
zotero some.xpi
Analogous to option 1 of this answer, launches Zotero, yet it does not (prompt the user to) install the add-on.
I did not yet find an API or method to load the add-on automatically. Hence I would like to ask: How can I add an arbitrary .xpi add-on for Zotero from a bash script?
The instructions in the documentation did not work for me, so I found out another method:
One can
Download the Zotero standalone version
Get the add-on source code
Compile the add-on into a build directory that contains an install.rdf file
Copy this build directory into the /modules/ directory of the Zotero Standalone Build repository
Compile the Zotero Standalone Build repository into a build (exported to /staging/<your system architecture>/)
Add the instructions to include the new addon when Zotero loads, into the /staging/<your system architecture>/defaults/prefs.js file.
Start zotero using: ./zotero.
git clone --recursive https://github.com/zotero/zotero-standalone-build
...
npm run build
git clone git#github.com<your zotero extension>.git
# Switch out build file to add additional plugin
cp -r "src/build.sh" "src/submodules/zotero/zotero-standalone-build/build.sh"
..
npm build
...
staging/Zotero_linux-x86_64/zotero -purgecaches
I created a modified build.sh file for the zotero-standalone-build which adds the extensions to the prefs.js file with:
echo 'pref("extensions.something.unopkgPaths", "{}");' >> "$APPDIR/defaults/preferences/prefs.js"
echo 'pref("extensions.something.version", "");' >> "$APPDIR/defaults/preferences/prefs.js"
echo 'pref("extensions.something.installed", false);' >> "$APPDIR/defaults/preferences/prefs.js"
echo 'pref("extensions.something.skipInstallation", false);' >> "$APPDIR/defaults/preferences/prefs.js"
The build command specifics depend on the addon you want to include.
I'm struggling with CKEditor and perhaps some of you may be able to help me, please...
Summary
I'm attempting a custom build of CKEditor5 by following this guide - https://ckeditor.com/docs/ckeditor5/latest/builds/guides/development/custom-builds.html - The idea is to include plugins which aren't in the standard builds.
When I build the CKEditor build, push back to Github and then try and install the editor into my nodejs app (npm install from Github), the editor works, but without the plugins I've added.
Environment
Windows 10 Pro (20H2)
NVM installed to manage node versions
Node 14.6.0 used for CKEditor54 build
Node 10.22.0 used for NodeJS Project (latest supported version in the paltform I am developing for)
Steps Taken
Fork the CKEditor5 repo.
Clone the repo to my desktop using git clone -b stable https://github.com/<MyGithubUsername>/ckeditor5.git.
Navigate to the build directory cd D:\_source\ckeditor5\packages\ckeditor5-build-classic.
Run npm install.
I install the Font plug in to use it in this build: npm install --save-dev #ckeditor5/ckeditor5-font.
I then update the build configuration by adding to src/ckeditor.js:
import Font from '#ckeditor/ckeditor5-font/src/font';
ClassicEditor.builtinPlugins = [ ..., Font]
ClassicEditor.defaultConfig = { toolbar: { items: [' ..., fontColor, fontBackgroundColor'] } }
At this point, the guide says you should run yarn run build, but i can't get Yarn to work in this dev environment for love nor money, so instead I use npm run build.
I test the build by opening sample/index.html in the browser and it looks fine; the Font plugin is loaded and the toolbar items appear.
I then use Git to stage the changes, then I Commit and Push to my cloned repository.
In the Nodejs project where I want to use ckeditor, I install the custom build using npm install <MyGithubUsername>/ckeditor5#stable
To the project I add import ClassicEditor from '#ckeditor/ckeditor5-build-classic/build/ckeditor';
The editor appears as you would expect it to, but without the Font plug in.
Back over in the CKEditor local repo, when I take a look at the ckeditor5\packages\ckeditor5-build-classic\build\ckeditor.js.mapand search for ckeditor5-font I find many instances of it, indicating that it has indeed included it into the build. When I look at the same file in my Nodejs project D:\_source\NodeJsProject\node_modules\#ckeditor\ckeditor5-build-classic\build\ckeditor.js.map there's no sign of ckeditor5-font; the sample.html in the NodeJS project works, but does not show the Font additions, nor do they show in the implementation in my project.
I find my waround pretty well, but I am far from being a pro front-end developer and this has me stumped.
Any help or guidance is greatly appreciated.
Hello i have created demo video of ckeditor5 in angular that cover custom build from github and online builder
https://youtu.be/HsjCkvEvQhA
Tip. try to remove some plugin then it will work . remove one plugin at time and build and check it, this way you will find out which plugin creating issue
some plugin create conflict so you have to remove it .
I have cloned the repository - https://github.com/hyperledger/sawtooth-supply-chain. There is a docs folder in this repository that has a folder named 'source' and files named 'Makefile' and 'supply-chain-build-docs'
I want to know if I build the contents in this directory, whether I would be able to view additional documentation other than what is in ReadMe.md file.
If so, how should I build and view the files? I have installed sphinx.
In which port will I be able to see the html documentation after the build?
If you open the supply-chain-build-docs file you will notice the instructions to build the docs is mentioned inside.
Description:
Builds the environment needed to build the Sawtooth Supply Chain docs
Running the image will put the docs in
sawtooth-supply-chain/docs/build on your local machine.
Build:
$ cd sawtooth-supply-chain
$ docker build . -f docs/supply-chain-build-docs -t supply-chain-build-docs
Run:
$ cd sawtooth-supply-chain
$ docker run -v $(pwd):/project/sawtooth-supply-chain supply-chain-build-docs
This documentation although assumes that you already have docker installed. The guide to install it in ubuntu can be found here
In which port will I be able to see the html documentation after the build?
Once you run both the steps above you can find a neat pdf on the location sawtooth-supply-chain/docs/build/latex named as sawtooth.pdf ready for you :)
Our company is using swagger to document their API's, currently a couple of developers are using the online swagger editor on their PC's.
I want to move this piece of the design process into our standard development environment, which is in a walled garden without internet access.
How do I go about installing npm and the swagger editor in an offline environment?
There are options to use either RHEL or Windows machines, although Windows is preferable as developers have local admin rights
In short answer is https://swagger.io/docs/swagger-tools/#swagger-editor
git clone https://github.com/swagger-api/swagger-editor.git
cd swagger-editor
npm install
npm run build
npm start
And it will works in your Intranet OK.
npm is not required, you can download the compiled files from the Swagger Editor repository:
index.html
dist\*
and open index.html locally (from the file system) or put the files onto a web server in your network.
With one command with npm/npx:
npx swagger-editor-binary
Download the one of the source releases from swagger-editor's github page (click releases link on the page)
unzip the downloaded source release zip/tar file.
cd into the extracted source dir, type 'npm install' (or if you have some npm mirror module installed, such as cnpm, use 'cnpm install' instead)
Use a browser to open index.html file in the source dir. Or, follow official guide the 'Setup with http-server module from GitHub' section to serve from a local static web server.
PS. You don't need to build the source code unless you want to contribute as written in the 'Contribute' section of the official document.
I'm trying to put together a custom buildpack with NodeJS and the CouchBase module/libraries
I've gotten as far as using Vulcan to build libcouchbase and libvbucket and getting the buildpack to retrieve and unpack the tgz files for both.
Everything looks ok there, but I receive errors when npm tries to install the couchbase module:
I get a bunch of errors, but this line:
"../src/couchbase_impl.h:52:36: warning: libcouchbase/couchbase.h: No such file or directory"
leads me to think that it can't find the libcouchbase libraries (which is possible since they aren't in the usual place).
I've tried to add the correct path using CPPFLAGS="-I/app/vendor/couchbase/include/libcouchbase" in both the Config Vars and just exporting that as part of the compile phase, but still no luck.
Here is the gist with the Heroku deploy output and the compile/release buildpack files:
https://gist.github.com/ahamidi/5620503
Any help would be greatly appreciated.
Thanks,
Ali
[Update 1]
I've made some progress and I can now get the slug to compile when deploying to Heroku.
The key was figuring out the ENV Variables that CouchNode looks for when adding custom directories to include.
In this case, the Env Variables were EXTRA_CPPFLAGS and EXTRA_LDFLAGS.
So I updated the compile file to include the following:
export EXTRA_CPPFLAGS="-I$BUILD_DIR/vendor/couchbase/include"
export EXTRA_LDFLAGS="-L$BUILD_DIR/vendor/couchbase/lib -Wl,-rpath,$BUILD_DIR/vendor/couchbase/lib"
The slug compiles and the app is deployed, but I now get a different error in the logs:
Error: libcouchbase.so.2: cannot open shared object file: No such file or directory
So it looks like Node can't see the libcouchbase libraries directory.
For anyone who is curious or experiencing a similar issue, here's what worked for me.
In order to get the couchbase npm module to install I had to tell it where to find the libcouchbase libraries (in compile file):
export EXTRA_CPPFLAGS="-I$BUILD_DIR/vendor/couchbase/include"
export EXTRA_LDFLAGS="-L$BUILD_DIR/vendor/couchbase/lib -Wl,-rpath,$BUILD_DIR/vendor/couchbase/lib"
Then in order to require couchbase in my app I had to set the following Env Variable:
LD_LIBRARY_PATH="/app/vendor/couchbase/lib:$LD_LIBRARY_PATH"
With the command:
heroku config:add LD_LIBRARY_PATH="/app/vendor/couchbase/lib:$LD_LIBRARY_PATH"
You should set CPPFLAGS="-I/app/vendor/couchbase/include" LDFLAGS="-L/app/vendor/couchbase/include -lcouchbase"
from your script it seems like you just unpacking libcouchbase without any further work. you should also build it and install. typical magic spell for node.js client will be ./configure --disable-plugins --disable-examples && make && sudo make install. I'm not sure if sudo part needed on heroku, probably just make install