roydukkey / clean-package Goto Github PK
View Code? Open in Web Editor NEWRemove configuration keys from 'package.json' before creating an NPM package.
License: MIT License
Remove configuration keys from 'package.json' before creating an NPM package.
License: MIT License
Additionally, in order to improve the CLI experience, yargs will be used to allow for creating the --help
content.
Incorrectly including rollup.config.ts
and who knows what else.
This change will be breaking, but will ultimately be more predictable. It will also make it easier for using clean-package
for things like ordering package.json
keys.
Here is the bug detailing this temporary change: npm/cli#2541.
This issue will close once the bug in NPM has been fixed and once the temporary change has been reverted.
I'm running clean-package in our prepublishOnly script, but I'm getting errors on node 15 w/ npm 7.7.6:
> [email protected] prepublishOnly /home/runner/work/warframe-items/warframe-items
> npm_config_yes=true npx clean-package
npx: installed 14 in 2.59s
Unexpected token '?'
this is during a semantic-release run using clean-package before packing.
hello there....
clean-package is awesome ❤️❤️❤️ but its extends functionality is broken
i'm using config in package.json and i used path as relative to package.json
"clean-package": {
"extends": "../../../clean-package.config.json",
}
but it gives error MODULE_NOT_FOUND
and i saw your source code and you are using normal node require
function to load extended config. And i used path relative to node_modules/clean-pacakge/dist/main.js
and it works
"clean-package": {
// "extends": "../../../clean-package.config.json", // relative to package.json
"extends": "../../../../../../clean-package.config.json" // relative to node_modules/clean-pacakge/dist/main.js
}
also... i'm using monorepo and i created a package and hoist it with pnpm and use this config but it also doesn't work
"clean-package": {
"extends": "@frontplus-ui/clean-package-config"
}
if extends
path is relative path use requireFile
util from utils/requireFile
as you are using it when config is string in package.json hint
Should be able to target the package.json
location based on the process.env.npm_lifecycle_event == 'postpack'
, therefore not requiring any new APIs. However, research needs to be done in order to determine if changing the package.json
in the tgz and during this npm_lifecycle_event
break anything.
Currently, the spec for the CLI is that the first optional, positional argument is backup-path
. Then a source-path
may optionally be specified before backup-path
.
To simplify the API, source-path
will be made the first optional, positional argument with the backup-path
optionally following source-path
.
There are package.json
property keys that contain dots (.
), namely exports
. Since the dot has a special meaning, references to these properties are not possible simply by a string.
Consider the cost of updating the replace
option to allow the similarly functionality.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.