Giter Club home page Giter Club logo

build-ng-packagr's People

Contributors

igortg avatar linnenschmidt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

build-ng-packagr's Issues

Can I also use SCSS in globs with this?

Basically what I'm asking is will it allow me to pull in SCSS files instead of CSS in the glob that will be rendered like normal SCSS files.

Also does this support configurations as well? or would it be possible to have a custom artitecture like "build-2" for one additonal env.

The reason I'm asking this is because I have a library that I need to use in two different environments, and the only different is that the path to so assets are different in each.

Also thanks for making this!

Subdirectories leading to an exception

If either the assets folder or the output option contains subdirctories, the builder crashes with:

(node:16280) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, mkdir '\a\b/'
at Object.mkdirSync (fs.js:768:3)
at pathToFolder.split.reduce ('\node_modules@linnenschmidt\build-ng-packagr\src\build\assets.js:64:32)
at Array.reduce ()
at entries.forEach.entry ('\node_modules@linnenschmidt\build-ng-packagr\src\build\assets.js:61:45)
at Array.forEach ()
at globby.then.entries ('\node_modules@linnenschmidt\build-ng-packagr\src\build\assets.js:57:25)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
(node:16280) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a
promise which was not handled with .catch(). (rejection id: 1)
(node:16280) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

But anyway, thank you for writing this little helper.

Angular 10

We depend on build-ng-packagr and appreciate what you have done.
Please upgrade it for Angular 10.
Our library project is upgraded to Angular 10, and we see these dependency issues related to build-ng-packagr:

npm WARN @linnenschmidt/[email protected] requires a peer of ng-packagr@^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-devkit/[email protected] requires a peer of ng-packagr@^9.0.0-rc.7 but none is installed. You must install peer dependencies yourself.
npm WARN @rollup/[email protected] requires a peer of rollup@^2.22.0 but none is installed. You must install peer dependencies yourself.

Thank you!

sourceMap is not supported

I try to active sourcemaps with your builder.

Here my angular.json file

	"build": {
		"builder": "@linnenschmidt/build-ng-packagr:build",
			"options": {
				"tsConfig": "projects/core/tsconfig.lib.json",
				"project": "projects/core/src/ng-package.json",
				"assets": [
					{
						"glob": "**/*.scss",
						"input": "styles",
						"output": "styles"
					},
					{
						"glob": "**/*",
						"input": "assets",
						"output": "assets"
					}
				]
			},
			"configurations": {
				"production": {},
				"dev": {
					"sourceMap": true
				}
			}
	}

The build with dev configuration fails with :

Schema validation failed with the following errors:
Data path "" should NOT have additional properties(sourceMap).

What path we have to provide of asset in library so that after compilation it finds the asset in dist folder?

Hey,
What path we have to provide of our assets in the library code so that after compilation it finds the assets in dist folder?
For eg -
In my library code, the asset folder is at this location.
image

And the path of the assets I have provided in the library is with this respect to the asset folder in the library code(inside the src folder).

After compilation of dist, the assets folder will be in the root folder of the library.
image

So what path should I provide in my original library source code of assets?

Angular 13

I upgraded to Angular 13, and it appears that this package no longer works. I think this has been a great contribution that solves a very important issue for building Angular libraries. Is there any plan to continue to support newer versions of Angular?

outputPath not supported

First of all: thanks for implementing this builder! It helps me a lot.

Unfortunately I also need the option outputPath of the original angular builder. Is it possible to add this?

Right now I get a schema validation error

Schema validation failed with the following errors: > Data path "" should NOT have additional properties(outputPath).

Angular 9

Hey, first, thanks for this lib !

As you may know Angular 9 is about to be released really soon (RC-10 while speaking).
What comes with this version is typescript 3.7 and it would be really nice to be able to update as soon as possible !
Last time I tried there were issues with some imported module from ng-packagr inside assets.ts

It would be awesome if you could give it a look ! Thanks

Handled Exception Error when using directory that's not within the "src" folder

When developing with libraries it's common to use ng generate library my-lib this creates the structure projects/my-lib in the main project directory. When trying to include an assets folder from one of these libraries I get the following error:

Compilation complete. Watching for file changes...
Copying Assets
(node:13410) UnhandledPromiseRejectionWarning: Error: The ./projects/my-lib/assets asset path must start with the project source root.

However if I use an assets folder that lies within the main project folder's src directory, it works fine. Any way that you could fix this?

Also: Thanks for forking this package from Angular so we can finally have dist folders in library builds!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.