Comments (8)
@elijahmanor Could you please accept this PR? IMO there's no real need to require installation of all Babel dependencies (90+ packages) for such a simple package. Thanks in advance!
from cross-var.
I desperately needed this to get my project working with the newer versions of Babel - namely the new @babel
scoped packages.
So I forked a pull request that removes babel completely and released a temporary substitute on npm, which you can use for now if you really need this as well:
"cross-var-no-babel": "^1.2.0"
Should continue to work exactly the same, just no more babel dependency.
from cross-var.
@awto I found that cross-env didn't work, it just converted $npm_package_version
to the text %npm_package_version%
, which was passed as-is without being evaluated anywhere along the way. I tried cross-env-shell (as suggested here), which got a bit further, but ended up causing other complicated problems.
Anyway, the fork from @lostpebble is a nice temporary solution!
from cross-var.
@eKoopmans I had the same issue with cross-env
. For some reason you need to use a different command that's part of the cross-env
package: cross-env-shell
, so:
"start": "cross-env-shell NODE_ENV=production node --max-old-space-size=$NODE_JS_MAX_OLD_SPACE_SIZE --max-semi-space-size=$NODE_JS_MAX_SEMI_SPACE_SIZE ./server.js",
That worked for me.
EDIT: Oh, nevermind - just saw you actually tried that... ๐
from cross-var.
Yep, just ran into this issue today. cross-var
was interfering with my babel pipeline because it started to pick up on earlier versions of babel-core
etc. which were now installed as dependencies of cross-var
.
To fix I had to explicitly install babel-core
and babel-runtime
at the versions I want - previously they were bundled with babel-cli
I think.
from cross-var.
I solved the problem by replacing cross-var with cross-env as is, without any variable set, it substitutes var names too
from cross-var.
@awto ... wish I had known that sooner. Thanks, will probably just be using that alone then (I was using both for some reason).
from cross-var.
Hah yep, I ran into a problem further downstream - a bit hard to replicate, but basically it was parsing text$var
inconsistently (one part of the command composed them properly, but then git
got confused and parsed them as two separate pieces). This package didn't have that problem.
That said, neither of them are going to work for me, because the variables don't update when I need them to - i.e. in a pre
script I bump the version (with npm version
), then in the main script I reference $npm_package_version
, but the version is still the old one. It's not a problem in vanilla NPM.
from cross-var.
Related Issues (20)
- Exit code transmission (1.0.3)
- Throws stderr maxBuffer exceeded error for some commands
- Crashes with version 1.0.3
- Support `${}` syntax HOT 1
- Unable to use in a folder whose name contains "src" HOT 3
- Only works for the first variable HOT 1
- Ignore a variable HOT 2
- Doesnยดt work with two or more variables
- reducing dependencies HOT 1
- Dependency upgrade
- Cannot find module './_arrayEach' on windows
- Continue maintaining this project
- cross-var doesn't work properly with Powershell
- Deprecated Babel pacakge used HOT 2
- Handling platform specific delimiters HOT 18
- Error if you have any environment var set with key name having special chars
- Use `expose-env` instead, since this project is not mainatined
- `cross-replace` is a drop in replacement for this project...without the security problems and some aditional improvements
- $NODE and $NODE_DEBUG_OPTION get commingled HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cross-var.