Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.

Support for variables in complex statements #92

Closed
elijahmanor opened this issue Mar 20, 2017 · 3 comments
Closed

Support for variables in complex statements #92

elijahmanor opened this issue Mar 20, 2017 · 3 comments

Comments

@elijahmanor
Copy link

Due to a recent feature (Convert environment vars) the cross-var package can almost be deprecated. The one thing the library could support that cross-env does not yet (to my understanding) is complex statements.

The API for complex statements is to wrap the contents in a string so that all the variables can be replaced and then executed. What do you all think of this API and would it fit well with cross-env? If this type of feature was added to cross-env then cross-var shouldn't be needed anymore.

{
  "version": "1.0.0",
  "config": {
    "port": "1337"
  },
  "scripts": {
    "simple1": "cross-var rimraf public/$npm_package_version",
    "simple2": "cross-var http-server public/$npm_package_version -p $npm_package_config_port",
    "complex": "cross-var \"node-sass src/index.scss | postcss -c .postcssrc.json | cssmin > public/$npm_package_version/index.min.css\""
  }
}
@kentcdodds
Copy link
Owner

This is actually going to be released soon! It was implemented in #89 and will be released when this is merged: #87

🎉

@elijahmanor
Copy link
Author

@kentcdodds well that is great! that means i can re-record both the nps and cross-environment egghead lessons with just cross-env!

@kentcdodds
Copy link
Owner

And with nps-utils you can uninstall a bunch of the libs because they're supported by default!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants