[NPMCLI-109] Best practice or command to process local light module build Created: 24/Feb/17  Updated: 20/Mar/17  Resolved: 16/Mar/17

Status: Closed
Project: Magnolia CLI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Christopher Zimmermann
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Sprint: Basel 87
Story Points: 0.5

 Description   

Based on other work we recommend the source control project for a sharable light module to be buildable with 'npm run build'. Additionally we recommend using .npmignore to remove all of the files not required for the production light module - such as the _dev directory and various config files.

This works great for packages a developer gets directly from npm - but how should a developer work which has the source control project locally - how can they easily get their built version without the dev specific files. Of course they can run 'npm run build' locally - but how to get rid of the .npmignore files?

They could build the tar.gzip locally and then unpack that.
Is there something more handy? could we provide a CLI command to do this?



 Comments   
Comment by Robert Kowalski [ 16/Mar/17 ]

> but how to get rid of the .npmignore files?
> They could build the tar.gzip locally and then unpack that.
> Is there something more handy?

Yes there is!

You can specify a local dependency in your package.json. On `npm install`, we will get the same files as if we install from the registry. It takes care of the files in the .npmignore & prepublish hooks.

With these building blocks we can set up more sophisticated builds. Many companies have their own, specific needs about infrastructure and environment.

Comment by Robert Kowalski [ 16/Mar/17 ]

Please reopen if there are questions left.

Generated at Mon Feb 12 04:46:37 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.