Libman copying folders from subdirectories but not root directory while using filesystem provider - asp.net-core

I am using libman For managing client side libraries, and using the fileSystem provider.
Facing this issue:
{
"library": "Content/.",
"destination": "wwwroot/lib/animate/",
"files": [ "animate.css" ]
},
{
"library": "../../fonts/font-awesome/css",
"destination": "wwwroot/lib/font-awesome/",
"files": [ "font-awesome.css" ]
},
The font-awesome library is copied to the destination while the animate is not copied to the destination. The source libs exist.
I also tried Content instead of Content/. but this isn't working too. This issue is causing the build to fail as the BundlerMinifier.BundlerBuildTask is failing.
This is happening with other libs too like:
{
"library": "../../Scripts/.",
"destination": "wwwroot/lib/modernizr/",
"files": [ "modernizr-2.6.2.js" ]
}
What is the appropriate solution for this?

Related

While writing webdriverio test, 'browser' keyword is not getting identified

I am using webdriverio v7.5.7. While writing test, browser keyword not getting identified. It is auto correcting to Bhxbrowser. Any idea ?
I also face the same problem but found the solution on their official site.
You need to create jsconfig.json file and save it in your project folder.
Mocha:
{
"compilerOptions": {
"types": [
"node",
"webdriverio/sync",
"#wdio/mocha-framework"
]
}
}
Cucumber:
{
"compilerOptions": {
"types": [
"node",
"webdriverio/async",
"#wdio/cucumber-framework"
]
}
}
Reference to the solution:
https://webdriver.io/docs/autocompletion/#visual-studio-code-vscode

Angular 9 how to include fonts during library build

I´m trying to use my angular library for an external project.
I would like this project can use directly fonts from my library.
I noticed the folder projects/my-library/src/lib/styles/fonts is not included when I build my library.
I tried to follow answers of this similar question without success.
I tried this :
ng-package.json
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/my-library",
"assets": [
"./src/lib/styles/fonts/**"
],
"lib": {
"entryFile": "src/public-api.ts",
"styleIncludePaths": ["node_modules", "src/lib/styles"]
}
}
In this case, I have a directory src/... created in dist/my-library and I got this error:
An unhandled exception occurred: EEXIST: file already exists, mkdir 'path/to/dist/my-library/src/lib/styles/fonts'
or
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/my-library",
"lib": {
"entryFile": "src/public-api.ts",
"styleIncludePaths": ["node_modules", "src/lib/styles"],
"cssUrl": "inline"
}
}
I got this error :
WARNING: postcss-url: ... Can't read file 'path/to/font.eot'
Someone knows the way to properly include fonts or others assets for library build like inside dist/my-library/lib/styles/fonts ?

Clang is misinterpretting #import statement as a file, not a framework

I have #import <customframeworkname/customframeworkname.h>. Xcode does list the frameworks under Linked Frameworks and Libraries.
However, when compiling it from the command line using Clang, it says:
../cppsrc/stuff.mm:6:9: fatal error: 'customframeworkname/customframeworkname.h' file not found
#import <customframeworkname/customframeworkname.h>
I tried changing it to the relative path by doing #import <../customfwdir/customframeworkname/Headers/customframeworkname.h>. Now it finds the file, but since a framework contains many headers, it doesn't recognize the framework's internal headers which uses #import <customframeworkname/otherheader.h>. Obviously, changing up the whole framework would be bad.
I'm super new to macOS development, any tips in the right direction would be appreciated!
Additional context: building a cross platform node.js addon, which is why I'm compiling it through commandline, specifically node-gyp. Node-gyp has a command to generate a xcode project file, which I use to check to make sure the build settings which I define in the bindings file do get properly translated to xcode settings.
{
"targets": [
{
"target_name": "myproj",
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"sources": [
"cppsrc/wrapper.cc"
],
"conditions": [
["OS=='mac'", {
"xcode_settings": {
"FRAMEWORK_SEARCH_PATHS": "$(SRCROOT)/**"
},
"link_settings": {
"libraries": [
"customfws/fwname.framework"
]
},
"sources": [
"cppsrc/stuff.mm"
]
}]
],
"include_dirs": [
"<!#(node -p \"require('node-addon-api').include\")"
],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ]
}
]
}

Module build failed: Error: index.ts is missing from the TypeScript compilation

Description of the project: My project is downloading to node_module via package.json
Package.json
....
dependencies:{
....
"#myllc/application-core": "git+ssh://git#bitbucket.org/myllc/application-core.git",
"#myllc/application-shared":"git+ssh://git#bitbucket.org/myllc/application-shared.git",
}
....
Gotting error when doing "npm build":
ERROR in ./node_modules/#myllc/application-core/index.ts Module
build failed: Error:
/var/www/frontend-skeleton/node_modules/#myllc/application-core/index.ts is missing from the TypeScript compilation. Please make sure it is in
your tsconfig via the 'files' or 'include' property. The missing file
seems to be part of a third party library. TS files in published
libraries are often a sign of a badly packaged library. Please open an
issue in the library repository to alert its author and ask them to
package the library using the Angular Package Form at
(https:// goo.gl/jB3GVv).
This appear after upgrade from Angular4 to Angular5:
Tsconfig:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"lib": [
"es2016",
"dom"
],
"typeRoots": [
"node_modules/#types"
]
}
}
I tried to add
"include": [
"./node_modules/#myllc/**/*"
]
but there appear same error at deeper folder .ts file. Also founding
https://github.com/angular/angular-cli/issues/8284
but nothing solved this error.
What is the solution?
The solution is found in index.ts is not part of the compilation. #8284 by tapaz1 :
2 tsconfig.json files, one at the root of the app, and the other inside the src folder (one level down from the root) named tsconfig.app.json that extends the main tsconfig.json. I explicitly added the package that I needed that wasn't being transpiled by Typescript in the "include" array, and like a lot of people here I was getting the *.spec.ts files included despite having them in "exclude" option, so I removed it from the tsconfig.json. The fix was adding the "exclude" option to the second (extended) tsconfig.app.json file.
tsconfig.app.json:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist",
"baseUrl": "./",
"module": "es2015",
"types": []
},
"exclude": [
"../node_modules/your_package/**/*.spec.ts"
]
}

How to setup tern-vim in my project?

I want to setup tern-vim in my project and followed this link https://github.com/ternjs/tern_for_vim/blob/master/doc/tern.txt.
After installation, I created a .tern-project file under the root directory of my project as below.
{
"libs": [
"browser",
"jquery"
],
"loadEagerly": [
"importantfile.js"
],
"plugins": {
"requirejs": {
"baseURL": "./",
"paths": {}
}
}
}
When I open a js file by vim command, I can't use any tern command as below:
|:TernDoc|...................... Look up Documentation
|:TernDocBrowse|................ Browse the Documentation
|:TernType|..................... Perform a type look up
|:TernDef|...................... Look up definition
|:TernDefPreview|............... Look up definition in preview
|:TernDefSplit|................. Look up definition in new split
|:TernDefTab|................... Look up definition in new tab
|:TernRefs|..................... Look up references
|:TernRename|................... Rename identifier
I will get Not an editor command error. Do I need to do any other configuration?